Module: Google::Shopping::Css::V1::CssProductsService::Paths

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

Overview

Path helper methods for the CssProductsService API.

Instance Method Summary collapse

Instance Method Details

#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/css_products_service/paths.rb', line 37

def  account:
  "accounts/#{}"
end

#css_product_path(account:, css_product:) ⇒ ::String

Create a fully-qualified CssProduct resource string.

The resource will be in the following format:

accounts/{account}/cssProducts/{css_product}

Parameters:

  • account (String)
  • css_product (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "accounts/#{}/cssProducts/#{css_product}"
end