Module: Google::Shopping::Css::V1::AccountLabelsService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/shopping/css/v1/account_labels_service/paths.rb

Overview

Path helper methods for the AccountLabelsService API.

Instance Method Summary collapse

Instance Method Details

#account_label_path(account:, label:) ⇒ ::String

Create a fully-qualified AccountLabel resource string.

The resource will be in the following format:

accounts/{account}/labels/{label}

Parameters:

  • account (String)
  • label (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


52
53
54
55
56
# File 'lib/google/shopping/css/v1/account_labels_service/paths.rb', line 52

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

  "accounts/#{}/labels/#{label}"
end

#account_path(account:) ⇒ ::String

Create a fully-qualified Account resource string.

The resource will be in the following format:

accounts/{account}

Parameters:

  • account (String)

Returns:

  • (::String)


37
38
39
# File 'lib/google/shopping/css/v1/account_labels_service/paths.rb', line 37

def  account:
  "accounts/#{}"
end