Module: Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb
Overview
Path helper methods for the LocalInventoryService API.
Instance Method Summary collapse
-
#local_inventory_path(account:, product:, store_code:) ⇒ ::String
Create a fully-qualified LocalInventory resource string.
-
#product_path(account:, product:) ⇒ ::String
Create a fully-qualified Product resource string.
Instance Method Details
#local_inventory_path(account:, product:, store_code:) ⇒ ::String
Create a fully-qualified LocalInventory resource string.
The resource will be in the following format:
accounts/{account}/products/{product}/localInventories/{store_code}
40 41 42 43 44 45 |
# File 'lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb', line 40 def local_inventory_path account:, product:, store_code: raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" "accounts/#{account}/products/#{product}/localInventories/#{store_code}" end |
#product_path(account:, product:) ⇒ ::String
Create a fully-qualified Product resource string.
The resource will be in the following format:
accounts/{account}/products/{product}
58 59 60 61 62 |
# File 'lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb', line 58 def product_path account:, product: raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" "accounts/#{account}/products/#{product}" end |