Module: Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb

Overview

Path helper methods for the CommerceTransaction API.

Instance Method Summary collapse

Instance Method Details

#billing_account_path(billing_account:) ⇒ ::String

Create a fully-qualified BillingAccount resource string.

The resource will be in the following format:

billingAccounts/{billing_account}

Parameters:

  • billing_account (String)

Returns:

  • (::String)


37
38
39
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb', line 37

def  billing_account:
  "billingAccounts/#{}"
end

#location_path(project:, location:) ⇒ ::String

Create a fully-qualified Location resource string.

The resource will be in the following format:

projects/{project}/locations/{location}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


52
53
54
55
56
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb', line 52

def location_path project:, location:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/locations/#{location}"
end

#private_offer_document_path(project:, location:, private_offer:, document:) ⇒ ::String

Create a fully-qualified PrivateOfferDocument resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/privateOffers/{private_offer}/documents/{document}

Parameters:

  • project (String)
  • location (String)
  • private_offer (String)
  • document (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


90
91
92
93
94
95
96
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb', line 90

def private_offer_document_path project:, location:, private_offer:, document:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "private_offer cannot contain /" if private_offer.to_s.include? "/"

  "projects/#{project}/locations/#{location}/privateOffers/#{private_offer}/documents/#{document}"
end

#private_offer_path(project:, location:, private_offer:) ⇒ ::String

Create a fully-qualified PrivateOffer resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/privateOffers/{private_offer}

Parameters:

  • project (String)
  • location (String)
  • private_offer (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


70
71
72
73
74
75
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb', line 70

def private_offer_path project:, location:, private_offer:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/privateOffers/#{private_offer}"
end

#service_path(project:, location:, service:) ⇒ ::String

Create a fully-qualified Service resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/services/{service}

Parameters:

  • project (String)
  • location (String)
  • service (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


110
111
112
113
114
115
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb', line 110

def service_path project:, location:, service:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/services/#{service}"
end

#sku_group_path(project:, location:, sku_group:) ⇒ ::String

Create a fully-qualified SkuGroup resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/skuGroups/{sku_group}

Parameters:

  • project (String)
  • location (String)
  • sku_group (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


150
151
152
153
154
155
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb', line 150

def sku_group_path project:, location:, sku_group:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/skuGroups/#{sku_group}"
end

#sku_path(project:, location:, service:, sku:) ⇒ ::String

Create a fully-qualified Sku resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/services/{service}/skus/{sku}

Parameters:

  • project (String)
  • location (String)
  • service (String)
  • sku (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


130
131
132
133
134
135
136
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb', line 130

def sku_path project:, location:, service:, sku:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "service cannot contain /" if service.to_s.include? "/"

  "projects/#{project}/locations/#{location}/services/#{service}/skus/#{sku}"
end

#standard_offer_path(project:, location:, service:, standard_offer:) ⇒ ::String

Create a fully-qualified StandardOffer resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/services/{service}/standardOffers/{standard_offer}

Parameters:

  • project (String)
  • location (String)
  • service (String)
  • standard_offer (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


170
171
172
173
174
175
176
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb', line 170

def standard_offer_path project:, location:, service:, standard_offer:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "service cannot contain /" if service.to_s.include? "/"

  "projects/#{project}/locations/#{location}/services/#{service}/standardOffers/#{standard_offer}"
end