Class: Google::Apis::MerchantapiLfpV1beta::MerchantService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::MerchantapiLfpV1beta::MerchantService
- Defined in:
- lib/google/apis/merchantapi_lfp_v1beta/service.rb
Overview
Merchant API
Programmatically manage your Merchant Center Accounts.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://merchantapi.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#delete_account_lfp_store(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiLfpV1beta::Empty
Deletes a store for a target merchant.
-
#get_account_lfp_merchant_state(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiLfpV1beta::LfpMerchantState
Gets the LFP state of a merchant.
-
#get_account_lfp_store(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiLfpV1beta::LfpStore
Retrieves information about a store.
-
#initialize ⇒ MerchantService
constructor
A new instance of MerchantService.
-
#insert_account_lfp_inventory(parent, lfp_inventory_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiLfpV1beta::LfpInventory
Inserts a
LfpInventoryresource for the given target merchant account. -
#insert_account_lfp_sale(parent, lfp_sale_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiLfpV1beta::LfpSale
Inserts a
LfpSalefor the given merchant. -
#insert_account_lfp_store(parent, lfp_store_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiLfpV1beta::LfpStore
Inserts a store for the target merchant.
-
#list_account_lfp_stores(parent, page_size: nil, page_token: nil, target_account: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiLfpV1beta::ListLfpStoresResponse
Lists the stores of the target merchant, specified by the filter in
ListLfpStoresRequest.
Constructor Details
#initialize ⇒ MerchantService
Returns a new instance of MerchantService.
47 48 49 50 51 52 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-merchantapi_lfp_v1beta', client_version: Google::Apis::MerchantapiLfpV1beta::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
40 41 42 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/service.rb', line 40 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
45 46 47 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#delete_account_lfp_store(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiLfpV1beta::Empty
Deletes a store for a target merchant.
175 176 177 178 179 180 181 182 183 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/service.rb', line 175 def delete_account_lfp_store(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'lfp/v1beta/{+name}', ) command.response_representation = Google::Apis::MerchantapiLfpV1beta::Empty::Representation command.response_class = Google::Apis::MerchantapiLfpV1beta::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_account_lfp_merchant_state(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiLfpV1beta::LfpMerchantState
Gets the LFP state of a merchant
111 112 113 114 115 116 117 118 119 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/service.rb', line 111 def get_account_lfp_merchant_state(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'lfp/v1beta/{+name}', ) command.response_representation = Google::Apis::MerchantapiLfpV1beta::LfpMerchantState::Representation command.response_class = Google::Apis::MerchantapiLfpV1beta::LfpMerchantState command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_account_lfp_store(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiLfpV1beta::LfpStore
Retrieves information about a store.
206 207 208 209 210 211 212 213 214 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/service.rb', line 206 def get_account_lfp_store(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'lfp/v1beta/{+name}', ) command.response_representation = Google::Apis::MerchantapiLfpV1beta::LfpStore::Representation command.response_class = Google::Apis::MerchantapiLfpV1beta::LfpStore command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_account_lfp_inventory(parent, lfp_inventory_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiLfpV1beta::LfpInventory
Inserts a LfpInventory resource for the given target merchant account. If
the resource already exists, it will be replaced. The inventory automatically
expires after 30 days.
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/service.rb', line 77 def insert_account_lfp_inventory(parent, lfp_inventory_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'lfp/v1beta/{+parent}/lfpInventories:insert', ) command.request_representation = Google::Apis::MerchantapiLfpV1beta::LfpInventory::Representation command.request_object = lfp_inventory_object command.response_representation = Google::Apis::MerchantapiLfpV1beta::LfpInventory::Representation command.response_class = Google::Apis::MerchantapiLfpV1beta::LfpInventory command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_account_lfp_sale(parent, lfp_sale_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiLfpV1beta::LfpSale
Inserts a LfpSale for the given merchant.
142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/service.rb', line 142 def insert_account_lfp_sale(parent, lfp_sale_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'lfp/v1beta/{+parent}/lfpSales:insert', ) command.request_representation = Google::Apis::MerchantapiLfpV1beta::LfpSale::Representation command.request_object = lfp_sale_object command.response_representation = Google::Apis::MerchantapiLfpV1beta::LfpSale::Representation command.response_class = Google::Apis::MerchantapiLfpV1beta::LfpSale command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_account_lfp_store(parent, lfp_store_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiLfpV1beta::LfpStore
Inserts a store for the target merchant. If the store with the same store code already exists, it will be replaced.
238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/service.rb', line 238 def insert_account_lfp_store(parent, lfp_store_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'lfp/v1beta/{+parent}/lfpStores:insert', ) command.request_representation = Google::Apis::MerchantapiLfpV1beta::LfpStore::Representation command.request_object = lfp_store_object command.response_representation = Google::Apis::MerchantapiLfpV1beta::LfpStore::Representation command.response_class = Google::Apis::MerchantapiLfpV1beta::LfpStore command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_account_lfp_stores(parent, page_size: nil, page_token: nil, target_account: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiLfpV1beta::ListLfpStoresResponse
Lists the stores of the target merchant, specified by the filter in
ListLfpStoresRequest.
285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/service.rb', line 285 def list_account_lfp_stores(parent, page_size: nil, page_token: nil, target_account: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'lfp/v1beta/{+parent}/lfpStores', ) command.response_representation = Google::Apis::MerchantapiLfpV1beta::ListLfpStoresResponse::Representation command.response_class = Google::Apis::MerchantapiLfpV1beta::ListLfpStoresResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['targetAccount'] = target_account unless target_account.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |