Module: Google::Cloud::Channel::V1::CloudChannelService::Paths

Extended by:
Paths
Included in:
Client, Paths
Defined in:
lib/google/cloud/channel/v1/cloud_channel_service/paths.rb

Overview

Path helper methods for the CloudChannelService API.

Instance Method Summary collapse

Instance Method Details

Create a fully-qualified ChannelPartnerLink resource string.

The resource will be in the following format:

accounts/{account}/channelPartnerLinks/{channel_partner_link}

Parameters:

  • account (String)
  • channel_partner_link (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


38
39
40
41
42
# File 'lib/google/cloud/channel/v1/cloud_channel_service/paths.rb', line 38

def channel_partner_link_path account:, channel_partner_link:
  raise ::ArgumentError, "account cannot contain /" if .to_s.include? "/"

  "accounts/#{}/channelPartnerLinks/#{channel_partner_link}"
end

#customer_path(account:, customer:) ⇒ ::String

Create a fully-qualified Customer resource string.

The resource will be in the following format:

accounts/{account}/customers/{customer}

Parameters:

  • account (String)
  • customer (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


55
56
57
58
59
# File 'lib/google/cloud/channel/v1/cloud_channel_service/paths.rb', line 55

def customer_path account:, customer:
  raise ::ArgumentError, "account cannot contain /" if .to_s.include? "/"

  "accounts/#{}/customers/#{customer}"
end

#entitlement_path(account:, customer:, entitlement:) ⇒ ::String

Create a fully-qualified Entitlement resource string.

The resource will be in the following format:

accounts/{account}/customers/{customer}/entitlements/{entitlement}

Parameters:

  • account (String)
  • customer (String)
  • entitlement (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


73
74
75
76
77
78
# File 'lib/google/cloud/channel/v1/cloud_channel_service/paths.rb', line 73

def entitlement_path account:, customer:, entitlement:
  raise ::ArgumentError, "account cannot contain /" if .to_s.include? "/"
  raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/"

  "accounts/#{}/customers/#{customer}/entitlements/#{entitlement}"
end

#offer_path(account:, offer:) ⇒ ::String

Create a fully-qualified Offer resource string.

The resource will be in the following format:

accounts/{account}/offers/{offer}

Parameters:

  • account (String)
  • offer (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


91
92
93
94
95
# File 'lib/google/cloud/channel/v1/cloud_channel_service/paths.rb', line 91

def offer_path account:, offer:
  raise ::ArgumentError, "account cannot contain /" if .to_s.include? "/"

  "accounts/#{}/offers/#{offer}"
end

#product_path(product:) ⇒ ::String

Create a fully-qualified Product resource string.

The resource will be in the following format:

products/{product}

Parameters:

  • product (String)

Returns:

  • (::String)


107
108
109
# File 'lib/google/cloud/channel/v1/cloud_channel_service/paths.rb', line 107

def product_path product:
  "products/#{product}"
end