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

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

Overview

Path helper methods for the GeographicViewService API.

Instance Method Summary collapse

Instance Method Details

#geographic_view_path(customer_id:, country_criterion_id:, location_type:) ⇒ ::String

Create a fully-qualified GeographicView resource string.

The resource will be in the following format:

‘customers/customer_id/geographicViews/country_criterion_id~location_type`

Parameters:

  • customer_id (String)
  • country_criterion_id (String)
  • location_type (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def geographic_view_path customer_id:, country_criterion_id:, location_type:
  raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"
  raise ::ArgumentError, "country_criterion_id cannot contain /" if country_criterion_id.to_s.include? "/"

  "customers/#{customer_id}/geographicViews/#{country_criterion_id}~#{location_type}"
end