Module: Google::Ads::GoogleAds::V7::Services::CampaignService::Paths

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

Overview

Path helper methods for the CampaignService API.

Instance Method Summary collapse

Instance Method Details

#bidding_strategy_path(customer_id:, bidding_strategy_id:) ⇒ ::String

Create a fully-qualified BiddingStrategy resource string.

The resource will be in the following format:

‘customers/customer_id/biddingStrategies/bidding_strategy_id`

Parameters:

  • customer_id (String)
  • bidding_strategy_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def bidding_strategy_path customer_id:, bidding_strategy_id:
  raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"

  "customers/#{customer_id}/biddingStrategies/#{bidding_strategy_id}"
end

#campaign_budget_path(customer_id:, campaign_budget_id:) ⇒ ::String

Create a fully-qualified CampaignBudget resource string.

The resource will be in the following format:

‘customers/customer_id/campaignBudgets/campaign_budget_id`

Parameters:

  • customer_id (String)
  • campaign_budget_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def campaign_budget_path customer_id:, campaign_budget_id:
  raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"

  "customers/#{customer_id}/campaignBudgets/#{campaign_budget_id}"
end

#campaign_label_path(customer_id:, campaign_id:, label_id:) ⇒ ::String

Create a fully-qualified CampaignLabel resource string.

The resource will be in the following format:

‘customers/customer_id/campaignLabels/campaign_id~label_id`

Parameters:

  • customer_id (String)
  • campaign_id (String)
  • label_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


91
92
93
94
95
96
# File 'lib/google/ads/google_ads/v7/services/campaign_service/paths.rb', line 91

def campaign_label_path customer_id:, campaign_id:, label_id:
  raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"
  raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/"

  "customers/#{customer_id}/campaignLabels/#{campaign_id}~#{label_id}"
end

#campaign_path(customer_id:, campaign_id:) ⇒ ::String

Create a fully-qualified Campaign resource string.

The resource will be in the following format:

‘customers/customer_id/campaigns/campaign_id`

Parameters:

  • customer_id (String)
  • campaign_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def campaign_path customer_id:, campaign_id:
  raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"

  "customers/#{customer_id}/campaigns/#{campaign_id}"
end

#conversion_action_path(customer_id:, conversion_action_id:) ⇒ ::String

Create a fully-qualified ConversionAction resource string.

The resource will be in the following format:

‘customers/customer_id/conversionActions/conversion_action_id`

Parameters:

  • customer_id (String)
  • conversion_action_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


109
110
111
112
113
# File 'lib/google/ads/google_ads/v7/services/campaign_service/paths.rb', line 109

def conversion_action_path customer_id:, conversion_action_id:
  raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"

  "customers/#{customer_id}/conversionActions/#{conversion_action_id}"
end

#feed_path(customer_id:, feed_id:) ⇒ ::String

Create a fully-qualified Feed resource string.

The resource will be in the following format:

‘customers/customer_id/feeds/feed_id`

Parameters:

  • customer_id (String)
  • feed_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


126
127
128
129
130
# File 'lib/google/ads/google_ads/v7/services/campaign_service/paths.rb', line 126

def feed_path customer_id:, feed_id:
  raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"

  "customers/#{customer_id}/feeds/#{feed_id}"
end