Module: Google::Ads::GoogleAds::V5::Services::CampaignAssetService::Paths

Extended by:
Paths
Included in:
Client, Paths
Defined in:
lib/google/ads/google_ads/v5/services/campaign_asset_service/paths.rb

Overview

Path helper methods for the CampaignAssetService API.

Instance Method Summary collapse

Instance Method Details

#asset_path(customer:, asset:) ⇒ ::String

Create a fully-qualified Asset resource string.

The resource will be in the following format:

‘customers/customer/assets/asset`

Parameters:

  • customer (String)
  • asset (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
# File 'lib/google/ads/google_ads/v5/services/campaign_asset_service/paths.rb', line 39

def asset_path customer:, asset:
  raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/"

  "customers/#{customer}/assets/#{asset}"
end

#campaign_asset_path(customer:, campaign_asset:) ⇒ ::String

Create a fully-qualified CampaignAsset resource string.

The resource will be in the following format:

‘customers/customer/campaignAssets/campaign_asset`

Parameters:

  • customer (String)
  • campaign_asset (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


73
74
75
76
77
# File 'lib/google/ads/google_ads/v5/services/campaign_asset_service/paths.rb', line 73

def campaign_asset_path customer:, campaign_asset:
  raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/"

  "customers/#{customer}/campaignAssets/#{campaign_asset}"
end

#campaign_path(customer:, campaign:) ⇒ ::String

Create a fully-qualified Campaign resource string.

The resource will be in the following format:

‘customers/customer/campaigns/campaign`

Parameters:

  • customer (String)
  • campaign (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


56
57
58
59
60
# File 'lib/google/ads/google_ads/v5/services/campaign_asset_service/paths.rb', line 56

def campaign_path customer:, campaign:
  raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/"

  "customers/#{customer}/campaigns/#{campaign}"
end