Module: Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb

Overview

Path helper methods for the LfpInventoryService 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)


38
39
40
# File 'lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb', line 38

def  account:
  "accounts/#{}"
end

#lfp_inventory_path(account:, target_merchant:, store_code:, offer:) ⇒ ::String

Create a fully-qualified LfpInventory resource string.

The resource will be in the following format:

accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}

Parameters:

  • account (String)
  • target_merchant (String)
  • store_code (String)
  • offer (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


55
56
57
58
59
60
61
# File 'lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb', line 55

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

  "accounts/#{}/lfpInventories/#{target_merchant}~#{store_code}~#{offer}"
end