Module: Google::Ads::GoogleAds::V18::Services::DataLinkService::Paths

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

Overview

Path helper methods for the DataLinkService API.

Instance Method Summary collapse

Instance Method Details

Create a fully-qualified DataLink resource string.

The resource will be in the following format:

‘customers/customer_id/dataLinks/product_link_id~data_link_id`

Parameters:

  • customer_id (String)
  • product_link_id (String)
  • data_link_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def data_link_path customer_id:, product_link_id:, data_link_id:
  raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"
  raise ::ArgumentError, "product_link_id cannot contain /" if product_link_id.to_s.include? "/"

  "customers/#{customer_id}/dataLinks/#{product_link_id}~#{data_link_id}"
end