Module: Google::Ads::GoogleAds::V8::Services::ClickViewService::Paths

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

Overview

Path helper methods for the ClickViewService API.

Instance Method Summary collapse

Instance Method Details

#ad_group_ad_path(customer_id:, ad_group_id:, ad_id:) ⇒ ::String

Create a fully-qualified AdGroupAd resource string.

The resource will be in the following format:

‘customers/customer_id/adGroupAds/ad_group_id~ad_id`

Parameters:

  • customer_id (String)
  • ad_group_id (String)
  • ad_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


40
41
42
43
44
45
# File 'lib/google/ads/google_ads/v8/services/click_view_service/paths.rb', line 40

def ad_group_ad_path customer_id:, ad_group_id:, ad_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}/adGroupAds/#{ad_group_id}~#{ad_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)


59
60
61
62
63
64
# File 'lib/google/ads/google_ads/v8/services/click_view_service/paths.rb', line 59

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

#click_view_path(customer_id:, date:, gclid:) ⇒ ::String

Create a fully-qualified ClickView resource string.

The resource will be in the following format:

‘customers/customer_id/clickViews/date~gclid`

Parameters:

  • customer_id (String)
  • date (String)
  • gclid (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def click_view_path customer_id:, date:, gclid:
  raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"
  raise ::ArgumentError, "date cannot contain /" if date.to_s.include? "/"

  "customers/#{customer_id}/clickViews/#{date}~#{gclid}"
end

#geo_target_constant_path(criterion_id:) ⇒ ::String

Create a fully-qualified GeoTargetConstant resource string.

The resource will be in the following format:

‘geoTargetConstants/criterion_id`

Parameters:

  • criterion_id (String)

Returns:

  • (::String)


95
96
97
# File 'lib/google/ads/google_ads/v8/services/click_view_service/paths.rb', line 95

def geo_target_constant_path criterion_id:
  "geoTargetConstants/#{criterion_id}"
end

#user_list_path(customer_id:, user_list_id:) ⇒ ::String

Create a fully-qualified UserList resource string.

The resource will be in the following format:

‘customers/customer_id/userLists/user_list_id`

Parameters:

  • customer_id (String)
  • user_list_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


110
111
112
113
114
# File 'lib/google/ads/google_ads/v8/services/click_view_service/paths.rb', line 110

def user_list_path customer_id:, user_list_id:
  raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"

  "customers/#{customer_id}/userLists/#{user_list_id}"
end