Module: Google::Ads::AdManager::V1::CreativeSetService::Paths

Extended by:
Paths
Included in:
Paths, Rest::Client
Defined in:
lib/google/ads/ad_manager/v1/creative_set_service/paths.rb

Overview

Path helper methods for the CreativeSetService API.

Instance Method Summary collapse

Instance Method Details

#creative_path(network_code:, creative:) ⇒ ::String

Create a fully-qualified Creative resource string.

The resource will be in the following format:

networks/{network_code}/creatives/{creative}

Parameters:

  • network_code (String)
  • creative (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


38
39
40
41
42
# File 'lib/google/ads/ad_manager/v1/creative_set_service/paths.rb', line 38

def creative_path network_code:, creative:
  raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/"

  "networks/#{network_code}/creatives/#{creative}"
end

#creative_set_path(network_code:, creative_set:) ⇒ ::String

Create a fully-qualified CreativeSet resource string.

The resource will be in the following format:

networks/{network_code}/creativeSets/{creative_set}

Parameters:

  • network_code (String)
  • creative_set (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


55
56
57
58
59
# File 'lib/google/ads/ad_manager/v1/creative_set_service/paths.rb', line 55

def creative_set_path network_code:, creative_set:
  raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/"

  "networks/#{network_code}/creativeSets/#{creative_set}"
end

#network_path(network_code:) ⇒ ::String

Create a fully-qualified Network resource string.

The resource will be in the following format:

networks/{network_code}

Parameters:

  • network_code (String)

Returns:

  • (::String)


71
72
73
# File 'lib/google/ads/ad_manager/v1/creative_set_service/paths.rb', line 71

def network_path network_code:
  "networks/#{network_code}"
end