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