Module: Google::Ads::AdManager::V1::OrderService::Paths

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

Overview

Path helper methods for the OrderService API.

Instance Method Summary collapse

Instance Method Details

#company_path(network_code:, company:) ⇒ ::String

Create a fully-qualified Company resource string.

The resource will be in the following format:

networks/{network_code}/companies/{company}

Parameters:

  • network_code (String)
  • company (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def company_path network_code:, company:
  raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/"

  "networks/#{network_code}/companies/#{company}"
end

#contact_path(network_code:, contact:) ⇒ ::String

Create a fully-qualified Contact resource string.

The resource will be in the following format:

networks/{network_code}/contacts/{contact}

Parameters:

  • network_code (String)
  • contact (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def contact_path network_code:, contact:
  raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/"

  "networks/#{network_code}/contacts/#{contact}"
end

#custom_field_path(network_code:, custom_field:) ⇒ ::String

Create a fully-qualified CustomField resource string.

The resource will be in the following format:

networks/{network_code}/customFields/{custom_field}

Parameters:

  • network_code (String)
  • custom_field (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


72
73
74
75
76
# File 'lib/google/ads/ad_manager/v1/order_service/paths.rb', line 72

def custom_field_path network_code:, custom_field:
  raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/"

  "networks/#{network_code}/customFields/#{custom_field}"
end

#label_path(network_code:, label:) ⇒ ::String

Create a fully-qualified Label resource string.

The resource will be in the following format:

networks/{network_code}/labels/{label}

Parameters:

  • network_code (String)
  • label (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


89
90
91
92
93
# File 'lib/google/ads/ad_manager/v1/order_service/paths.rb', line 89

def label_path network_code:, label:
  raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/"

  "networks/#{network_code}/labels/#{label}"
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)


105
106
107
# File 'lib/google/ads/ad_manager/v1/order_service/paths.rb', line 105

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

#order_path(network_code:, order:) ⇒ ::String

Create a fully-qualified Order resource string.

The resource will be in the following format:

networks/{network_code}/orders/{order}

Parameters:

  • network_code (String)
  • order (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


120
121
122
123
124
# File 'lib/google/ads/ad_manager/v1/order_service/paths.rb', line 120

def order_path network_code:, order:
  raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/"

  "networks/#{network_code}/orders/#{order}"
end

#team_path(network_code:, team:) ⇒ ::String

Create a fully-qualified Team resource string.

The resource will be in the following format:

networks/{network_code}/teams/{team}

Parameters:

  • network_code (String)
  • team (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


137
138
139
140
141
# File 'lib/google/ads/ad_manager/v1/order_service/paths.rb', line 137

def team_path network_code:, team:
  raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/"

  "networks/#{network_code}/teams/#{team}"
end

#user_path(network_code:, user:) ⇒ ::String

Create a fully-qualified User resource string.

The resource will be in the following format:

networks/{network_code}/users/{user}

Parameters:

  • network_code (String)
  • user (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


154
155
156
157
158
# File 'lib/google/ads/ad_manager/v1/order_service/paths.rb', line 154

def user_path network_code:, user:
  raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/"

  "networks/#{network_code}/users/#{user}"
end