Module: Google::Ads::GoogleAds::V15::Services::AdGroupCriterionService::Paths

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

Overview

Path helper methods for the AdGroupCriterionService API.

Instance Method Summary collapse

Instance Method Details

#ad_group_criterion_label_path(customer_id:, ad_group_id:, criterion_id:, label_id:) ⇒ ::String

Create a fully-qualified AdGroupCriterionLabel resource string.

The resource will be in the following format:

‘customers/customer_id/adGroupCriterionLabels/ad_group_id~criterion_id~label_id`

Parameters:

  • customer_id (String)
  • ad_group_id (String)
  • criterion_id (String)
  • label_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


77
78
79
80
81
82
83
# File 'lib/google/ads/google_ads/v15/services/ad_group_criterion_service/paths.rb', line 77

def ad_group_criterion_label_path customer_id:, ad_group_id:, criterion_id:, label_id:
  raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"
  raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/"
  raise ::ArgumentError, "criterion_id cannot contain /" if criterion_id.to_s.include? "/"

  "customers/#{customer_id}/adGroupCriterionLabels/#{ad_group_id}~#{criterion_id}~#{label_id}"
end

#ad_group_criterion_path(customer_id:, ad_group_id:, criterion_id:) ⇒ ::String

Create a fully-qualified AdGroupCriterion resource string.

The resource will be in the following format:

‘customers/customer_id/adGroupCriteria/ad_group_id~criterion_id`

Parameters:

  • customer_id (String)
  • ad_group_id (String)
  • criterion_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


57
58
59
60
61
62
# File 'lib/google/ads/google_ads/v15/services/ad_group_criterion_service/paths.rb', line 57

def ad_group_criterion_path customer_id:, ad_group_id:, criterion_id:
  raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"
  raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/"

  "customers/#{customer_id}/adGroupCriteria/#{ad_group_id}~#{criterion_id}"
end

#ad_group_path(customer_id:, ad_group_id:) ⇒ ::String

Create a fully-qualified AdGroup resource string.

The resource will be in the following format:

‘customers/customer_id/adGroups/ad_group_id`

Parameters:

  • customer_id (String)
  • ad_group_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def ad_group_path customer_id:, ad_group_id:
  raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"

  "customers/#{customer_id}/adGroups/#{ad_group_id}"
end

#combined_audience_path(customer_id:, combined_audience_id:) ⇒ ::String

Create a fully-qualified CombinedAudience resource string.

The resource will be in the following format:

‘customers/customer_id/combinedAudiences/combined_audience_id`

Parameters:

  • customer_id (String)
  • combined_audience_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


96
97
98
99
100
# File 'lib/google/ads/google_ads/v15/services/ad_group_criterion_service/paths.rb', line 96

def combined_audience_path customer_id:, combined_audience_id:
  raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"

  "customers/#{customer_id}/combinedAudiences/#{combined_audience_id}"
end

#mobile_app_category_constant_path(mobile_app_category_id:) ⇒ ::String

Create a fully-qualified MobileAppCategoryConstant resource string.

The resource will be in the following format:

‘mobileAppCategoryConstants/mobile_app_category_id`

Parameters:

  • mobile_app_category_id (String)

Returns:

  • (::String)


112
113
114
# File 'lib/google/ads/google_ads/v15/services/ad_group_criterion_service/paths.rb', line 112

def mobile_app_category_constant_path mobile_app_category_id:
  "mobileAppCategoryConstants/#{mobile_app_category_id}"
end

#topic_constant_path(topic_id:) ⇒ ::String

Create a fully-qualified TopicConstant resource string.

The resource will be in the following format:

‘topicConstants/topic_id`

Parameters:

  • topic_id (String)

Returns:

  • (::String)


126
127
128
# File 'lib/google/ads/google_ads/v15/services/ad_group_criterion_service/paths.rb', line 126

def topic_constant_path topic_id:
  "topicConstants/#{topic_id}"
end