google-apis-content_v2 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3396 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module ContentV2
23
+ # Content API for Shopping
24
+ #
25
+ # Manage your product listings and accounts for Google Shopping
26
+ #
27
+ # @example
28
+ # require 'google/apis/content_v2'
29
+ #
30
+ # Content = Google::Apis::ContentV2 # Alias the module
31
+ # service = Content::ShoppingContentService.new
32
+ #
33
+ # @see https://developers.google.com/shopping-content/v2/
34
+ class ShoppingContentService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://shoppingcontent.googleapis.com/', '',
47
+ client_name: 'google-apis-content_v2',
48
+ client_version: Google::Apis::ContentV2::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Returns information about the authenticated user.
53
+ # @param [String] fields
54
+ # Selector specifying which fields to include in a partial response.
55
+ # @param [String] quota_user
56
+ # Available to use for quota purposes for server-side applications. Can be any
57
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
58
+ # @param [Google::Apis::RequestOptions] options
59
+ # Request-specific options
60
+ #
61
+ # @yield [result, err] Result & error if block supplied
62
+ # @yieldparam result [Google::Apis::ContentV2::AccountsAuthInfoResponse] parsed result object
63
+ # @yieldparam err [StandardError] error object if request failed
64
+ #
65
+ # @return [Google::Apis::ContentV2::AccountsAuthInfoResponse]
66
+ #
67
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
68
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
69
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
70
+ def get_account_authinfo(fields: nil, quota_user: nil, options: nil, &block)
71
+ command = make_simple_command(:get, 'content/v2/accounts/authinfo', options)
72
+ command.response_representation = Google::Apis::ContentV2::AccountsAuthInfoResponse::Representation
73
+ command.response_class = Google::Apis::ContentV2::AccountsAuthInfoResponse
74
+ command.query['fields'] = fields unless fields.nil?
75
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
76
+ execute_or_queue_command(command, &block)
77
+ end
78
+
79
+ # Claims the website of a Merchant Center sub-account.
80
+ # @param [Fixnum] merchant_id
81
+ # The ID of the managing account. If this parameter is not the same as accountId,
82
+ # then this account must be a multi-client account and `accountId` must be the
83
+ # ID of a sub-account of this account.
84
+ # @param [Fixnum] account_id
85
+ # The ID of the account whose website is claimed.
86
+ # @param [Boolean] overwrite
87
+ # Only available to selected merchants. When set to `True`, this flag removes
88
+ # any existing claim on the requested website by another account and replaces it
89
+ # with a claim from this account.
90
+ # @param [String] fields
91
+ # Selector specifying which fields to include in a partial response.
92
+ # @param [String] quota_user
93
+ # Available to use for quota purposes for server-side applications. Can be any
94
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
95
+ # @param [Google::Apis::RequestOptions] options
96
+ # Request-specific options
97
+ #
98
+ # @yield [result, err] Result & error if block supplied
99
+ # @yieldparam result [Google::Apis::ContentV2::AccountsClaimWebsiteResponse] parsed result object
100
+ # @yieldparam err [StandardError] error object if request failed
101
+ #
102
+ # @return [Google::Apis::ContentV2::AccountsClaimWebsiteResponse]
103
+ #
104
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
105
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
106
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
107
+ def claimwebsite_account(merchant_id, account_id, overwrite: nil, fields: nil, quota_user: nil, options: nil, &block)
108
+ command = make_simple_command(:post, 'content/v2/{merchantId}/accounts/{accountId}/claimwebsite', options)
109
+ command.response_representation = Google::Apis::ContentV2::AccountsClaimWebsiteResponse::Representation
110
+ command.response_class = Google::Apis::ContentV2::AccountsClaimWebsiteResponse
111
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
112
+ command.params['accountId'] = account_id unless account_id.nil?
113
+ command.query['overwrite'] = overwrite unless overwrite.nil?
114
+ command.query['fields'] = fields unless fields.nil?
115
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
116
+ execute_or_queue_command(command, &block)
117
+ end
118
+
119
+ # Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)
120
+ # accounts in a single request.
121
+ # @param [Google::Apis::ContentV2::BatchAccountsRequest] batch_accounts_request_object
122
+ # @param [Boolean] dry_run
123
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
124
+ # mode checks the validity of the request and returns errors (if any).
125
+ # @param [String] fields
126
+ # Selector specifying which fields to include in a partial response.
127
+ # @param [String] quota_user
128
+ # Available to use for quota purposes for server-side applications. Can be any
129
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
130
+ # @param [Google::Apis::RequestOptions] options
131
+ # Request-specific options
132
+ #
133
+ # @yield [result, err] Result & error if block supplied
134
+ # @yieldparam result [Google::Apis::ContentV2::BatchAccountsResponse] parsed result object
135
+ # @yieldparam err [StandardError] error object if request failed
136
+ #
137
+ # @return [Google::Apis::ContentV2::BatchAccountsResponse]
138
+ #
139
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
140
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
141
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
142
+ def batch_account(batch_accounts_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
143
+ command = make_simple_command(:post, 'content/v2/accounts/batch', options)
144
+ command.request_representation = Google::Apis::ContentV2::BatchAccountsRequest::Representation
145
+ command.request_object = batch_accounts_request_object
146
+ command.response_representation = Google::Apis::ContentV2::BatchAccountsResponse::Representation
147
+ command.response_class = Google::Apis::ContentV2::BatchAccountsResponse
148
+ command.query['dryRun'] = dry_run unless dry_run.nil?
149
+ command.query['fields'] = fields unless fields.nil?
150
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
151
+ execute_or_queue_command(command, &block)
152
+ end
153
+
154
+ # Deletes a Merchant Center sub-account.
155
+ # @param [Fixnum] merchant_id
156
+ # The ID of the managing account. This must be a multi-client account, and
157
+ # accountId must be the ID of a sub-account of this account.
158
+ # @param [Fixnum] account_id
159
+ # The ID of the account.
160
+ # @param [Boolean] dry_run
161
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
162
+ # mode checks the validity of the request and returns errors (if any).
163
+ # @param [Boolean] force
164
+ # Flag to delete sub-accounts with products. The default value is false.
165
+ # @param [String] fields
166
+ # Selector specifying which fields to include in a partial response.
167
+ # @param [String] quota_user
168
+ # Available to use for quota purposes for server-side applications. Can be any
169
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
170
+ # @param [Google::Apis::RequestOptions] options
171
+ # Request-specific options
172
+ #
173
+ # @yield [result, err] Result & error if block supplied
174
+ # @yieldparam result [NilClass] No result returned for this method
175
+ # @yieldparam err [StandardError] error object if request failed
176
+ #
177
+ # @return [void]
178
+ #
179
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
180
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
181
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
182
+ def delete_account(merchant_id, account_id, dry_run: nil, force: nil, fields: nil, quota_user: nil, options: nil, &block)
183
+ command = make_simple_command(:delete, 'content/v2/{merchantId}/accounts/{accountId}', options)
184
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
185
+ command.params['accountId'] = account_id unless account_id.nil?
186
+ command.query['dryRun'] = dry_run unless dry_run.nil?
187
+ command.query['force'] = force unless force.nil?
188
+ command.query['fields'] = fields unless fields.nil?
189
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
190
+ execute_or_queue_command(command, &block)
191
+ end
192
+
193
+ # Retrieves a Merchant Center account.
194
+ # @param [Fixnum] merchant_id
195
+ # The ID of the managing account. If this parameter is not the same as accountId,
196
+ # then this account must be a multi-client account and `accountId` must be the
197
+ # ID of a sub-account of this account.
198
+ # @param [Fixnum] account_id
199
+ # The ID of the account.
200
+ # @param [String] fields
201
+ # Selector specifying which fields to include in a partial response.
202
+ # @param [String] quota_user
203
+ # Available to use for quota purposes for server-side applications. Can be any
204
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
205
+ # @param [Google::Apis::RequestOptions] options
206
+ # Request-specific options
207
+ #
208
+ # @yield [result, err] Result & error if block supplied
209
+ # @yieldparam result [Google::Apis::ContentV2::Account] parsed result object
210
+ # @yieldparam err [StandardError] error object if request failed
211
+ #
212
+ # @return [Google::Apis::ContentV2::Account]
213
+ #
214
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
215
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
216
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
217
+ def get_account(merchant_id, account_id, fields: nil, quota_user: nil, options: nil, &block)
218
+ command = make_simple_command(:get, 'content/v2/{merchantId}/accounts/{accountId}', options)
219
+ command.response_representation = Google::Apis::ContentV2::Account::Representation
220
+ command.response_class = Google::Apis::ContentV2::Account
221
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
222
+ command.params['accountId'] = account_id unless account_id.nil?
223
+ command.query['fields'] = fields unless fields.nil?
224
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
225
+ execute_or_queue_command(command, &block)
226
+ end
227
+
228
+ # Creates a Merchant Center sub-account.
229
+ # @param [Fixnum] merchant_id
230
+ # The ID of the managing account. This must be a multi-client account.
231
+ # @param [Google::Apis::ContentV2::Account] account_object
232
+ # @param [Boolean] dry_run
233
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
234
+ # mode checks the validity of the request and returns errors (if any).
235
+ # @param [String] fields
236
+ # Selector specifying which fields to include in a partial response.
237
+ # @param [String] quota_user
238
+ # Available to use for quota purposes for server-side applications. Can be any
239
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
240
+ # @param [Google::Apis::RequestOptions] options
241
+ # Request-specific options
242
+ #
243
+ # @yield [result, err] Result & error if block supplied
244
+ # @yieldparam result [Google::Apis::ContentV2::Account] parsed result object
245
+ # @yieldparam err [StandardError] error object if request failed
246
+ #
247
+ # @return [Google::Apis::ContentV2::Account]
248
+ #
249
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
250
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
251
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
252
+ def insert_account(merchant_id, account_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
253
+ command = make_simple_command(:post, 'content/v2/{merchantId}/accounts', options)
254
+ command.request_representation = Google::Apis::ContentV2::Account::Representation
255
+ command.request_object = account_object
256
+ command.response_representation = Google::Apis::ContentV2::Account::Representation
257
+ command.response_class = Google::Apis::ContentV2::Account
258
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
259
+ command.query['dryRun'] = dry_run unless dry_run.nil?
260
+ command.query['fields'] = fields unless fields.nil?
261
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
262
+ execute_or_queue_command(command, &block)
263
+ end
264
+
265
+ # Performs an action on a link between two Merchant Center accounts, namely
266
+ # accountId and linkedAccountId.
267
+ # @param [Fixnum] merchant_id
268
+ # The ID of the managing account. If this parameter is not the same as accountId,
269
+ # then this account must be a multi-client account and `accountId` must be the
270
+ # ID of a sub-account of this account.
271
+ # @param [Fixnum] account_id
272
+ # The ID of the account that should be linked.
273
+ # @param [Google::Apis::ContentV2::AccountsLinkRequest] accounts_link_request_object
274
+ # @param [String] fields
275
+ # Selector specifying which fields to include in a partial response.
276
+ # @param [String] quota_user
277
+ # Available to use for quota purposes for server-side applications. Can be any
278
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
279
+ # @param [Google::Apis::RequestOptions] options
280
+ # Request-specific options
281
+ #
282
+ # @yield [result, err] Result & error if block supplied
283
+ # @yieldparam result [Google::Apis::ContentV2::AccountsLinkResponse] parsed result object
284
+ # @yieldparam err [StandardError] error object if request failed
285
+ #
286
+ # @return [Google::Apis::ContentV2::AccountsLinkResponse]
287
+ #
288
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
289
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
290
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
291
+ def link_account(merchant_id, account_id, accounts_link_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
292
+ command = make_simple_command(:post, 'content/v2/{merchantId}/accounts/{accountId}/link', options)
293
+ command.request_representation = Google::Apis::ContentV2::AccountsLinkRequest::Representation
294
+ command.request_object = accounts_link_request_object
295
+ command.response_representation = Google::Apis::ContentV2::AccountsLinkResponse::Representation
296
+ command.response_class = Google::Apis::ContentV2::AccountsLinkResponse
297
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
298
+ command.params['accountId'] = account_id unless account_id.nil?
299
+ command.query['fields'] = fields unless fields.nil?
300
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
301
+ execute_or_queue_command(command, &block)
302
+ end
303
+
304
+ # Lists the sub-accounts in your Merchant Center account.
305
+ # @param [Fixnum] merchant_id
306
+ # The ID of the managing account. This must be a multi-client account.
307
+ # @param [Fixnum] max_results
308
+ # The maximum number of accounts to return in the response, used for paging.
309
+ # @param [String] page_token
310
+ # The token returned by the previous request.
311
+ # @param [String] fields
312
+ # Selector specifying which fields to include in a partial response.
313
+ # @param [String] quota_user
314
+ # Available to use for quota purposes for server-side applications. Can be any
315
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
316
+ # @param [Google::Apis::RequestOptions] options
317
+ # Request-specific options
318
+ #
319
+ # @yield [result, err] Result & error if block supplied
320
+ # @yieldparam result [Google::Apis::ContentV2::ListAccountsResponse] parsed result object
321
+ # @yieldparam err [StandardError] error object if request failed
322
+ #
323
+ # @return [Google::Apis::ContentV2::ListAccountsResponse]
324
+ #
325
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
326
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
327
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
328
+ def list_accounts(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
329
+ command = make_simple_command(:get, 'content/v2/{merchantId}/accounts', options)
330
+ command.response_representation = Google::Apis::ContentV2::ListAccountsResponse::Representation
331
+ command.response_class = Google::Apis::ContentV2::ListAccountsResponse
332
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
333
+ command.query['maxResults'] = max_results unless max_results.nil?
334
+ command.query['pageToken'] = page_token unless page_token.nil?
335
+ command.query['fields'] = fields unless fields.nil?
336
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
337
+ execute_or_queue_command(command, &block)
338
+ end
339
+
340
+ # Updates a Merchant Center account. Any fields that are not provided are
341
+ # deleted from the resource.
342
+ # @param [Fixnum] merchant_id
343
+ # The ID of the managing account. If this parameter is not the same as accountId,
344
+ # then this account must be a multi-client account and `accountId` must be the
345
+ # ID of a sub-account of this account.
346
+ # @param [Fixnum] account_id
347
+ # The ID of the account.
348
+ # @param [Google::Apis::ContentV2::Account] account_object
349
+ # @param [Boolean] dry_run
350
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
351
+ # mode checks the validity of the request and returns errors (if any).
352
+ # @param [String] fields
353
+ # Selector specifying which fields to include in a partial response.
354
+ # @param [String] quota_user
355
+ # Available to use for quota purposes for server-side applications. Can be any
356
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
357
+ # @param [Google::Apis::RequestOptions] options
358
+ # Request-specific options
359
+ #
360
+ # @yield [result, err] Result & error if block supplied
361
+ # @yieldparam result [Google::Apis::ContentV2::Account] parsed result object
362
+ # @yieldparam err [StandardError] error object if request failed
363
+ #
364
+ # @return [Google::Apis::ContentV2::Account]
365
+ #
366
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
367
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
368
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
369
+ def update_account(merchant_id, account_id, account_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
370
+ command = make_simple_command(:put, 'content/v2/{merchantId}/accounts/{accountId}', options)
371
+ command.request_representation = Google::Apis::ContentV2::Account::Representation
372
+ command.request_object = account_object
373
+ command.response_representation = Google::Apis::ContentV2::Account::Representation
374
+ command.response_class = Google::Apis::ContentV2::Account
375
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
376
+ command.params['accountId'] = account_id unless account_id.nil?
377
+ command.query['dryRun'] = dry_run unless dry_run.nil?
378
+ command.query['fields'] = fields unless fields.nil?
379
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
380
+ execute_or_queue_command(command, &block)
381
+ end
382
+
383
+ # Retrieves multiple Merchant Center account statuses in a single request.
384
+ # @param [Google::Apis::ContentV2::BatchAccountStatusesRequest] batch_account_statuses_request_object
385
+ # @param [String] fields
386
+ # Selector specifying which fields to include in a partial response.
387
+ # @param [String] quota_user
388
+ # Available to use for quota purposes for server-side applications. Can be any
389
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
390
+ # @param [Google::Apis::RequestOptions] options
391
+ # Request-specific options
392
+ #
393
+ # @yield [result, err] Result & error if block supplied
394
+ # @yieldparam result [Google::Apis::ContentV2::BatchAccountStatusesResponse] parsed result object
395
+ # @yieldparam err [StandardError] error object if request failed
396
+ #
397
+ # @return [Google::Apis::ContentV2::BatchAccountStatusesResponse]
398
+ #
399
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
400
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
401
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
402
+ def batch_account_status(batch_account_statuses_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
403
+ command = make_simple_command(:post, 'content/v2/accountstatuses/batch', options)
404
+ command.request_representation = Google::Apis::ContentV2::BatchAccountStatusesRequest::Representation
405
+ command.request_object = batch_account_statuses_request_object
406
+ command.response_representation = Google::Apis::ContentV2::BatchAccountStatusesResponse::Representation
407
+ command.response_class = Google::Apis::ContentV2::BatchAccountStatusesResponse
408
+ command.query['fields'] = fields unless fields.nil?
409
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
410
+ execute_or_queue_command(command, &block)
411
+ end
412
+
413
+ # Retrieves the status of a Merchant Center account. No itemLevelIssues are
414
+ # returned for multi-client accounts.
415
+ # @param [Fixnum] merchant_id
416
+ # The ID of the managing account. If this parameter is not the same as accountId,
417
+ # then this account must be a multi-client account and `accountId` must be the
418
+ # ID of a sub-account of this account.
419
+ # @param [Fixnum] account_id
420
+ # The ID of the account.
421
+ # @param [Array<String>, String] destinations
422
+ # If set, only issues for the specified destinations are returned, otherwise
423
+ # only issues for the Shopping destination.
424
+ # @param [String] fields
425
+ # Selector specifying which fields to include in a partial response.
426
+ # @param [String] quota_user
427
+ # Available to use for quota purposes for server-side applications. Can be any
428
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
429
+ # @param [Google::Apis::RequestOptions] options
430
+ # Request-specific options
431
+ #
432
+ # @yield [result, err] Result & error if block supplied
433
+ # @yieldparam result [Google::Apis::ContentV2::AccountStatus] parsed result object
434
+ # @yieldparam err [StandardError] error object if request failed
435
+ #
436
+ # @return [Google::Apis::ContentV2::AccountStatus]
437
+ #
438
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
439
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
440
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
441
+ def get_account_status(merchant_id, account_id, destinations: nil, fields: nil, quota_user: nil, options: nil, &block)
442
+ command = make_simple_command(:get, 'content/v2/{merchantId}/accountstatuses/{accountId}', options)
443
+ command.response_representation = Google::Apis::ContentV2::AccountStatus::Representation
444
+ command.response_class = Google::Apis::ContentV2::AccountStatus
445
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
446
+ command.params['accountId'] = account_id unless account_id.nil?
447
+ command.query['destinations'] = destinations unless destinations.nil?
448
+ command.query['fields'] = fields unless fields.nil?
449
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
450
+ execute_or_queue_command(command, &block)
451
+ end
452
+
453
+ # Lists the statuses of the sub-accounts in your Merchant Center account.
454
+ # @param [Fixnum] merchant_id
455
+ # The ID of the managing account. This must be a multi-client account.
456
+ # @param [Array<String>, String] destinations
457
+ # If set, only issues for the specified destinations are returned, otherwise
458
+ # only issues for the Shopping destination.
459
+ # @param [Fixnum] max_results
460
+ # The maximum number of account statuses to return in the response, used for
461
+ # paging.
462
+ # @param [String] page_token
463
+ # The token returned by the previous request.
464
+ # @param [String] fields
465
+ # Selector specifying which fields to include in a partial response.
466
+ # @param [String] quota_user
467
+ # Available to use for quota purposes for server-side applications. Can be any
468
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
469
+ # @param [Google::Apis::RequestOptions] options
470
+ # Request-specific options
471
+ #
472
+ # @yield [result, err] Result & error if block supplied
473
+ # @yieldparam result [Google::Apis::ContentV2::ListAccountStatusesResponse] parsed result object
474
+ # @yieldparam err [StandardError] error object if request failed
475
+ #
476
+ # @return [Google::Apis::ContentV2::ListAccountStatusesResponse]
477
+ #
478
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
479
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
480
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
481
+ def list_account_statuses(merchant_id, destinations: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
482
+ command = make_simple_command(:get, 'content/v2/{merchantId}/accountstatuses', options)
483
+ command.response_representation = Google::Apis::ContentV2::ListAccountStatusesResponse::Representation
484
+ command.response_class = Google::Apis::ContentV2::ListAccountStatusesResponse
485
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
486
+ command.query['destinations'] = destinations unless destinations.nil?
487
+ command.query['maxResults'] = max_results unless max_results.nil?
488
+ command.query['pageToken'] = page_token unless page_token.nil?
489
+ command.query['fields'] = fields unless fields.nil?
490
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
491
+ execute_or_queue_command(command, &block)
492
+ end
493
+
494
+ # Retrieves and updates tax settings of multiple accounts in a single request.
495
+ # @param [Google::Apis::ContentV2::BatchAccountTaxRequest] batch_account_tax_request_object
496
+ # @param [Boolean] dry_run
497
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
498
+ # mode checks the validity of the request and returns errors (if any).
499
+ # @param [String] fields
500
+ # Selector specifying which fields to include in a partial response.
501
+ # @param [String] quota_user
502
+ # Available to use for quota purposes for server-side applications. Can be any
503
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
504
+ # @param [Google::Apis::RequestOptions] options
505
+ # Request-specific options
506
+ #
507
+ # @yield [result, err] Result & error if block supplied
508
+ # @yieldparam result [Google::Apis::ContentV2::BatchAccountTaxResponse] parsed result object
509
+ # @yieldparam err [StandardError] error object if request failed
510
+ #
511
+ # @return [Google::Apis::ContentV2::BatchAccountTaxResponse]
512
+ #
513
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
514
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
515
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
516
+ def batch_account_tax(batch_account_tax_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
517
+ command = make_simple_command(:post, 'content/v2/accounttax/batch', options)
518
+ command.request_representation = Google::Apis::ContentV2::BatchAccountTaxRequest::Representation
519
+ command.request_object = batch_account_tax_request_object
520
+ command.response_representation = Google::Apis::ContentV2::BatchAccountTaxResponse::Representation
521
+ command.response_class = Google::Apis::ContentV2::BatchAccountTaxResponse
522
+ command.query['dryRun'] = dry_run unless dry_run.nil?
523
+ command.query['fields'] = fields unless fields.nil?
524
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
525
+ execute_or_queue_command(command, &block)
526
+ end
527
+
528
+ # Retrieves the tax settings of the account.
529
+ # @param [Fixnum] merchant_id
530
+ # The ID of the managing account. If this parameter is not the same as accountId,
531
+ # then this account must be a multi-client account and `accountId` must be the
532
+ # ID of a sub-account of this account.
533
+ # @param [Fixnum] account_id
534
+ # The ID of the account for which to get/update account tax settings.
535
+ # @param [String] fields
536
+ # Selector specifying which fields to include in a partial response.
537
+ # @param [String] quota_user
538
+ # Available to use for quota purposes for server-side applications. Can be any
539
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
540
+ # @param [Google::Apis::RequestOptions] options
541
+ # Request-specific options
542
+ #
543
+ # @yield [result, err] Result & error if block supplied
544
+ # @yieldparam result [Google::Apis::ContentV2::AccountTax] parsed result object
545
+ # @yieldparam err [StandardError] error object if request failed
546
+ #
547
+ # @return [Google::Apis::ContentV2::AccountTax]
548
+ #
549
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
550
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
551
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
552
+ def get_account_tax(merchant_id, account_id, fields: nil, quota_user: nil, options: nil, &block)
553
+ command = make_simple_command(:get, 'content/v2/{merchantId}/accounttax/{accountId}', options)
554
+ command.response_representation = Google::Apis::ContentV2::AccountTax::Representation
555
+ command.response_class = Google::Apis::ContentV2::AccountTax
556
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
557
+ command.params['accountId'] = account_id unless account_id.nil?
558
+ command.query['fields'] = fields unless fields.nil?
559
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
560
+ execute_or_queue_command(command, &block)
561
+ end
562
+
563
+ # Lists the tax settings of the sub-accounts in your Merchant Center account.
564
+ # @param [Fixnum] merchant_id
565
+ # The ID of the managing account. This must be a multi-client account.
566
+ # @param [Fixnum] max_results
567
+ # The maximum number of tax settings to return in the response, used for paging.
568
+ # @param [String] page_token
569
+ # The token returned by the previous request.
570
+ # @param [String] fields
571
+ # Selector specifying which fields to include in a partial response.
572
+ # @param [String] quota_user
573
+ # Available to use for quota purposes for server-side applications. Can be any
574
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
575
+ # @param [Google::Apis::RequestOptions] options
576
+ # Request-specific options
577
+ #
578
+ # @yield [result, err] Result & error if block supplied
579
+ # @yieldparam result [Google::Apis::ContentV2::ListAccountTaxResponse] parsed result object
580
+ # @yieldparam err [StandardError] error object if request failed
581
+ #
582
+ # @return [Google::Apis::ContentV2::ListAccountTaxResponse]
583
+ #
584
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
585
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
586
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
587
+ def list_account_taxes(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
588
+ command = make_simple_command(:get, 'content/v2/{merchantId}/accounttax', options)
589
+ command.response_representation = Google::Apis::ContentV2::ListAccountTaxResponse::Representation
590
+ command.response_class = Google::Apis::ContentV2::ListAccountTaxResponse
591
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
592
+ command.query['maxResults'] = max_results unless max_results.nil?
593
+ command.query['pageToken'] = page_token unless page_token.nil?
594
+ command.query['fields'] = fields unless fields.nil?
595
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
596
+ execute_or_queue_command(command, &block)
597
+ end
598
+
599
+ # Updates the tax settings of the account. Any fields that are not provided are
600
+ # deleted from the resource.
601
+ # @param [Fixnum] merchant_id
602
+ # The ID of the managing account. If this parameter is not the same as accountId,
603
+ # then this account must be a multi-client account and `accountId` must be the
604
+ # ID of a sub-account of this account.
605
+ # @param [Fixnum] account_id
606
+ # The ID of the account for which to get/update account tax settings.
607
+ # @param [Google::Apis::ContentV2::AccountTax] account_tax_object
608
+ # @param [Boolean] dry_run
609
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
610
+ # mode checks the validity of the request and returns errors (if any).
611
+ # @param [String] fields
612
+ # Selector specifying which fields to include in a partial response.
613
+ # @param [String] quota_user
614
+ # Available to use for quota purposes for server-side applications. Can be any
615
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
616
+ # @param [Google::Apis::RequestOptions] options
617
+ # Request-specific options
618
+ #
619
+ # @yield [result, err] Result & error if block supplied
620
+ # @yieldparam result [Google::Apis::ContentV2::AccountTax] parsed result object
621
+ # @yieldparam err [StandardError] error object if request failed
622
+ #
623
+ # @return [Google::Apis::ContentV2::AccountTax]
624
+ #
625
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
626
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
627
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
628
+ def update_account_tax(merchant_id, account_id, account_tax_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
629
+ command = make_simple_command(:put, 'content/v2/{merchantId}/accounttax/{accountId}', options)
630
+ command.request_representation = Google::Apis::ContentV2::AccountTax::Representation
631
+ command.request_object = account_tax_object
632
+ command.response_representation = Google::Apis::ContentV2::AccountTax::Representation
633
+ command.response_class = Google::Apis::ContentV2::AccountTax
634
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
635
+ command.params['accountId'] = account_id unless account_id.nil?
636
+ command.query['dryRun'] = dry_run unless dry_run.nil?
637
+ command.query['fields'] = fields unless fields.nil?
638
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
639
+ execute_or_queue_command(command, &block)
640
+ end
641
+
642
+ # Deletes, fetches, gets, inserts and updates multiple datafeeds in a single
643
+ # request.
644
+ # @param [Google::Apis::ContentV2::BatchDatafeedsRequest] batch_datafeeds_request_object
645
+ # @param [Boolean] dry_run
646
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
647
+ # mode checks the validity of the request and returns errors (if any).
648
+ # @param [String] fields
649
+ # Selector specifying which fields to include in a partial response.
650
+ # @param [String] quota_user
651
+ # Available to use for quota purposes for server-side applications. Can be any
652
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
653
+ # @param [Google::Apis::RequestOptions] options
654
+ # Request-specific options
655
+ #
656
+ # @yield [result, err] Result & error if block supplied
657
+ # @yieldparam result [Google::Apis::ContentV2::BatchDatafeedsResponse] parsed result object
658
+ # @yieldparam err [StandardError] error object if request failed
659
+ #
660
+ # @return [Google::Apis::ContentV2::BatchDatafeedsResponse]
661
+ #
662
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
663
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
664
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
665
+ def batch_datafeed(batch_datafeeds_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
666
+ command = make_simple_command(:post, 'content/v2/datafeeds/batch', options)
667
+ command.request_representation = Google::Apis::ContentV2::BatchDatafeedsRequest::Representation
668
+ command.request_object = batch_datafeeds_request_object
669
+ command.response_representation = Google::Apis::ContentV2::BatchDatafeedsResponse::Representation
670
+ command.response_class = Google::Apis::ContentV2::BatchDatafeedsResponse
671
+ command.query['dryRun'] = dry_run unless dry_run.nil?
672
+ command.query['fields'] = fields unless fields.nil?
673
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
674
+ execute_or_queue_command(command, &block)
675
+ end
676
+
677
+ # Deletes a datafeed configuration from your Merchant Center account.
678
+ # @param [Fixnum] merchant_id
679
+ # The ID of the account that manages the datafeed. This account cannot be a
680
+ # multi-client account.
681
+ # @param [Fixnum] datafeed_id
682
+ # The ID of the datafeed.
683
+ # @param [Boolean] dry_run
684
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
685
+ # mode checks the validity of the request and returns errors (if any).
686
+ # @param [String] fields
687
+ # Selector specifying which fields to include in a partial response.
688
+ # @param [String] quota_user
689
+ # Available to use for quota purposes for server-side applications. Can be any
690
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
691
+ # @param [Google::Apis::RequestOptions] options
692
+ # Request-specific options
693
+ #
694
+ # @yield [result, err] Result & error if block supplied
695
+ # @yieldparam result [NilClass] No result returned for this method
696
+ # @yieldparam err [StandardError] error object if request failed
697
+ #
698
+ # @return [void]
699
+ #
700
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
701
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
702
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
703
+ def delete_datafeed(merchant_id, datafeed_id, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
704
+ command = make_simple_command(:delete, 'content/v2/{merchantId}/datafeeds/{datafeedId}', options)
705
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
706
+ command.params['datafeedId'] = datafeed_id unless datafeed_id.nil?
707
+ command.query['dryRun'] = dry_run unless dry_run.nil?
708
+ command.query['fields'] = fields unless fields.nil?
709
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
710
+ execute_or_queue_command(command, &block)
711
+ end
712
+
713
+ # Invokes a fetch for the datafeed in your Merchant Center account. If you need
714
+ # to call this method more than once per day, we recommend you use the Products
715
+ # service to update your product data.
716
+ # @param [Fixnum] merchant_id
717
+ # The ID of the account that manages the datafeed. This account cannot be a
718
+ # multi-client account.
719
+ # @param [Fixnum] datafeed_id
720
+ # The ID of the datafeed to be fetched.
721
+ # @param [Boolean] dry_run
722
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
723
+ # mode checks the validity of the request and returns errors (if any).
724
+ # @param [String] fields
725
+ # Selector specifying which fields to include in a partial response.
726
+ # @param [String] quota_user
727
+ # Available to use for quota purposes for server-side applications. Can be any
728
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
729
+ # @param [Google::Apis::RequestOptions] options
730
+ # Request-specific options
731
+ #
732
+ # @yield [result, err] Result & error if block supplied
733
+ # @yieldparam result [Google::Apis::ContentV2::DatafeedsFetchNowResponse] parsed result object
734
+ # @yieldparam err [StandardError] error object if request failed
735
+ #
736
+ # @return [Google::Apis::ContentV2::DatafeedsFetchNowResponse]
737
+ #
738
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
739
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
740
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
741
+ def fetchnow_datafeed(merchant_id, datafeed_id, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
742
+ command = make_simple_command(:post, 'content/v2/{merchantId}/datafeeds/{datafeedId}/fetchNow', options)
743
+ command.response_representation = Google::Apis::ContentV2::DatafeedsFetchNowResponse::Representation
744
+ command.response_class = Google::Apis::ContentV2::DatafeedsFetchNowResponse
745
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
746
+ command.params['datafeedId'] = datafeed_id unless datafeed_id.nil?
747
+ command.query['dryRun'] = dry_run unless dry_run.nil?
748
+ command.query['fields'] = fields unless fields.nil?
749
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
750
+ execute_or_queue_command(command, &block)
751
+ end
752
+
753
+ # Retrieves a datafeed configuration from your Merchant Center account.
754
+ # @param [Fixnum] merchant_id
755
+ # The ID of the account that manages the datafeed. This account cannot be a
756
+ # multi-client account.
757
+ # @param [Fixnum] datafeed_id
758
+ # The ID of the datafeed.
759
+ # @param [String] fields
760
+ # Selector specifying which fields to include in a partial response.
761
+ # @param [String] quota_user
762
+ # Available to use for quota purposes for server-side applications. Can be any
763
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
764
+ # @param [Google::Apis::RequestOptions] options
765
+ # Request-specific options
766
+ #
767
+ # @yield [result, err] Result & error if block supplied
768
+ # @yieldparam result [Google::Apis::ContentV2::Datafeed] parsed result object
769
+ # @yieldparam err [StandardError] error object if request failed
770
+ #
771
+ # @return [Google::Apis::ContentV2::Datafeed]
772
+ #
773
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
774
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
775
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
776
+ def get_datafeed(merchant_id, datafeed_id, fields: nil, quota_user: nil, options: nil, &block)
777
+ command = make_simple_command(:get, 'content/v2/{merchantId}/datafeeds/{datafeedId}', options)
778
+ command.response_representation = Google::Apis::ContentV2::Datafeed::Representation
779
+ command.response_class = Google::Apis::ContentV2::Datafeed
780
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
781
+ command.params['datafeedId'] = datafeed_id unless datafeed_id.nil?
782
+ command.query['fields'] = fields unless fields.nil?
783
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
784
+ execute_or_queue_command(command, &block)
785
+ end
786
+
787
+ # Registers a datafeed configuration with your Merchant Center account.
788
+ # @param [Fixnum] merchant_id
789
+ # The ID of the account that manages the datafeed. This account cannot be a
790
+ # multi-client account.
791
+ # @param [Google::Apis::ContentV2::Datafeed] datafeed_object
792
+ # @param [Boolean] dry_run
793
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
794
+ # mode checks the validity of the request and returns errors (if any).
795
+ # @param [String] fields
796
+ # Selector specifying which fields to include in a partial response.
797
+ # @param [String] quota_user
798
+ # Available to use for quota purposes for server-side applications. Can be any
799
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
800
+ # @param [Google::Apis::RequestOptions] options
801
+ # Request-specific options
802
+ #
803
+ # @yield [result, err] Result & error if block supplied
804
+ # @yieldparam result [Google::Apis::ContentV2::Datafeed] parsed result object
805
+ # @yieldparam err [StandardError] error object if request failed
806
+ #
807
+ # @return [Google::Apis::ContentV2::Datafeed]
808
+ #
809
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
810
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
811
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
812
+ def insert_datafeed(merchant_id, datafeed_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
813
+ command = make_simple_command(:post, 'content/v2/{merchantId}/datafeeds', options)
814
+ command.request_representation = Google::Apis::ContentV2::Datafeed::Representation
815
+ command.request_object = datafeed_object
816
+ command.response_representation = Google::Apis::ContentV2::Datafeed::Representation
817
+ command.response_class = Google::Apis::ContentV2::Datafeed
818
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
819
+ command.query['dryRun'] = dry_run unless dry_run.nil?
820
+ command.query['fields'] = fields unless fields.nil?
821
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
822
+ execute_or_queue_command(command, &block)
823
+ end
824
+
825
+ # Lists the configurations for datafeeds in your Merchant Center account.
826
+ # @param [Fixnum] merchant_id
827
+ # The ID of the account that manages the datafeeds. This account cannot be a
828
+ # multi-client account.
829
+ # @param [Fixnum] max_results
830
+ # The maximum number of products to return in the response, used for paging.
831
+ # @param [String] page_token
832
+ # The token returned by the previous request.
833
+ # @param [String] fields
834
+ # Selector specifying which fields to include in a partial response.
835
+ # @param [String] quota_user
836
+ # Available to use for quota purposes for server-side applications. Can be any
837
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
838
+ # @param [Google::Apis::RequestOptions] options
839
+ # Request-specific options
840
+ #
841
+ # @yield [result, err] Result & error if block supplied
842
+ # @yieldparam result [Google::Apis::ContentV2::ListDatafeedsResponse] parsed result object
843
+ # @yieldparam err [StandardError] error object if request failed
844
+ #
845
+ # @return [Google::Apis::ContentV2::ListDatafeedsResponse]
846
+ #
847
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
848
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
849
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
850
+ def list_datafeeds(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
851
+ command = make_simple_command(:get, 'content/v2/{merchantId}/datafeeds', options)
852
+ command.response_representation = Google::Apis::ContentV2::ListDatafeedsResponse::Representation
853
+ command.response_class = Google::Apis::ContentV2::ListDatafeedsResponse
854
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
855
+ command.query['maxResults'] = max_results unless max_results.nil?
856
+ command.query['pageToken'] = page_token unless page_token.nil?
857
+ command.query['fields'] = fields unless fields.nil?
858
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
859
+ execute_or_queue_command(command, &block)
860
+ end
861
+
862
+ # Updates a datafeed configuration of your Merchant Center account. Any fields
863
+ # that are not provided are deleted from the resource.
864
+ # @param [Fixnum] merchant_id
865
+ # The ID of the account that manages the datafeed. This account cannot be a
866
+ # multi-client account.
867
+ # @param [Fixnum] datafeed_id
868
+ # The ID of the datafeed.
869
+ # @param [Google::Apis::ContentV2::Datafeed] datafeed_object
870
+ # @param [Boolean] dry_run
871
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
872
+ # mode checks the validity of the request and returns errors (if any).
873
+ # @param [String] fields
874
+ # Selector specifying which fields to include in a partial response.
875
+ # @param [String] quota_user
876
+ # Available to use for quota purposes for server-side applications. Can be any
877
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
878
+ # @param [Google::Apis::RequestOptions] options
879
+ # Request-specific options
880
+ #
881
+ # @yield [result, err] Result & error if block supplied
882
+ # @yieldparam result [Google::Apis::ContentV2::Datafeed] parsed result object
883
+ # @yieldparam err [StandardError] error object if request failed
884
+ #
885
+ # @return [Google::Apis::ContentV2::Datafeed]
886
+ #
887
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
888
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
889
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
890
+ def update_datafeed(merchant_id, datafeed_id, datafeed_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
891
+ command = make_simple_command(:put, 'content/v2/{merchantId}/datafeeds/{datafeedId}', options)
892
+ command.request_representation = Google::Apis::ContentV2::Datafeed::Representation
893
+ command.request_object = datafeed_object
894
+ command.response_representation = Google::Apis::ContentV2::Datafeed::Representation
895
+ command.response_class = Google::Apis::ContentV2::Datafeed
896
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
897
+ command.params['datafeedId'] = datafeed_id unless datafeed_id.nil?
898
+ command.query['dryRun'] = dry_run unless dry_run.nil?
899
+ command.query['fields'] = fields unless fields.nil?
900
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
901
+ execute_or_queue_command(command, &block)
902
+ end
903
+
904
+ # Gets multiple Merchant Center datafeed statuses in a single request.
905
+ # @param [Google::Apis::ContentV2::BatchDatafeedStatusesRequest] batch_datafeed_statuses_request_object
906
+ # @param [String] fields
907
+ # Selector specifying which fields to include in a partial response.
908
+ # @param [String] quota_user
909
+ # Available to use for quota purposes for server-side applications. Can be any
910
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
911
+ # @param [Google::Apis::RequestOptions] options
912
+ # Request-specific options
913
+ #
914
+ # @yield [result, err] Result & error if block supplied
915
+ # @yieldparam result [Google::Apis::ContentV2::BatchDatafeedStatusesResponse] parsed result object
916
+ # @yieldparam err [StandardError] error object if request failed
917
+ #
918
+ # @return [Google::Apis::ContentV2::BatchDatafeedStatusesResponse]
919
+ #
920
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
921
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
922
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
923
+ def batch_datafeed_status(batch_datafeed_statuses_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
924
+ command = make_simple_command(:post, 'content/v2/datafeedstatuses/batch', options)
925
+ command.request_representation = Google::Apis::ContentV2::BatchDatafeedStatusesRequest::Representation
926
+ command.request_object = batch_datafeed_statuses_request_object
927
+ command.response_representation = Google::Apis::ContentV2::BatchDatafeedStatusesResponse::Representation
928
+ command.response_class = Google::Apis::ContentV2::BatchDatafeedStatusesResponse
929
+ command.query['fields'] = fields unless fields.nil?
930
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
931
+ execute_or_queue_command(command, &block)
932
+ end
933
+
934
+ # Retrieves the status of a datafeed from your Merchant Center account.
935
+ # @param [Fixnum] merchant_id
936
+ # The ID of the account that manages the datafeed. This account cannot be a
937
+ # multi-client account.
938
+ # @param [Fixnum] datafeed_id
939
+ # The ID of the datafeed.
940
+ # @param [String] country
941
+ # The country for which to get the datafeed status. If this parameter is
942
+ # provided then language must also be provided. Note that this parameter is
943
+ # required for feeds targeting multiple countries and languages, since a feed
944
+ # may have a different status for each target.
945
+ # @param [String] language
946
+ # The language for which to get the datafeed status. If this parameter is
947
+ # provided then country must also be provided. Note that this parameter is
948
+ # required for feeds targeting multiple countries and languages, since a feed
949
+ # may have a different status for each target.
950
+ # @param [String] fields
951
+ # Selector specifying which fields to include in a partial response.
952
+ # @param [String] quota_user
953
+ # Available to use for quota purposes for server-side applications. Can be any
954
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
955
+ # @param [Google::Apis::RequestOptions] options
956
+ # Request-specific options
957
+ #
958
+ # @yield [result, err] Result & error if block supplied
959
+ # @yieldparam result [Google::Apis::ContentV2::DatafeedStatus] parsed result object
960
+ # @yieldparam err [StandardError] error object if request failed
961
+ #
962
+ # @return [Google::Apis::ContentV2::DatafeedStatus]
963
+ #
964
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
965
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
966
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
967
+ def get_datafeed_status(merchant_id, datafeed_id, country: nil, language: nil, fields: nil, quota_user: nil, options: nil, &block)
968
+ command = make_simple_command(:get, 'content/v2/{merchantId}/datafeedstatuses/{datafeedId}', options)
969
+ command.response_representation = Google::Apis::ContentV2::DatafeedStatus::Representation
970
+ command.response_class = Google::Apis::ContentV2::DatafeedStatus
971
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
972
+ command.params['datafeedId'] = datafeed_id unless datafeed_id.nil?
973
+ command.query['country'] = country unless country.nil?
974
+ command.query['language'] = language unless language.nil?
975
+ command.query['fields'] = fields unless fields.nil?
976
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
977
+ execute_or_queue_command(command, &block)
978
+ end
979
+
980
+ # Lists the statuses of the datafeeds in your Merchant Center account.
981
+ # @param [Fixnum] merchant_id
982
+ # The ID of the account that manages the datafeeds. This account cannot be a
983
+ # multi-client account.
984
+ # @param [Fixnum] max_results
985
+ # The maximum number of products to return in the response, used for paging.
986
+ # @param [String] page_token
987
+ # The token returned by the previous request.
988
+ # @param [String] fields
989
+ # Selector specifying which fields to include in a partial response.
990
+ # @param [String] quota_user
991
+ # Available to use for quota purposes for server-side applications. Can be any
992
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
993
+ # @param [Google::Apis::RequestOptions] options
994
+ # Request-specific options
995
+ #
996
+ # @yield [result, err] Result & error if block supplied
997
+ # @yieldparam result [Google::Apis::ContentV2::ListDatafeedStatusesResponse] parsed result object
998
+ # @yieldparam err [StandardError] error object if request failed
999
+ #
1000
+ # @return [Google::Apis::ContentV2::ListDatafeedStatusesResponse]
1001
+ #
1002
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1003
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1004
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1005
+ def list_datafeed_statuses(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1006
+ command = make_simple_command(:get, 'content/v2/{merchantId}/datafeedstatuses', options)
1007
+ command.response_representation = Google::Apis::ContentV2::ListDatafeedStatusesResponse::Representation
1008
+ command.response_class = Google::Apis::ContentV2::ListDatafeedStatusesResponse
1009
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1010
+ command.query['maxResults'] = max_results unless max_results.nil?
1011
+ command.query['pageToken'] = page_token unless page_token.nil?
1012
+ command.query['fields'] = fields unless fields.nil?
1013
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1014
+ execute_or_queue_command(command, &block)
1015
+ end
1016
+
1017
+ # Updates price and availability for multiple products or stores in a single
1018
+ # request. This operation does not update the expiration date of the products.
1019
+ # @param [Google::Apis::ContentV2::BatchInventoryRequest] batch_inventory_request_object
1020
+ # @param [Boolean] dry_run
1021
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
1022
+ # mode checks the validity of the request and returns errors (if any).
1023
+ # @param [String] fields
1024
+ # Selector specifying which fields to include in a partial response.
1025
+ # @param [String] quota_user
1026
+ # Available to use for quota purposes for server-side applications. Can be any
1027
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1028
+ # @param [Google::Apis::RequestOptions] options
1029
+ # Request-specific options
1030
+ #
1031
+ # @yield [result, err] Result & error if block supplied
1032
+ # @yieldparam result [Google::Apis::ContentV2::BatchInventoryResponse] parsed result object
1033
+ # @yieldparam err [StandardError] error object if request failed
1034
+ #
1035
+ # @return [Google::Apis::ContentV2::BatchInventoryResponse]
1036
+ #
1037
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1038
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1039
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1040
+ def batch_inventory(batch_inventory_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
1041
+ command = make_simple_command(:post, 'content/v2/inventory/batch', options)
1042
+ command.request_representation = Google::Apis::ContentV2::BatchInventoryRequest::Representation
1043
+ command.request_object = batch_inventory_request_object
1044
+ command.response_representation = Google::Apis::ContentV2::BatchInventoryResponse::Representation
1045
+ command.response_class = Google::Apis::ContentV2::BatchInventoryResponse
1046
+ command.query['dryRun'] = dry_run unless dry_run.nil?
1047
+ command.query['fields'] = fields unless fields.nil?
1048
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1049
+ execute_or_queue_command(command, &block)
1050
+ end
1051
+
1052
+ # Updates price and availability of a product in your Merchant Center account.
1053
+ # @param [Fixnum] merchant_id
1054
+ # The ID of the account that contains the product. This account cannot be a
1055
+ # multi-client account.
1056
+ # @param [String] store_code
1057
+ # The code of the store for which to update price and availability. Use `online`
1058
+ # to update price and availability of an online product.
1059
+ # @param [String] product_id
1060
+ # The REST ID of the product for which to update price and availability.
1061
+ # @param [Google::Apis::ContentV2::SetInventoryRequest] set_inventory_request_object
1062
+ # @param [Boolean] dry_run
1063
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
1064
+ # mode checks the validity of the request and returns errors (if any).
1065
+ # @param [String] fields
1066
+ # Selector specifying which fields to include in a partial response.
1067
+ # @param [String] quota_user
1068
+ # Available to use for quota purposes for server-side applications. Can be any
1069
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1070
+ # @param [Google::Apis::RequestOptions] options
1071
+ # Request-specific options
1072
+ #
1073
+ # @yield [result, err] Result & error if block supplied
1074
+ # @yieldparam result [Google::Apis::ContentV2::SetInventoryResponse] parsed result object
1075
+ # @yieldparam err [StandardError] error object if request failed
1076
+ #
1077
+ # @return [Google::Apis::ContentV2::SetInventoryResponse]
1078
+ #
1079
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1080
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1081
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1082
+ def set_inventory(merchant_id, store_code, product_id, set_inventory_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
1083
+ command = make_simple_command(:post, 'content/v2/{merchantId}/inventory/{storeCode}/products/{productId}', options)
1084
+ command.request_representation = Google::Apis::ContentV2::SetInventoryRequest::Representation
1085
+ command.request_object = set_inventory_request_object
1086
+ command.response_representation = Google::Apis::ContentV2::SetInventoryResponse::Representation
1087
+ command.response_class = Google::Apis::ContentV2::SetInventoryResponse
1088
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1089
+ command.params['storeCode'] = store_code unless store_code.nil?
1090
+ command.params['productId'] = product_id unless product_id.nil?
1091
+ command.query['dryRun'] = dry_run unless dry_run.nil?
1092
+ command.query['fields'] = fields unless fields.nil?
1093
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1094
+ execute_or_queue_command(command, &block)
1095
+ end
1096
+
1097
+ # Retrieves and/or updates the LIA settings of multiple accounts in a single
1098
+ # request.
1099
+ # @param [Google::Apis::ContentV2::LiasettingsCustomBatchRequest] liasettings_custom_batch_request_object
1100
+ # @param [Boolean] dry_run
1101
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
1102
+ # mode checks the validity of the request and returns errors (if any).
1103
+ # @param [String] fields
1104
+ # Selector specifying which fields to include in a partial response.
1105
+ # @param [String] quota_user
1106
+ # Available to use for quota purposes for server-side applications. Can be any
1107
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1108
+ # @param [Google::Apis::RequestOptions] options
1109
+ # Request-specific options
1110
+ #
1111
+ # @yield [result, err] Result & error if block supplied
1112
+ # @yieldparam result [Google::Apis::ContentV2::LiasettingsCustomBatchResponse] parsed result object
1113
+ # @yieldparam err [StandardError] error object if request failed
1114
+ #
1115
+ # @return [Google::Apis::ContentV2::LiasettingsCustomBatchResponse]
1116
+ #
1117
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1118
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1119
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1120
+ def custombatch_liasetting(liasettings_custom_batch_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
1121
+ command = make_simple_command(:post, 'content/v2/liasettings/batch', options)
1122
+ command.request_representation = Google::Apis::ContentV2::LiasettingsCustomBatchRequest::Representation
1123
+ command.request_object = liasettings_custom_batch_request_object
1124
+ command.response_representation = Google::Apis::ContentV2::LiasettingsCustomBatchResponse::Representation
1125
+ command.response_class = Google::Apis::ContentV2::LiasettingsCustomBatchResponse
1126
+ command.query['dryRun'] = dry_run unless dry_run.nil?
1127
+ command.query['fields'] = fields unless fields.nil?
1128
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1129
+ execute_or_queue_command(command, &block)
1130
+ end
1131
+
1132
+ # Retrieves the LIA settings of the account.
1133
+ # @param [Fixnum] merchant_id
1134
+ # The ID of the managing account. If this parameter is not the same as accountId,
1135
+ # then this account must be a multi-client account and `accountId` must be the
1136
+ # ID of a sub-account of this account.
1137
+ # @param [Fixnum] account_id
1138
+ # The ID of the account for which to get or update LIA settings.
1139
+ # @param [String] fields
1140
+ # Selector specifying which fields to include in a partial response.
1141
+ # @param [String] quota_user
1142
+ # Available to use for quota purposes for server-side applications. Can be any
1143
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1144
+ # @param [Google::Apis::RequestOptions] options
1145
+ # Request-specific options
1146
+ #
1147
+ # @yield [result, err] Result & error if block supplied
1148
+ # @yieldparam result [Google::Apis::ContentV2::LiaSettings] parsed result object
1149
+ # @yieldparam err [StandardError] error object if request failed
1150
+ #
1151
+ # @return [Google::Apis::ContentV2::LiaSettings]
1152
+ #
1153
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1154
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1155
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1156
+ def get_liasetting(merchant_id, account_id, fields: nil, quota_user: nil, options: nil, &block)
1157
+ command = make_simple_command(:get, 'content/v2/{merchantId}/liasettings/{accountId}', options)
1158
+ command.response_representation = Google::Apis::ContentV2::LiaSettings::Representation
1159
+ command.response_class = Google::Apis::ContentV2::LiaSettings
1160
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1161
+ command.params['accountId'] = account_id unless account_id.nil?
1162
+ command.query['fields'] = fields unless fields.nil?
1163
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1164
+ execute_or_queue_command(command, &block)
1165
+ end
1166
+
1167
+ # Retrieves the list of accessible Google My Business accounts.
1168
+ # @param [Fixnum] merchant_id
1169
+ # The ID of the managing account. If this parameter is not the same as accountId,
1170
+ # then this account must be a multi-client account and `accountId` must be the
1171
+ # ID of a sub-account of this account.
1172
+ # @param [Fixnum] account_id
1173
+ # The ID of the account for which to retrieve accessible Google My Business
1174
+ # accounts.
1175
+ # @param [String] fields
1176
+ # Selector specifying which fields to include in a partial response.
1177
+ # @param [String] quota_user
1178
+ # Available to use for quota purposes for server-side applications. Can be any
1179
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1180
+ # @param [Google::Apis::RequestOptions] options
1181
+ # Request-specific options
1182
+ #
1183
+ # @yield [result, err] Result & error if block supplied
1184
+ # @yieldparam result [Google::Apis::ContentV2::LiasettingsGetAccessibleGmbAccountsResponse] parsed result object
1185
+ # @yieldparam err [StandardError] error object if request failed
1186
+ #
1187
+ # @return [Google::Apis::ContentV2::LiasettingsGetAccessibleGmbAccountsResponse]
1188
+ #
1189
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1190
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1191
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1192
+ def getaccessiblegmbaccounts_liasetting(merchant_id, account_id, fields: nil, quota_user: nil, options: nil, &block)
1193
+ command = make_simple_command(:get, 'content/v2/{merchantId}/liasettings/{accountId}/accessiblegmbaccounts', options)
1194
+ command.response_representation = Google::Apis::ContentV2::LiasettingsGetAccessibleGmbAccountsResponse::Representation
1195
+ command.response_class = Google::Apis::ContentV2::LiasettingsGetAccessibleGmbAccountsResponse
1196
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1197
+ command.params['accountId'] = account_id unless account_id.nil?
1198
+ command.query['fields'] = fields unless fields.nil?
1199
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1200
+ execute_or_queue_command(command, &block)
1201
+ end
1202
+
1203
+ # Lists the LIA settings of the sub-accounts in your Merchant Center account.
1204
+ # @param [Fixnum] merchant_id
1205
+ # The ID of the managing account. This must be a multi-client account.
1206
+ # @param [Fixnum] max_results
1207
+ # The maximum number of LIA settings to return in the response, used for paging.
1208
+ # @param [String] page_token
1209
+ # The token returned by the previous request.
1210
+ # @param [String] fields
1211
+ # Selector specifying which fields to include in a partial response.
1212
+ # @param [String] quota_user
1213
+ # Available to use for quota purposes for server-side applications. Can be any
1214
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1215
+ # @param [Google::Apis::RequestOptions] options
1216
+ # Request-specific options
1217
+ #
1218
+ # @yield [result, err] Result & error if block supplied
1219
+ # @yieldparam result [Google::Apis::ContentV2::LiasettingsListResponse] parsed result object
1220
+ # @yieldparam err [StandardError] error object if request failed
1221
+ #
1222
+ # @return [Google::Apis::ContentV2::LiasettingsListResponse]
1223
+ #
1224
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1225
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1226
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1227
+ def list_liasettings(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1228
+ command = make_simple_command(:get, 'content/v2/{merchantId}/liasettings', options)
1229
+ command.response_representation = Google::Apis::ContentV2::LiasettingsListResponse::Representation
1230
+ command.response_class = Google::Apis::ContentV2::LiasettingsListResponse
1231
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1232
+ command.query['maxResults'] = max_results unless max_results.nil?
1233
+ command.query['pageToken'] = page_token unless page_token.nil?
1234
+ command.query['fields'] = fields unless fields.nil?
1235
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1236
+ execute_or_queue_command(command, &block)
1237
+ end
1238
+
1239
+ # Retrieves the list of POS data providers that have active settings for the all
1240
+ # eiligible countries.
1241
+ # @param [String] fields
1242
+ # Selector specifying which fields to include in a partial response.
1243
+ # @param [String] quota_user
1244
+ # Available to use for quota purposes for server-side applications. Can be any
1245
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1246
+ # @param [Google::Apis::RequestOptions] options
1247
+ # Request-specific options
1248
+ #
1249
+ # @yield [result, err] Result & error if block supplied
1250
+ # @yieldparam result [Google::Apis::ContentV2::LiasettingsListPosDataProvidersResponse] parsed result object
1251
+ # @yieldparam err [StandardError] error object if request failed
1252
+ #
1253
+ # @return [Google::Apis::ContentV2::LiasettingsListPosDataProvidersResponse]
1254
+ #
1255
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1256
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1257
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1258
+ def listposdataproviders_liasetting(fields: nil, quota_user: nil, options: nil, &block)
1259
+ command = make_simple_command(:get, 'content/v2/liasettings/posdataproviders', options)
1260
+ command.response_representation = Google::Apis::ContentV2::LiasettingsListPosDataProvidersResponse::Representation
1261
+ command.response_class = Google::Apis::ContentV2::LiasettingsListPosDataProvidersResponse
1262
+ command.query['fields'] = fields unless fields.nil?
1263
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1264
+ execute_or_queue_command(command, &block)
1265
+ end
1266
+
1267
+ # Requests access to a specified Google My Business account.
1268
+ # @param [Fixnum] merchant_id
1269
+ # The ID of the managing account. If this parameter is not the same as accountId,
1270
+ # then this account must be a multi-client account and `accountId` must be the
1271
+ # ID of a sub-account of this account.
1272
+ # @param [Fixnum] account_id
1273
+ # The ID of the account for which GMB access is requested.
1274
+ # @param [String] gmb_email
1275
+ # The email of the Google My Business account.
1276
+ # @param [String] fields
1277
+ # Selector specifying which fields to include in a partial response.
1278
+ # @param [String] quota_user
1279
+ # Available to use for quota purposes for server-side applications. Can be any
1280
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1281
+ # @param [Google::Apis::RequestOptions] options
1282
+ # Request-specific options
1283
+ #
1284
+ # @yield [result, err] Result & error if block supplied
1285
+ # @yieldparam result [Google::Apis::ContentV2::LiasettingsRequestGmbAccessResponse] parsed result object
1286
+ # @yieldparam err [StandardError] error object if request failed
1287
+ #
1288
+ # @return [Google::Apis::ContentV2::LiasettingsRequestGmbAccessResponse]
1289
+ #
1290
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1291
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1292
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1293
+ def requestgmbaccess_liasetting(merchant_id, account_id, gmb_email, fields: nil, quota_user: nil, options: nil, &block)
1294
+ command = make_simple_command(:post, 'content/v2/{merchantId}/liasettings/{accountId}/requestgmbaccess', options)
1295
+ command.response_representation = Google::Apis::ContentV2::LiasettingsRequestGmbAccessResponse::Representation
1296
+ command.response_class = Google::Apis::ContentV2::LiasettingsRequestGmbAccessResponse
1297
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1298
+ command.params['accountId'] = account_id unless account_id.nil?
1299
+ command.query['gmbEmail'] = gmb_email unless gmb_email.nil?
1300
+ command.query['fields'] = fields unless fields.nil?
1301
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1302
+ execute_or_queue_command(command, &block)
1303
+ end
1304
+
1305
+ # Requests inventory validation for the specified country.
1306
+ # @param [Fixnum] merchant_id
1307
+ # The ID of the managing account. If this parameter is not the same as accountId,
1308
+ # then this account must be a multi-client account and `accountId` must be the
1309
+ # ID of a sub-account of this account.
1310
+ # @param [Fixnum] account_id
1311
+ # The ID of the account that manages the order. This cannot be a multi-client
1312
+ # account.
1313
+ # @param [String] country
1314
+ # The country for which inventory validation is requested.
1315
+ # @param [String] fields
1316
+ # Selector specifying which fields to include in a partial response.
1317
+ # @param [String] quota_user
1318
+ # Available to use for quota purposes for server-side applications. Can be any
1319
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1320
+ # @param [Google::Apis::RequestOptions] options
1321
+ # Request-specific options
1322
+ #
1323
+ # @yield [result, err] Result & error if block supplied
1324
+ # @yieldparam result [Google::Apis::ContentV2::LiasettingsRequestInventoryVerificationResponse] parsed result object
1325
+ # @yieldparam err [StandardError] error object if request failed
1326
+ #
1327
+ # @return [Google::Apis::ContentV2::LiasettingsRequestInventoryVerificationResponse]
1328
+ #
1329
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1330
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1331
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1332
+ def requestinventoryverification_liasetting(merchant_id, account_id, country, fields: nil, quota_user: nil, options: nil, &block)
1333
+ command = make_simple_command(:post, 'content/v2/{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}', options)
1334
+ command.response_representation = Google::Apis::ContentV2::LiasettingsRequestInventoryVerificationResponse::Representation
1335
+ command.response_class = Google::Apis::ContentV2::LiasettingsRequestInventoryVerificationResponse
1336
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1337
+ command.params['accountId'] = account_id unless account_id.nil?
1338
+ command.params['country'] = country unless country.nil?
1339
+ command.query['fields'] = fields unless fields.nil?
1340
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1341
+ execute_or_queue_command(command, &block)
1342
+ end
1343
+
1344
+ # Sets the inventory verification contract for the specified country.
1345
+ # @param [Fixnum] merchant_id
1346
+ # The ID of the managing account. If this parameter is not the same as accountId,
1347
+ # then this account must be a multi-client account and `accountId` must be the
1348
+ # ID of a sub-account of this account.
1349
+ # @param [Fixnum] account_id
1350
+ # The ID of the account that manages the order. This cannot be a multi-client
1351
+ # account.
1352
+ # @param [String] country
1353
+ # The country for which inventory verification is requested.
1354
+ # @param [String] language
1355
+ # The language for which inventory verification is requested.
1356
+ # @param [String] contact_name
1357
+ # The name of the inventory verification contact.
1358
+ # @param [String] contact_email
1359
+ # The email of the inventory verification contact.
1360
+ # @param [String] fields
1361
+ # Selector specifying which fields to include in a partial response.
1362
+ # @param [String] quota_user
1363
+ # Available to use for quota purposes for server-side applications. Can be any
1364
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1365
+ # @param [Google::Apis::RequestOptions] options
1366
+ # Request-specific options
1367
+ #
1368
+ # @yield [result, err] Result & error if block supplied
1369
+ # @yieldparam result [Google::Apis::ContentV2::LiasettingsSetInventoryVerificationContactResponse] parsed result object
1370
+ # @yieldparam err [StandardError] error object if request failed
1371
+ #
1372
+ # @return [Google::Apis::ContentV2::LiasettingsSetInventoryVerificationContactResponse]
1373
+ #
1374
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1375
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1376
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1377
+ def setinventoryverificationcontact_liasetting(merchant_id, account_id, country, language, contact_name, contact_email, fields: nil, quota_user: nil, options: nil, &block)
1378
+ command = make_simple_command(:post, 'content/v2/{merchantId}/liasettings/{accountId}/setinventoryverificationcontact', options)
1379
+ command.response_representation = Google::Apis::ContentV2::LiasettingsSetInventoryVerificationContactResponse::Representation
1380
+ command.response_class = Google::Apis::ContentV2::LiasettingsSetInventoryVerificationContactResponse
1381
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1382
+ command.params['accountId'] = account_id unless account_id.nil?
1383
+ command.query['contactEmail'] = contact_email unless contact_email.nil?
1384
+ command.query['contactName'] = contact_name unless contact_name.nil?
1385
+ command.query['country'] = country unless country.nil?
1386
+ command.query['language'] = language unless language.nil?
1387
+ command.query['fields'] = fields unless fields.nil?
1388
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1389
+ execute_or_queue_command(command, &block)
1390
+ end
1391
+
1392
+ # Sets the POS data provider for the specified country.
1393
+ # @param [Fixnum] merchant_id
1394
+ # The ID of the managing account. If this parameter is not the same as accountId,
1395
+ # then this account must be a multi-client account and `accountId` must be the
1396
+ # ID of a sub-account of this account.
1397
+ # @param [Fixnum] account_id
1398
+ # The ID of the account for which to retrieve accessible Google My Business
1399
+ # accounts.
1400
+ # @param [String] country
1401
+ # The country for which the POS data provider is selected.
1402
+ # @param [Fixnum] pos_data_provider_id
1403
+ # The ID of POS data provider.
1404
+ # @param [String] pos_external_account_id
1405
+ # The account ID by which this merchant is known to the POS data provider.
1406
+ # @param [String] fields
1407
+ # Selector specifying which fields to include in a partial response.
1408
+ # @param [String] quota_user
1409
+ # Available to use for quota purposes for server-side applications. Can be any
1410
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1411
+ # @param [Google::Apis::RequestOptions] options
1412
+ # Request-specific options
1413
+ #
1414
+ # @yield [result, err] Result & error if block supplied
1415
+ # @yieldparam result [Google::Apis::ContentV2::LiasettingsSetPosDataProviderResponse] parsed result object
1416
+ # @yieldparam err [StandardError] error object if request failed
1417
+ #
1418
+ # @return [Google::Apis::ContentV2::LiasettingsSetPosDataProviderResponse]
1419
+ #
1420
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1421
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1422
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1423
+ def setposdataprovider_liasetting(merchant_id, account_id, country, pos_data_provider_id: nil, pos_external_account_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1424
+ command = make_simple_command(:post, 'content/v2/{merchantId}/liasettings/{accountId}/setposdataprovider', options)
1425
+ command.response_representation = Google::Apis::ContentV2::LiasettingsSetPosDataProviderResponse::Representation
1426
+ command.response_class = Google::Apis::ContentV2::LiasettingsSetPosDataProviderResponse
1427
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1428
+ command.params['accountId'] = account_id unless account_id.nil?
1429
+ command.query['country'] = country unless country.nil?
1430
+ command.query['posDataProviderId'] = pos_data_provider_id unless pos_data_provider_id.nil?
1431
+ command.query['posExternalAccountId'] = pos_external_account_id unless pos_external_account_id.nil?
1432
+ command.query['fields'] = fields unless fields.nil?
1433
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1434
+ execute_or_queue_command(command, &block)
1435
+ end
1436
+
1437
+ # Updates the LIA settings of the account. Any fields that are not provided are
1438
+ # deleted from the resource.
1439
+ # @param [Fixnum] merchant_id
1440
+ # The ID of the managing account. If this parameter is not the same as accountId,
1441
+ # then this account must be a multi-client account and `accountId` must be the
1442
+ # ID of a sub-account of this account.
1443
+ # @param [Fixnum] account_id
1444
+ # The ID of the account for which to get or update LIA settings.
1445
+ # @param [Google::Apis::ContentV2::LiaSettings] lia_settings_object
1446
+ # @param [Boolean] dry_run
1447
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
1448
+ # mode checks the validity of the request and returns errors (if any).
1449
+ # @param [String] fields
1450
+ # Selector specifying which fields to include in a partial response.
1451
+ # @param [String] quota_user
1452
+ # Available to use for quota purposes for server-side applications. Can be any
1453
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1454
+ # @param [Google::Apis::RequestOptions] options
1455
+ # Request-specific options
1456
+ #
1457
+ # @yield [result, err] Result & error if block supplied
1458
+ # @yieldparam result [Google::Apis::ContentV2::LiaSettings] parsed result object
1459
+ # @yieldparam err [StandardError] error object if request failed
1460
+ #
1461
+ # @return [Google::Apis::ContentV2::LiaSettings]
1462
+ #
1463
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1464
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1465
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1466
+ def update_liasetting(merchant_id, account_id, lia_settings_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
1467
+ command = make_simple_command(:put, 'content/v2/{merchantId}/liasettings/{accountId}', options)
1468
+ command.request_representation = Google::Apis::ContentV2::LiaSettings::Representation
1469
+ command.request_object = lia_settings_object
1470
+ command.response_representation = Google::Apis::ContentV2::LiaSettings::Representation
1471
+ command.response_class = Google::Apis::ContentV2::LiaSettings
1472
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1473
+ command.params['accountId'] = account_id unless account_id.nil?
1474
+ command.query['dryRun'] = dry_run unless dry_run.nil?
1475
+ command.query['fields'] = fields unless fields.nil?
1476
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1477
+ execute_or_queue_command(command, &block)
1478
+ end
1479
+
1480
+ # Creates a charge invoice for a shipment group, and triggers a charge capture
1481
+ # for orderinvoice enabled orders.
1482
+ # @param [Fixnum] merchant_id
1483
+ # The ID of the account that manages the order. This cannot be a multi-client
1484
+ # account.
1485
+ # @param [String] order_id
1486
+ # The ID of the order.
1487
+ # @param [Google::Apis::ContentV2::OrderinvoicesCreateChargeInvoiceRequest] orderinvoices_create_charge_invoice_request_object
1488
+ # @param [String] fields
1489
+ # Selector specifying which fields to include in a partial response.
1490
+ # @param [String] quota_user
1491
+ # Available to use for quota purposes for server-side applications. Can be any
1492
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1493
+ # @param [Google::Apis::RequestOptions] options
1494
+ # Request-specific options
1495
+ #
1496
+ # @yield [result, err] Result & error if block supplied
1497
+ # @yieldparam result [Google::Apis::ContentV2::OrderinvoicesCreateChargeInvoiceResponse] parsed result object
1498
+ # @yieldparam err [StandardError] error object if request failed
1499
+ #
1500
+ # @return [Google::Apis::ContentV2::OrderinvoicesCreateChargeInvoiceResponse]
1501
+ #
1502
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1503
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1504
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1505
+ def createchargeinvoice_orderinvoice(merchant_id, order_id, orderinvoices_create_charge_invoice_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1506
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orderinvoices/{orderId}/createChargeInvoice', options)
1507
+ command.request_representation = Google::Apis::ContentV2::OrderinvoicesCreateChargeInvoiceRequest::Representation
1508
+ command.request_object = orderinvoices_create_charge_invoice_request_object
1509
+ command.response_representation = Google::Apis::ContentV2::OrderinvoicesCreateChargeInvoiceResponse::Representation
1510
+ command.response_class = Google::Apis::ContentV2::OrderinvoicesCreateChargeInvoiceResponse
1511
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1512
+ command.params['orderId'] = order_id unless order_id.nil?
1513
+ command.query['fields'] = fields unless fields.nil?
1514
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1515
+ execute_or_queue_command(command, &block)
1516
+ end
1517
+
1518
+ # Creates a refund invoice for one or more shipment groups, and triggers a
1519
+ # refund for orderinvoice enabled orders. This can only be used for line items
1520
+ # that have previously been charged using `createChargeInvoice`. All amounts (
1521
+ # except for the summary) are incremental with respect to the previous invoice.
1522
+ # @param [Fixnum] merchant_id
1523
+ # The ID of the account that manages the order. This cannot be a multi-client
1524
+ # account.
1525
+ # @param [String] order_id
1526
+ # The ID of the order.
1527
+ # @param [Google::Apis::ContentV2::OrderinvoicesCreateRefundInvoiceRequest] orderinvoices_create_refund_invoice_request_object
1528
+ # @param [String] fields
1529
+ # Selector specifying which fields to include in a partial response.
1530
+ # @param [String] quota_user
1531
+ # Available to use for quota purposes for server-side applications. Can be any
1532
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1533
+ # @param [Google::Apis::RequestOptions] options
1534
+ # Request-specific options
1535
+ #
1536
+ # @yield [result, err] Result & error if block supplied
1537
+ # @yieldparam result [Google::Apis::ContentV2::OrderinvoicesCreateRefundInvoiceResponse] parsed result object
1538
+ # @yieldparam err [StandardError] error object if request failed
1539
+ #
1540
+ # @return [Google::Apis::ContentV2::OrderinvoicesCreateRefundInvoiceResponse]
1541
+ #
1542
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1543
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1544
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1545
+ def createrefundinvoice_orderinvoice(merchant_id, order_id, orderinvoices_create_refund_invoice_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1546
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orderinvoices/{orderId}/createRefundInvoice', options)
1547
+ command.request_representation = Google::Apis::ContentV2::OrderinvoicesCreateRefundInvoiceRequest::Representation
1548
+ command.request_object = orderinvoices_create_refund_invoice_request_object
1549
+ command.response_representation = Google::Apis::ContentV2::OrderinvoicesCreateRefundInvoiceResponse::Representation
1550
+ command.response_class = Google::Apis::ContentV2::OrderinvoicesCreateRefundInvoiceResponse
1551
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1552
+ command.params['orderId'] = order_id unless order_id.nil?
1553
+ command.query['fields'] = fields unless fields.nil?
1554
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1555
+ execute_or_queue_command(command, &block)
1556
+ end
1557
+
1558
+ # Retrieves a report for disbursements from your Merchant Center account.
1559
+ # @param [Fixnum] merchant_id
1560
+ # The ID of the account that manages the order. This cannot be a multi-client
1561
+ # account.
1562
+ # @param [String] disbursement_end_date
1563
+ # The last date which disbursements occurred. In ISO 8601 format. Default:
1564
+ # current date.
1565
+ # @param [String] disbursement_start_date
1566
+ # The first date which disbursements occurred. In ISO 8601 format.
1567
+ # @param [Fixnum] max_results
1568
+ # The maximum number of disbursements to return in the response, used for paging.
1569
+ # @param [String] page_token
1570
+ # The token returned by the previous request.
1571
+ # @param [String] fields
1572
+ # Selector specifying which fields to include in a partial response.
1573
+ # @param [String] quota_user
1574
+ # Available to use for quota purposes for server-side applications. Can be any
1575
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1576
+ # @param [Google::Apis::RequestOptions] options
1577
+ # Request-specific options
1578
+ #
1579
+ # @yield [result, err] Result & error if block supplied
1580
+ # @yieldparam result [Google::Apis::ContentV2::OrderreportsListDisbursementsResponse] parsed result object
1581
+ # @yieldparam err [StandardError] error object if request failed
1582
+ #
1583
+ # @return [Google::Apis::ContentV2::OrderreportsListDisbursementsResponse]
1584
+ #
1585
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1586
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1587
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1588
+ def listdisbursements_orderreport(merchant_id, disbursement_end_date: nil, disbursement_start_date: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1589
+ command = make_simple_command(:get, 'content/v2/{merchantId}/orderreports/disbursements', options)
1590
+ command.response_representation = Google::Apis::ContentV2::OrderreportsListDisbursementsResponse::Representation
1591
+ command.response_class = Google::Apis::ContentV2::OrderreportsListDisbursementsResponse
1592
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1593
+ command.query['disbursementEndDate'] = disbursement_end_date unless disbursement_end_date.nil?
1594
+ command.query['disbursementStartDate'] = disbursement_start_date unless disbursement_start_date.nil?
1595
+ command.query['maxResults'] = max_results unless max_results.nil?
1596
+ command.query['pageToken'] = page_token unless page_token.nil?
1597
+ command.query['fields'] = fields unless fields.nil?
1598
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1599
+ execute_or_queue_command(command, &block)
1600
+ end
1601
+
1602
+ # Retrieves a list of transactions for a disbursement from your Merchant Center
1603
+ # account.
1604
+ # @param [Fixnum] merchant_id
1605
+ # The ID of the account that manages the order. This cannot be a multi-client
1606
+ # account.
1607
+ # @param [String] disbursement_id
1608
+ # The Google-provided ID of the disbursement (found in Wallet).
1609
+ # @param [Fixnum] max_results
1610
+ # The maximum number of disbursements to return in the response, used for paging.
1611
+ # @param [String] page_token
1612
+ # The token returned by the previous request.
1613
+ # @param [String] transaction_end_date
1614
+ # The last date in which transaction occurred. In ISO 8601 format. Default:
1615
+ # current date.
1616
+ # @param [String] transaction_start_date
1617
+ # The first date in which transaction occurred. In ISO 8601 format.
1618
+ # @param [String] fields
1619
+ # Selector specifying which fields to include in a partial response.
1620
+ # @param [String] quota_user
1621
+ # Available to use for quota purposes for server-side applications. Can be any
1622
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1623
+ # @param [Google::Apis::RequestOptions] options
1624
+ # Request-specific options
1625
+ #
1626
+ # @yield [result, err] Result & error if block supplied
1627
+ # @yieldparam result [Google::Apis::ContentV2::OrderreportsListTransactionsResponse] parsed result object
1628
+ # @yieldparam err [StandardError] error object if request failed
1629
+ #
1630
+ # @return [Google::Apis::ContentV2::OrderreportsListTransactionsResponse]
1631
+ #
1632
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1633
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1634
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1635
+ def listtransactions_orderreport(merchant_id, disbursement_id, max_results: nil, page_token: nil, transaction_end_date: nil, transaction_start_date: nil, fields: nil, quota_user: nil, options: nil, &block)
1636
+ command = make_simple_command(:get, 'content/v2/{merchantId}/orderreports/disbursements/{disbursementId}/transactions', options)
1637
+ command.response_representation = Google::Apis::ContentV2::OrderreportsListTransactionsResponse::Representation
1638
+ command.response_class = Google::Apis::ContentV2::OrderreportsListTransactionsResponse
1639
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1640
+ command.params['disbursementId'] = disbursement_id unless disbursement_id.nil?
1641
+ command.query['maxResults'] = max_results unless max_results.nil?
1642
+ command.query['pageToken'] = page_token unless page_token.nil?
1643
+ command.query['transactionEndDate'] = transaction_end_date unless transaction_end_date.nil?
1644
+ command.query['transactionStartDate'] = transaction_start_date unless transaction_start_date.nil?
1645
+ command.query['fields'] = fields unless fields.nil?
1646
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1647
+ execute_or_queue_command(command, &block)
1648
+ end
1649
+
1650
+ # Retrieves an order return from your Merchant Center account.
1651
+ # @param [Fixnum] merchant_id
1652
+ # The ID of the account that manages the order. This cannot be a multi-client
1653
+ # account.
1654
+ # @param [String] return_id
1655
+ # Merchant order return ID generated by Google.
1656
+ # @param [String] fields
1657
+ # Selector specifying which fields to include in a partial response.
1658
+ # @param [String] quota_user
1659
+ # Available to use for quota purposes for server-side applications. Can be any
1660
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1661
+ # @param [Google::Apis::RequestOptions] options
1662
+ # Request-specific options
1663
+ #
1664
+ # @yield [result, err] Result & error if block supplied
1665
+ # @yieldparam result [Google::Apis::ContentV2::MerchantOrderReturn] parsed result object
1666
+ # @yieldparam err [StandardError] error object if request failed
1667
+ #
1668
+ # @return [Google::Apis::ContentV2::MerchantOrderReturn]
1669
+ #
1670
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1671
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1672
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1673
+ def get_orderreturn(merchant_id, return_id, fields: nil, quota_user: nil, options: nil, &block)
1674
+ command = make_simple_command(:get, 'content/v2/{merchantId}/orderreturns/{returnId}', options)
1675
+ command.response_representation = Google::Apis::ContentV2::MerchantOrderReturn::Representation
1676
+ command.response_class = Google::Apis::ContentV2::MerchantOrderReturn
1677
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1678
+ command.params['returnId'] = return_id unless return_id.nil?
1679
+ command.query['fields'] = fields unless fields.nil?
1680
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1681
+ execute_or_queue_command(command, &block)
1682
+ end
1683
+
1684
+ # Lists order returns in your Merchant Center account.
1685
+ # @param [Fixnum] merchant_id
1686
+ # The ID of the account that manages the order. This cannot be a multi-client
1687
+ # account.
1688
+ # @param [String] created_end_date
1689
+ # Obtains order returns created before this date (inclusively), in ISO 8601
1690
+ # format.
1691
+ # @param [String] created_start_date
1692
+ # Obtains order returns created after this date (inclusively), in ISO 8601
1693
+ # format.
1694
+ # @param [Fixnum] max_results
1695
+ # The maximum number of order returns to return in the response, used for paging.
1696
+ # The default value is 25 returns per page, and the maximum allowed value is
1697
+ # 250 returns per page.
1698
+ # @param [String] order_by
1699
+ # Return the results in the specified order.
1700
+ # @param [String] page_token
1701
+ # The token returned by the previous request.
1702
+ # @param [String] fields
1703
+ # Selector specifying which fields to include in a partial response.
1704
+ # @param [String] quota_user
1705
+ # Available to use for quota purposes for server-side applications. Can be any
1706
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1707
+ # @param [Google::Apis::RequestOptions] options
1708
+ # Request-specific options
1709
+ #
1710
+ # @yield [result, err] Result & error if block supplied
1711
+ # @yieldparam result [Google::Apis::ContentV2::OrderreturnsListResponse] parsed result object
1712
+ # @yieldparam err [StandardError] error object if request failed
1713
+ #
1714
+ # @return [Google::Apis::ContentV2::OrderreturnsListResponse]
1715
+ #
1716
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1717
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1718
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1719
+ def list_orderreturns(merchant_id, created_end_date: nil, created_start_date: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1720
+ command = make_simple_command(:get, 'content/v2/{merchantId}/orderreturns', options)
1721
+ command.response_representation = Google::Apis::ContentV2::OrderreturnsListResponse::Representation
1722
+ command.response_class = Google::Apis::ContentV2::OrderreturnsListResponse
1723
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1724
+ command.query['createdEndDate'] = created_end_date unless created_end_date.nil?
1725
+ command.query['createdStartDate'] = created_start_date unless created_start_date.nil?
1726
+ command.query['maxResults'] = max_results unless max_results.nil?
1727
+ command.query['orderBy'] = order_by unless order_by.nil?
1728
+ command.query['pageToken'] = page_token unless page_token.nil?
1729
+ command.query['fields'] = fields unless fields.nil?
1730
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1731
+ execute_or_queue_command(command, &block)
1732
+ end
1733
+
1734
+ # Marks an order as acknowledged.
1735
+ # @param [Fixnum] merchant_id
1736
+ # The ID of the account that manages the order. This cannot be a multi-client
1737
+ # account.
1738
+ # @param [String] order_id
1739
+ # The ID of the order.
1740
+ # @param [Google::Apis::ContentV2::OrdersAcknowledgeRequest] orders_acknowledge_request_object
1741
+ # @param [String] fields
1742
+ # Selector specifying which fields to include in a partial response.
1743
+ # @param [String] quota_user
1744
+ # Available to use for quota purposes for server-side applications. Can be any
1745
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1746
+ # @param [Google::Apis::RequestOptions] options
1747
+ # Request-specific options
1748
+ #
1749
+ # @yield [result, err] Result & error if block supplied
1750
+ # @yieldparam result [Google::Apis::ContentV2::OrdersAcknowledgeResponse] parsed result object
1751
+ # @yieldparam err [StandardError] error object if request failed
1752
+ #
1753
+ # @return [Google::Apis::ContentV2::OrdersAcknowledgeResponse]
1754
+ #
1755
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1756
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1757
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1758
+ def acknowledge_order(merchant_id, order_id, orders_acknowledge_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1759
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orders/{orderId}/acknowledge', options)
1760
+ command.request_representation = Google::Apis::ContentV2::OrdersAcknowledgeRequest::Representation
1761
+ command.request_object = orders_acknowledge_request_object
1762
+ command.response_representation = Google::Apis::ContentV2::OrdersAcknowledgeResponse::Representation
1763
+ command.response_class = Google::Apis::ContentV2::OrdersAcknowledgeResponse
1764
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1765
+ command.params['orderId'] = order_id unless order_id.nil?
1766
+ command.query['fields'] = fields unless fields.nil?
1767
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1768
+ execute_or_queue_command(command, &block)
1769
+ end
1770
+
1771
+ # Sandbox only. Moves a test order from state "`inProgress`" to state "`
1772
+ # pendingShipment`".
1773
+ # @param [Fixnum] merchant_id
1774
+ # The ID of the account that manages the order. This cannot be a multi-client
1775
+ # account.
1776
+ # @param [String] order_id
1777
+ # The ID of the test order to modify.
1778
+ # @param [String] fields
1779
+ # Selector specifying which fields to include in a partial response.
1780
+ # @param [String] quota_user
1781
+ # Available to use for quota purposes for server-side applications. Can be any
1782
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1783
+ # @param [Google::Apis::RequestOptions] options
1784
+ # Request-specific options
1785
+ #
1786
+ # @yield [result, err] Result & error if block supplied
1787
+ # @yieldparam result [Google::Apis::ContentV2::OrdersAdvanceTestOrderResponse] parsed result object
1788
+ # @yieldparam err [StandardError] error object if request failed
1789
+ #
1790
+ # @return [Google::Apis::ContentV2::OrdersAdvanceTestOrderResponse]
1791
+ #
1792
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1793
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1794
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1795
+ def advance_test_order(merchant_id, order_id, fields: nil, quota_user: nil, options: nil, &block)
1796
+ command = make_simple_command(:post, 'content/v2/{merchantId}/testorders/{orderId}/advance', options)
1797
+ command.response_representation = Google::Apis::ContentV2::OrdersAdvanceTestOrderResponse::Representation
1798
+ command.response_class = Google::Apis::ContentV2::OrdersAdvanceTestOrderResponse
1799
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1800
+ command.params['orderId'] = order_id unless order_id.nil?
1801
+ command.query['fields'] = fields unless fields.nil?
1802
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1803
+ execute_or_queue_command(command, &block)
1804
+ end
1805
+
1806
+ # Cancels all line items in an order, making a full refund.
1807
+ # @param [Fixnum] merchant_id
1808
+ # The ID of the account that manages the order. This cannot be a multi-client
1809
+ # account.
1810
+ # @param [String] order_id
1811
+ # The ID of the order to cancel.
1812
+ # @param [Google::Apis::ContentV2::OrdersCancelRequest] orders_cancel_request_object
1813
+ # @param [String] fields
1814
+ # Selector specifying which fields to include in a partial response.
1815
+ # @param [String] quota_user
1816
+ # Available to use for quota purposes for server-side applications. Can be any
1817
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1818
+ # @param [Google::Apis::RequestOptions] options
1819
+ # Request-specific options
1820
+ #
1821
+ # @yield [result, err] Result & error if block supplied
1822
+ # @yieldparam result [Google::Apis::ContentV2::OrdersCancelResponse] parsed result object
1823
+ # @yieldparam err [StandardError] error object if request failed
1824
+ #
1825
+ # @return [Google::Apis::ContentV2::OrdersCancelResponse]
1826
+ #
1827
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1828
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1829
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1830
+ def cancel_order(merchant_id, order_id, orders_cancel_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1831
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orders/{orderId}/cancel', options)
1832
+ command.request_representation = Google::Apis::ContentV2::OrdersCancelRequest::Representation
1833
+ command.request_object = orders_cancel_request_object
1834
+ command.response_representation = Google::Apis::ContentV2::OrdersCancelResponse::Representation
1835
+ command.response_class = Google::Apis::ContentV2::OrdersCancelResponse
1836
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1837
+ command.params['orderId'] = order_id unless order_id.nil?
1838
+ command.query['fields'] = fields unless fields.nil?
1839
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1840
+ execute_or_queue_command(command, &block)
1841
+ end
1842
+
1843
+ # Cancels a line item, making a full refund.
1844
+ # @param [Fixnum] merchant_id
1845
+ # The ID of the account that manages the order. This cannot be a multi-client
1846
+ # account.
1847
+ # @param [String] order_id
1848
+ # The ID of the order.
1849
+ # @param [Google::Apis::ContentV2::OrdersCancelLineItemRequest] orders_cancel_line_item_request_object
1850
+ # @param [String] fields
1851
+ # Selector specifying which fields to include in a partial response.
1852
+ # @param [String] quota_user
1853
+ # Available to use for quota purposes for server-side applications. Can be any
1854
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1855
+ # @param [Google::Apis::RequestOptions] options
1856
+ # Request-specific options
1857
+ #
1858
+ # @yield [result, err] Result & error if block supplied
1859
+ # @yieldparam result [Google::Apis::ContentV2::OrdersCancelLineItemResponse] parsed result object
1860
+ # @yieldparam err [StandardError] error object if request failed
1861
+ #
1862
+ # @return [Google::Apis::ContentV2::OrdersCancelLineItemResponse]
1863
+ #
1864
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1865
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1866
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1867
+ def cancel_order_line_item(merchant_id, order_id, orders_cancel_line_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1868
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orders/{orderId}/cancelLineItem', options)
1869
+ command.request_representation = Google::Apis::ContentV2::OrdersCancelLineItemRequest::Representation
1870
+ command.request_object = orders_cancel_line_item_request_object
1871
+ command.response_representation = Google::Apis::ContentV2::OrdersCancelLineItemResponse::Representation
1872
+ command.response_class = Google::Apis::ContentV2::OrdersCancelLineItemResponse
1873
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1874
+ command.params['orderId'] = order_id unless order_id.nil?
1875
+ command.query['fields'] = fields unless fields.nil?
1876
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1877
+ execute_or_queue_command(command, &block)
1878
+ end
1879
+
1880
+ # Sandbox only. Cancels a test order for customer-initiated cancellation.
1881
+ # @param [Fixnum] merchant_id
1882
+ # The ID of the account that manages the order. This cannot be a multi-client
1883
+ # account.
1884
+ # @param [String] order_id
1885
+ # The ID of the test order to cancel.
1886
+ # @param [Google::Apis::ContentV2::OrdersCancelTestOrderByCustomerRequest] orders_cancel_test_order_by_customer_request_object
1887
+ # @param [String] fields
1888
+ # Selector specifying which fields to include in a partial response.
1889
+ # @param [String] quota_user
1890
+ # Available to use for quota purposes for server-side applications. Can be any
1891
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1892
+ # @param [Google::Apis::RequestOptions] options
1893
+ # Request-specific options
1894
+ #
1895
+ # @yield [result, err] Result & error if block supplied
1896
+ # @yieldparam result [Google::Apis::ContentV2::OrdersCancelTestOrderByCustomerResponse] parsed result object
1897
+ # @yieldparam err [StandardError] error object if request failed
1898
+ #
1899
+ # @return [Google::Apis::ContentV2::OrdersCancelTestOrderByCustomerResponse]
1900
+ #
1901
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1902
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1903
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1904
+ def canceltestorderbycustomer_order(merchant_id, order_id, orders_cancel_test_order_by_customer_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1905
+ command = make_simple_command(:post, 'content/v2/{merchantId}/testorders/{orderId}/cancelByCustomer', options)
1906
+ command.request_representation = Google::Apis::ContentV2::OrdersCancelTestOrderByCustomerRequest::Representation
1907
+ command.request_object = orders_cancel_test_order_by_customer_request_object
1908
+ command.response_representation = Google::Apis::ContentV2::OrdersCancelTestOrderByCustomerResponse::Representation
1909
+ command.response_class = Google::Apis::ContentV2::OrdersCancelTestOrderByCustomerResponse
1910
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1911
+ command.params['orderId'] = order_id unless order_id.nil?
1912
+ command.query['fields'] = fields unless fields.nil?
1913
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1914
+ execute_or_queue_command(command, &block)
1915
+ end
1916
+
1917
+ # Sandbox only. Creates a test order.
1918
+ # @param [Fixnum] merchant_id
1919
+ # The ID of the account that should manage the order. This cannot be a multi-
1920
+ # client account.
1921
+ # @param [Google::Apis::ContentV2::OrdersCreateTestOrderRequest] orders_create_test_order_request_object
1922
+ # @param [String] fields
1923
+ # Selector specifying which fields to include in a partial response.
1924
+ # @param [String] quota_user
1925
+ # Available to use for quota purposes for server-side applications. Can be any
1926
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1927
+ # @param [Google::Apis::RequestOptions] options
1928
+ # Request-specific options
1929
+ #
1930
+ # @yield [result, err] Result & error if block supplied
1931
+ # @yieldparam result [Google::Apis::ContentV2::OrdersCreateTestOrderResponse] parsed result object
1932
+ # @yieldparam err [StandardError] error object if request failed
1933
+ #
1934
+ # @return [Google::Apis::ContentV2::OrdersCreateTestOrderResponse]
1935
+ #
1936
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1937
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1938
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1939
+ def create_test_order(merchant_id, orders_create_test_order_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1940
+ command = make_simple_command(:post, 'content/v2/{merchantId}/testorders', options)
1941
+ command.request_representation = Google::Apis::ContentV2::OrdersCreateTestOrderRequest::Representation
1942
+ command.request_object = orders_create_test_order_request_object
1943
+ command.response_representation = Google::Apis::ContentV2::OrdersCreateTestOrderResponse::Representation
1944
+ command.response_class = Google::Apis::ContentV2::OrdersCreateTestOrderResponse
1945
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1946
+ command.query['fields'] = fields unless fields.nil?
1947
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1948
+ execute_or_queue_command(command, &block)
1949
+ end
1950
+
1951
+ # Sandbox only. Creates a test return.
1952
+ # @param [Fixnum] merchant_id
1953
+ # The ID of the account that manages the order. This cannot be a multi-client
1954
+ # account.
1955
+ # @param [String] order_id
1956
+ # The ID of the order.
1957
+ # @param [Google::Apis::ContentV2::OrdersCreateTestReturnRequest] orders_create_test_return_request_object
1958
+ # @param [String] fields
1959
+ # Selector specifying which fields to include in a partial response.
1960
+ # @param [String] quota_user
1961
+ # Available to use for quota purposes for server-side applications. Can be any
1962
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1963
+ # @param [Google::Apis::RequestOptions] options
1964
+ # Request-specific options
1965
+ #
1966
+ # @yield [result, err] Result & error if block supplied
1967
+ # @yieldparam result [Google::Apis::ContentV2::OrdersCreateTestReturnResponse] parsed result object
1968
+ # @yieldparam err [StandardError] error object if request failed
1969
+ #
1970
+ # @return [Google::Apis::ContentV2::OrdersCreateTestReturnResponse]
1971
+ #
1972
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1973
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1974
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1975
+ def createtestreturn_order(merchant_id, order_id, orders_create_test_return_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1976
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orders/{orderId}/testreturn', options)
1977
+ command.request_representation = Google::Apis::ContentV2::OrdersCreateTestReturnRequest::Representation
1978
+ command.request_object = orders_create_test_return_request_object
1979
+ command.response_representation = Google::Apis::ContentV2::OrdersCreateTestReturnResponse::Representation
1980
+ command.response_class = Google::Apis::ContentV2::OrdersCreateTestReturnResponse
1981
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1982
+ command.params['orderId'] = order_id unless order_id.nil?
1983
+ command.query['fields'] = fields unless fields.nil?
1984
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1985
+ execute_or_queue_command(command, &block)
1986
+ end
1987
+
1988
+ # Retrieves or modifies multiple orders in a single request.
1989
+ # @param [Google::Apis::ContentV2::OrdersCustomBatchRequest] orders_custom_batch_request_object
1990
+ # @param [String] fields
1991
+ # Selector specifying which fields to include in a partial response.
1992
+ # @param [String] quota_user
1993
+ # Available to use for quota purposes for server-side applications. Can be any
1994
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1995
+ # @param [Google::Apis::RequestOptions] options
1996
+ # Request-specific options
1997
+ #
1998
+ # @yield [result, err] Result & error if block supplied
1999
+ # @yieldparam result [Google::Apis::ContentV2::OrdersCustomBatchResponse] parsed result object
2000
+ # @yieldparam err [StandardError] error object if request failed
2001
+ #
2002
+ # @return [Google::Apis::ContentV2::OrdersCustomBatchResponse]
2003
+ #
2004
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2005
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2006
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2007
+ def custom_order_batch(orders_custom_batch_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2008
+ command = make_simple_command(:post, 'content/v2/orders/batch', options)
2009
+ command.request_representation = Google::Apis::ContentV2::OrdersCustomBatchRequest::Representation
2010
+ command.request_object = orders_custom_batch_request_object
2011
+ command.response_representation = Google::Apis::ContentV2::OrdersCustomBatchResponse::Representation
2012
+ command.response_class = Google::Apis::ContentV2::OrdersCustomBatchResponse
2013
+ command.query['fields'] = fields unless fields.nil?
2014
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2015
+ execute_or_queue_command(command, &block)
2016
+ end
2017
+
2018
+ # Retrieves an order from your Merchant Center account.
2019
+ # @param [Fixnum] merchant_id
2020
+ # The ID of the account that manages the order. This cannot be a multi-client
2021
+ # account.
2022
+ # @param [String] order_id
2023
+ # The ID of the order.
2024
+ # @param [String] fields
2025
+ # Selector specifying which fields to include in a partial response.
2026
+ # @param [String] quota_user
2027
+ # Available to use for quota purposes for server-side applications. Can be any
2028
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2029
+ # @param [Google::Apis::RequestOptions] options
2030
+ # Request-specific options
2031
+ #
2032
+ # @yield [result, err] Result & error if block supplied
2033
+ # @yieldparam result [Google::Apis::ContentV2::Order] parsed result object
2034
+ # @yieldparam err [StandardError] error object if request failed
2035
+ #
2036
+ # @return [Google::Apis::ContentV2::Order]
2037
+ #
2038
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2039
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2040
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2041
+ def get_order(merchant_id, order_id, fields: nil, quota_user: nil, options: nil, &block)
2042
+ command = make_simple_command(:get, 'content/v2/{merchantId}/orders/{orderId}', options)
2043
+ command.response_representation = Google::Apis::ContentV2::Order::Representation
2044
+ command.response_class = Google::Apis::ContentV2::Order
2045
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2046
+ command.params['orderId'] = order_id unless order_id.nil?
2047
+ command.query['fields'] = fields unless fields.nil?
2048
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2049
+ execute_or_queue_command(command, &block)
2050
+ end
2051
+
2052
+ # Retrieves an order using merchant order ID.
2053
+ # @param [Fixnum] merchant_id
2054
+ # The ID of the account that manages the order. This cannot be a multi-client
2055
+ # account.
2056
+ # @param [String] merchant_order_id
2057
+ # The merchant order ID to be looked for.
2058
+ # @param [String] fields
2059
+ # Selector specifying which fields to include in a partial response.
2060
+ # @param [String] quota_user
2061
+ # Available to use for quota purposes for server-side applications. Can be any
2062
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2063
+ # @param [Google::Apis::RequestOptions] options
2064
+ # Request-specific options
2065
+ #
2066
+ # @yield [result, err] Result & error if block supplied
2067
+ # @yieldparam result [Google::Apis::ContentV2::OrdersGetByMerchantOrderIdResponse] parsed result object
2068
+ # @yieldparam err [StandardError] error object if request failed
2069
+ #
2070
+ # @return [Google::Apis::ContentV2::OrdersGetByMerchantOrderIdResponse]
2071
+ #
2072
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2073
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2074
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2075
+ def get_order_by_merchant_order_id(merchant_id, merchant_order_id, fields: nil, quota_user: nil, options: nil, &block)
2076
+ command = make_simple_command(:get, 'content/v2/{merchantId}/ordersbymerchantid/{merchantOrderId}', options)
2077
+ command.response_representation = Google::Apis::ContentV2::OrdersGetByMerchantOrderIdResponse::Representation
2078
+ command.response_class = Google::Apis::ContentV2::OrdersGetByMerchantOrderIdResponse
2079
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2080
+ command.params['merchantOrderId'] = merchant_order_id unless merchant_order_id.nil?
2081
+ command.query['fields'] = fields unless fields.nil?
2082
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2083
+ execute_or_queue_command(command, &block)
2084
+ end
2085
+
2086
+ # Sandbox only. Retrieves an order template that can be used to quickly create a
2087
+ # new order in sandbox.
2088
+ # @param [Fixnum] merchant_id
2089
+ # The ID of the account that should manage the order. This cannot be a multi-
2090
+ # client account.
2091
+ # @param [String] template_name
2092
+ # The name of the template to retrieve.
2093
+ # @param [String] country
2094
+ # The country of the template to retrieve. Defaults to `US`.
2095
+ # @param [String] fields
2096
+ # Selector specifying which fields to include in a partial response.
2097
+ # @param [String] quota_user
2098
+ # Available to use for quota purposes for server-side applications. Can be any
2099
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2100
+ # @param [Google::Apis::RequestOptions] options
2101
+ # Request-specific options
2102
+ #
2103
+ # @yield [result, err] Result & error if block supplied
2104
+ # @yieldparam result [Google::Apis::ContentV2::OrdersGetTestOrderTemplateResponse] parsed result object
2105
+ # @yieldparam err [StandardError] error object if request failed
2106
+ #
2107
+ # @return [Google::Apis::ContentV2::OrdersGetTestOrderTemplateResponse]
2108
+ #
2109
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2110
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2111
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2112
+ def get_test_order_template(merchant_id, template_name, country: nil, fields: nil, quota_user: nil, options: nil, &block)
2113
+ command = make_simple_command(:get, 'content/v2/{merchantId}/testordertemplates/{templateName}', options)
2114
+ command.response_representation = Google::Apis::ContentV2::OrdersGetTestOrderTemplateResponse::Representation
2115
+ command.response_class = Google::Apis::ContentV2::OrdersGetTestOrderTemplateResponse
2116
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2117
+ command.params['templateName'] = template_name unless template_name.nil?
2118
+ command.query['country'] = country unless country.nil?
2119
+ command.query['fields'] = fields unless fields.nil?
2120
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2121
+ execute_or_queue_command(command, &block)
2122
+ end
2123
+
2124
+ # Deprecated. Notifies that item return and refund was handled directly by
2125
+ # merchant outside of Google payments processing (e.g. cash refund done in store)
2126
+ # . Note: We recommend calling the returnrefundlineitem method to refund in-
2127
+ # store returns. We will issue the refund directly to the customer. This helps
2128
+ # to prevent possible differences arising between merchant and Google
2129
+ # transaction records. We also recommend having the point of sale system
2130
+ # communicate with Google to ensure that customers do not receive a double
2131
+ # refund by first refunding via Google then via an in-store return.
2132
+ # @param [Fixnum] merchant_id
2133
+ # The ID of the account that manages the order. This cannot be a multi-client
2134
+ # account.
2135
+ # @param [String] order_id
2136
+ # The ID of the order.
2137
+ # @param [Google::Apis::ContentV2::OrdersInStoreRefundLineItemRequest] orders_in_store_refund_line_item_request_object
2138
+ # @param [String] fields
2139
+ # Selector specifying which fields to include in a partial response.
2140
+ # @param [String] quota_user
2141
+ # Available to use for quota purposes for server-side applications. Can be any
2142
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2143
+ # @param [Google::Apis::RequestOptions] options
2144
+ # Request-specific options
2145
+ #
2146
+ # @yield [result, err] Result & error if block supplied
2147
+ # @yieldparam result [Google::Apis::ContentV2::OrdersInStoreRefundLineItemResponse] parsed result object
2148
+ # @yieldparam err [StandardError] error object if request failed
2149
+ #
2150
+ # @return [Google::Apis::ContentV2::OrdersInStoreRefundLineItemResponse]
2151
+ #
2152
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2153
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2154
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2155
+ def instorerefundlineitem_order(merchant_id, order_id, orders_in_store_refund_line_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2156
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orders/{orderId}/inStoreRefundLineItem', options)
2157
+ command.request_representation = Google::Apis::ContentV2::OrdersInStoreRefundLineItemRequest::Representation
2158
+ command.request_object = orders_in_store_refund_line_item_request_object
2159
+ command.response_representation = Google::Apis::ContentV2::OrdersInStoreRefundLineItemResponse::Representation
2160
+ command.response_class = Google::Apis::ContentV2::OrdersInStoreRefundLineItemResponse
2161
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2162
+ command.params['orderId'] = order_id unless order_id.nil?
2163
+ command.query['fields'] = fields unless fields.nil?
2164
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2165
+ execute_or_queue_command(command, &block)
2166
+ end
2167
+
2168
+ # Lists the orders in your Merchant Center account.
2169
+ # @param [Fixnum] merchant_id
2170
+ # The ID of the account that manages the order. This cannot be a multi-client
2171
+ # account.
2172
+ # @param [Boolean] acknowledged
2173
+ # Obtains orders that match the acknowledgement status. When set to true,
2174
+ # obtains orders that have been acknowledged. When false, obtains orders that
2175
+ # have not been acknowledged. We recommend using this filter set to `false`, in
2176
+ # conjunction with the `acknowledge` call, such that only un-acknowledged orders
2177
+ # are returned.
2178
+ # @param [Fixnum] max_results
2179
+ # The maximum number of orders to return in the response, used for paging. The
2180
+ # default value is 25 orders per page, and the maximum allowed value is 250
2181
+ # orders per page.
2182
+ # @param [String] order_by
2183
+ # Order results by placement date in descending or ascending order. Acceptable
2184
+ # values are: - placedDateAsc - placedDateDesc
2185
+ # @param [String] page_token
2186
+ # The token returned by the previous request.
2187
+ # @param [String] placed_date_end
2188
+ # Obtains orders placed before this date (exclusively), in ISO 8601 format.
2189
+ # @param [String] placed_date_start
2190
+ # Obtains orders placed after this date (inclusively), in ISO 8601 format.
2191
+ # @param [Array<String>, String] statuses
2192
+ # Obtains orders that match any of the specified statuses. Please note that `
2193
+ # active` is a shortcut for `pendingShipment` and `partiallyShipped`, and `
2194
+ # completed` is a shortcut for `shipped`, `partiallyDelivered`, `delivered`, `
2195
+ # partiallyReturned`, `returned`, and `canceled`.
2196
+ # @param [String] fields
2197
+ # Selector specifying which fields to include in a partial response.
2198
+ # @param [String] quota_user
2199
+ # Available to use for quota purposes for server-side applications. Can be any
2200
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2201
+ # @param [Google::Apis::RequestOptions] options
2202
+ # Request-specific options
2203
+ #
2204
+ # @yield [result, err] Result & error if block supplied
2205
+ # @yieldparam result [Google::Apis::ContentV2::OrdersListResponse] parsed result object
2206
+ # @yieldparam err [StandardError] error object if request failed
2207
+ #
2208
+ # @return [Google::Apis::ContentV2::OrdersListResponse]
2209
+ #
2210
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2211
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2212
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2213
+ def list_orders(merchant_id, acknowledged: nil, max_results: nil, order_by: nil, page_token: nil, placed_date_end: nil, placed_date_start: nil, statuses: nil, fields: nil, quota_user: nil, options: nil, &block)
2214
+ command = make_simple_command(:get, 'content/v2/{merchantId}/orders', options)
2215
+ command.response_representation = Google::Apis::ContentV2::OrdersListResponse::Representation
2216
+ command.response_class = Google::Apis::ContentV2::OrdersListResponse
2217
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2218
+ command.query['acknowledged'] = acknowledged unless acknowledged.nil?
2219
+ command.query['maxResults'] = max_results unless max_results.nil?
2220
+ command.query['orderBy'] = order_by unless order_by.nil?
2221
+ command.query['pageToken'] = page_token unless page_token.nil?
2222
+ command.query['placedDateEnd'] = placed_date_end unless placed_date_end.nil?
2223
+ command.query['placedDateStart'] = placed_date_start unless placed_date_start.nil?
2224
+ command.query['statuses'] = statuses unless statuses.nil?
2225
+ command.query['fields'] = fields unless fields.nil?
2226
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2227
+ execute_or_queue_command(command, &block)
2228
+ end
2229
+
2230
+ # Deprecated, please use returnRefundLineItem instead.
2231
+ # @param [Fixnum] merchant_id
2232
+ # The ID of the account that manages the order. This cannot be a multi-client
2233
+ # account.
2234
+ # @param [String] order_id
2235
+ # The ID of the order to refund.
2236
+ # @param [Google::Apis::ContentV2::OrdersRefundRequest] orders_refund_request_object
2237
+ # @param [String] fields
2238
+ # Selector specifying which fields to include in a partial response.
2239
+ # @param [String] quota_user
2240
+ # Available to use for quota purposes for server-side applications. Can be any
2241
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2242
+ # @param [Google::Apis::RequestOptions] options
2243
+ # Request-specific options
2244
+ #
2245
+ # @yield [result, err] Result & error if block supplied
2246
+ # @yieldparam result [Google::Apis::ContentV2::OrdersRefundResponse] parsed result object
2247
+ # @yieldparam err [StandardError] error object if request failed
2248
+ #
2249
+ # @return [Google::Apis::ContentV2::OrdersRefundResponse]
2250
+ #
2251
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2252
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2253
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2254
+ def refund_order(merchant_id, order_id, orders_refund_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2255
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orders/{orderId}/refund', options)
2256
+ command.request_representation = Google::Apis::ContentV2::OrdersRefundRequest::Representation
2257
+ command.request_object = orders_refund_request_object
2258
+ command.response_representation = Google::Apis::ContentV2::OrdersRefundResponse::Representation
2259
+ command.response_class = Google::Apis::ContentV2::OrdersRefundResponse
2260
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2261
+ command.params['orderId'] = order_id unless order_id.nil?
2262
+ command.query['fields'] = fields unless fields.nil?
2263
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2264
+ execute_or_queue_command(command, &block)
2265
+ end
2266
+
2267
+ # Rejects return on an line item.
2268
+ # @param [Fixnum] merchant_id
2269
+ # The ID of the account that manages the order. This cannot be a multi-client
2270
+ # account.
2271
+ # @param [String] order_id
2272
+ # The ID of the order.
2273
+ # @param [Google::Apis::ContentV2::OrdersRejectReturnLineItemRequest] orders_reject_return_line_item_request_object
2274
+ # @param [String] fields
2275
+ # Selector specifying which fields to include in a partial response.
2276
+ # @param [String] quota_user
2277
+ # Available to use for quota purposes for server-side applications. Can be any
2278
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2279
+ # @param [Google::Apis::RequestOptions] options
2280
+ # Request-specific options
2281
+ #
2282
+ # @yield [result, err] Result & error if block supplied
2283
+ # @yieldparam result [Google::Apis::ContentV2::OrdersRejectReturnLineItemResponse] parsed result object
2284
+ # @yieldparam err [StandardError] error object if request failed
2285
+ #
2286
+ # @return [Google::Apis::ContentV2::OrdersRejectReturnLineItemResponse]
2287
+ #
2288
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2289
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2290
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2291
+ def rejectreturnlineitem_order(merchant_id, order_id, orders_reject_return_line_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2292
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orders/{orderId}/rejectReturnLineItem', options)
2293
+ command.request_representation = Google::Apis::ContentV2::OrdersRejectReturnLineItemRequest::Representation
2294
+ command.request_object = orders_reject_return_line_item_request_object
2295
+ command.response_representation = Google::Apis::ContentV2::OrdersRejectReturnLineItemResponse::Representation
2296
+ command.response_class = Google::Apis::ContentV2::OrdersRejectReturnLineItemResponse
2297
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2298
+ command.params['orderId'] = order_id unless order_id.nil?
2299
+ command.query['fields'] = fields unless fields.nil?
2300
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2301
+ execute_or_queue_command(command, &block)
2302
+ end
2303
+
2304
+ # Returns a line item.
2305
+ # @param [Fixnum] merchant_id
2306
+ # The ID of the account that manages the order. This cannot be a multi-client
2307
+ # account.
2308
+ # @param [String] order_id
2309
+ # The ID of the order.
2310
+ # @param [Google::Apis::ContentV2::OrdersReturnLineItemRequest] orders_return_line_item_request_object
2311
+ # @param [String] fields
2312
+ # Selector specifying which fields to include in a partial response.
2313
+ # @param [String] quota_user
2314
+ # Available to use for quota purposes for server-side applications. Can be any
2315
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2316
+ # @param [Google::Apis::RequestOptions] options
2317
+ # Request-specific options
2318
+ #
2319
+ # @yield [result, err] Result & error if block supplied
2320
+ # @yieldparam result [Google::Apis::ContentV2::OrdersReturnLineItemResponse] parsed result object
2321
+ # @yieldparam err [StandardError] error object if request failed
2322
+ #
2323
+ # @return [Google::Apis::ContentV2::OrdersReturnLineItemResponse]
2324
+ #
2325
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2326
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2327
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2328
+ def return_order_line_item(merchant_id, order_id, orders_return_line_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2329
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orders/{orderId}/returnLineItem', options)
2330
+ command.request_representation = Google::Apis::ContentV2::OrdersReturnLineItemRequest::Representation
2331
+ command.request_object = orders_return_line_item_request_object
2332
+ command.response_representation = Google::Apis::ContentV2::OrdersReturnLineItemResponse::Representation
2333
+ command.response_class = Google::Apis::ContentV2::OrdersReturnLineItemResponse
2334
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2335
+ command.params['orderId'] = order_id unless order_id.nil?
2336
+ command.query['fields'] = fields unless fields.nil?
2337
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2338
+ execute_or_queue_command(command, &block)
2339
+ end
2340
+
2341
+ # Returns and refunds a line item. Note that this method can only be called on
2342
+ # fully shipped orders. Please also note that the Orderreturns API is the
2343
+ # preferred way to handle returns after you receive a return from a customer.
2344
+ # You can use Orderreturns.list or Orderreturns.get to search for the return,
2345
+ # and then use Orderreturns.processreturn to issue the refund. If the return
2346
+ # cannot be found, then we recommend using this API to issue a refund.
2347
+ # @param [Fixnum] merchant_id
2348
+ # The ID of the account that manages the order. This cannot be a multi-client
2349
+ # account.
2350
+ # @param [String] order_id
2351
+ # The ID of the order.
2352
+ # @param [Google::Apis::ContentV2::OrdersReturnRefundLineItemRequest] orders_return_refund_line_item_request_object
2353
+ # @param [String] fields
2354
+ # Selector specifying which fields to include in a partial response.
2355
+ # @param [String] quota_user
2356
+ # Available to use for quota purposes for server-side applications. Can be any
2357
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2358
+ # @param [Google::Apis::RequestOptions] options
2359
+ # Request-specific options
2360
+ #
2361
+ # @yield [result, err] Result & error if block supplied
2362
+ # @yieldparam result [Google::Apis::ContentV2::OrdersReturnRefundLineItemResponse] parsed result object
2363
+ # @yieldparam err [StandardError] error object if request failed
2364
+ #
2365
+ # @return [Google::Apis::ContentV2::OrdersReturnRefundLineItemResponse]
2366
+ #
2367
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2368
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2369
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2370
+ def returnrefundlineitem_order(merchant_id, order_id, orders_return_refund_line_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2371
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orders/{orderId}/returnRefundLineItem', options)
2372
+ command.request_representation = Google::Apis::ContentV2::OrdersReturnRefundLineItemRequest::Representation
2373
+ command.request_object = orders_return_refund_line_item_request_object
2374
+ command.response_representation = Google::Apis::ContentV2::OrdersReturnRefundLineItemResponse::Representation
2375
+ command.response_class = Google::Apis::ContentV2::OrdersReturnRefundLineItemResponse
2376
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2377
+ command.params['orderId'] = order_id unless order_id.nil?
2378
+ command.query['fields'] = fields unless fields.nil?
2379
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2380
+ execute_or_queue_command(command, &block)
2381
+ end
2382
+
2383
+ # Sets (or overrides if it already exists) merchant provided annotations in the
2384
+ # form of key-value pairs. A common use case would be to supply us with
2385
+ # additional structured information about a line item that cannot be provided
2386
+ # via other methods. Submitted key-value pairs can be retrieved as part of the
2387
+ # orders resource.
2388
+ # @param [Fixnum] merchant_id
2389
+ # The ID of the account that manages the order. This cannot be a multi-client
2390
+ # account.
2391
+ # @param [String] order_id
2392
+ # The ID of the order.
2393
+ # @param [Google::Apis::ContentV2::OrdersSetLineItemMetadataRequest] orders_set_line_item_metadata_request_object
2394
+ # @param [String] fields
2395
+ # Selector specifying which fields to include in a partial response.
2396
+ # @param [String] quota_user
2397
+ # Available to use for quota purposes for server-side applications. Can be any
2398
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2399
+ # @param [Google::Apis::RequestOptions] options
2400
+ # Request-specific options
2401
+ #
2402
+ # @yield [result, err] Result & error if block supplied
2403
+ # @yieldparam result [Google::Apis::ContentV2::OrdersSetLineItemMetadataResponse] parsed result object
2404
+ # @yieldparam err [StandardError] error object if request failed
2405
+ #
2406
+ # @return [Google::Apis::ContentV2::OrdersSetLineItemMetadataResponse]
2407
+ #
2408
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2409
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2410
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2411
+ def setlineitemmetadata_order(merchant_id, order_id, orders_set_line_item_metadata_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2412
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orders/{orderId}/setLineItemMetadata', options)
2413
+ command.request_representation = Google::Apis::ContentV2::OrdersSetLineItemMetadataRequest::Representation
2414
+ command.request_object = orders_set_line_item_metadata_request_object
2415
+ command.response_representation = Google::Apis::ContentV2::OrdersSetLineItemMetadataResponse::Representation
2416
+ command.response_class = Google::Apis::ContentV2::OrdersSetLineItemMetadataResponse
2417
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2418
+ command.params['orderId'] = order_id unless order_id.nil?
2419
+ command.query['fields'] = fields unless fields.nil?
2420
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2421
+ execute_or_queue_command(command, &block)
2422
+ end
2423
+
2424
+ # Marks line item(s) as shipped.
2425
+ # @param [Fixnum] merchant_id
2426
+ # The ID of the account that manages the order. This cannot be a multi-client
2427
+ # account.
2428
+ # @param [String] order_id
2429
+ # The ID of the order.
2430
+ # @param [Google::Apis::ContentV2::OrdersShipLineItemsRequest] orders_ship_line_items_request_object
2431
+ # @param [String] fields
2432
+ # Selector specifying which fields to include in a partial response.
2433
+ # @param [String] quota_user
2434
+ # Available to use for quota purposes for server-side applications. Can be any
2435
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2436
+ # @param [Google::Apis::RequestOptions] options
2437
+ # Request-specific options
2438
+ #
2439
+ # @yield [result, err] Result & error if block supplied
2440
+ # @yieldparam result [Google::Apis::ContentV2::OrdersShipLineItemsResponse] parsed result object
2441
+ # @yieldparam err [StandardError] error object if request failed
2442
+ #
2443
+ # @return [Google::Apis::ContentV2::OrdersShipLineItemsResponse]
2444
+ #
2445
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2446
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2447
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2448
+ def shiplineitems_order(merchant_id, order_id, orders_ship_line_items_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2449
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orders/{orderId}/shipLineItems', options)
2450
+ command.request_representation = Google::Apis::ContentV2::OrdersShipLineItemsRequest::Representation
2451
+ command.request_object = orders_ship_line_items_request_object
2452
+ command.response_representation = Google::Apis::ContentV2::OrdersShipLineItemsResponse::Representation
2453
+ command.response_class = Google::Apis::ContentV2::OrdersShipLineItemsResponse
2454
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2455
+ command.params['orderId'] = order_id unless order_id.nil?
2456
+ command.query['fields'] = fields unless fields.nil?
2457
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2458
+ execute_or_queue_command(command, &block)
2459
+ end
2460
+
2461
+ # Updates ship by and delivery by dates for a line item.
2462
+ # @param [Fixnum] merchant_id
2463
+ # The ID of the account that manages the order. This cannot be a multi-client
2464
+ # account.
2465
+ # @param [String] order_id
2466
+ # The ID of the order.
2467
+ # @param [Google::Apis::ContentV2::OrdersUpdateLineItemShippingDetailsRequest] orders_update_line_item_shipping_details_request_object
2468
+ # @param [String] fields
2469
+ # Selector specifying which fields to include in a partial response.
2470
+ # @param [String] quota_user
2471
+ # Available to use for quota purposes for server-side applications. Can be any
2472
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2473
+ # @param [Google::Apis::RequestOptions] options
2474
+ # Request-specific options
2475
+ #
2476
+ # @yield [result, err] Result & error if block supplied
2477
+ # @yieldparam result [Google::Apis::ContentV2::OrdersUpdateLineItemShippingDetailsResponse] parsed result object
2478
+ # @yieldparam err [StandardError] error object if request failed
2479
+ #
2480
+ # @return [Google::Apis::ContentV2::OrdersUpdateLineItemShippingDetailsResponse]
2481
+ #
2482
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2483
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2484
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2485
+ def updatelineitemshippingdetails_order(merchant_id, order_id, orders_update_line_item_shipping_details_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2486
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orders/{orderId}/updateLineItemShippingDetails', options)
2487
+ command.request_representation = Google::Apis::ContentV2::OrdersUpdateLineItemShippingDetailsRequest::Representation
2488
+ command.request_object = orders_update_line_item_shipping_details_request_object
2489
+ command.response_representation = Google::Apis::ContentV2::OrdersUpdateLineItemShippingDetailsResponse::Representation
2490
+ command.response_class = Google::Apis::ContentV2::OrdersUpdateLineItemShippingDetailsResponse
2491
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2492
+ command.params['orderId'] = order_id unless order_id.nil?
2493
+ command.query['fields'] = fields unless fields.nil?
2494
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2495
+ execute_or_queue_command(command, &block)
2496
+ end
2497
+
2498
+ # Updates the merchant order ID for a given order.
2499
+ # @param [Fixnum] merchant_id
2500
+ # The ID of the account that manages the order. This cannot be a multi-client
2501
+ # account.
2502
+ # @param [String] order_id
2503
+ # The ID of the order.
2504
+ # @param [Google::Apis::ContentV2::OrdersUpdateMerchantOrderIdRequest] orders_update_merchant_order_id_request_object
2505
+ # @param [String] fields
2506
+ # Selector specifying which fields to include in a partial response.
2507
+ # @param [String] quota_user
2508
+ # Available to use for quota purposes for server-side applications. Can be any
2509
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2510
+ # @param [Google::Apis::RequestOptions] options
2511
+ # Request-specific options
2512
+ #
2513
+ # @yield [result, err] Result & error if block supplied
2514
+ # @yieldparam result [Google::Apis::ContentV2::OrdersUpdateMerchantOrderIdResponse] parsed result object
2515
+ # @yieldparam err [StandardError] error object if request failed
2516
+ #
2517
+ # @return [Google::Apis::ContentV2::OrdersUpdateMerchantOrderIdResponse]
2518
+ #
2519
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2520
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2521
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2522
+ def update_merchant_order_id(merchant_id, order_id, orders_update_merchant_order_id_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2523
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orders/{orderId}/updateMerchantOrderId', options)
2524
+ command.request_representation = Google::Apis::ContentV2::OrdersUpdateMerchantOrderIdRequest::Representation
2525
+ command.request_object = orders_update_merchant_order_id_request_object
2526
+ command.response_representation = Google::Apis::ContentV2::OrdersUpdateMerchantOrderIdResponse::Representation
2527
+ command.response_class = Google::Apis::ContentV2::OrdersUpdateMerchantOrderIdResponse
2528
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2529
+ command.params['orderId'] = order_id unless order_id.nil?
2530
+ command.query['fields'] = fields unless fields.nil?
2531
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2532
+ execute_or_queue_command(command, &block)
2533
+ end
2534
+
2535
+ # Updates a shipment's status, carrier, and/or tracking ID.
2536
+ # @param [Fixnum] merchant_id
2537
+ # The ID of the account that manages the order. This cannot be a multi-client
2538
+ # account.
2539
+ # @param [String] order_id
2540
+ # The ID of the order.
2541
+ # @param [Google::Apis::ContentV2::OrdersUpdateShipmentRequest] orders_update_shipment_request_object
2542
+ # @param [String] fields
2543
+ # Selector specifying which fields to include in a partial response.
2544
+ # @param [String] quota_user
2545
+ # Available to use for quota purposes for server-side applications. Can be any
2546
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2547
+ # @param [Google::Apis::RequestOptions] options
2548
+ # Request-specific options
2549
+ #
2550
+ # @yield [result, err] Result & error if block supplied
2551
+ # @yieldparam result [Google::Apis::ContentV2::OrdersUpdateShipmentResponse] parsed result object
2552
+ # @yieldparam err [StandardError] error object if request failed
2553
+ #
2554
+ # @return [Google::Apis::ContentV2::OrdersUpdateShipmentResponse]
2555
+ #
2556
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2557
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2558
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2559
+ def update_order_shipment(merchant_id, order_id, orders_update_shipment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2560
+ command = make_simple_command(:post, 'content/v2/{merchantId}/orders/{orderId}/updateShipment', options)
2561
+ command.request_representation = Google::Apis::ContentV2::OrdersUpdateShipmentRequest::Representation
2562
+ command.request_object = orders_update_shipment_request_object
2563
+ command.response_representation = Google::Apis::ContentV2::OrdersUpdateShipmentResponse::Representation
2564
+ command.response_class = Google::Apis::ContentV2::OrdersUpdateShipmentResponse
2565
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2566
+ command.params['orderId'] = order_id unless order_id.nil?
2567
+ command.query['fields'] = fields unless fields.nil?
2568
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2569
+ execute_or_queue_command(command, &block)
2570
+ end
2571
+
2572
+ # Batches multiple POS-related calls in a single request.
2573
+ # @param [Google::Apis::ContentV2::PosCustomBatchRequest] pos_custom_batch_request_object
2574
+ # @param [Boolean] dry_run
2575
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
2576
+ # mode checks the validity of the request and returns errors (if any).
2577
+ # @param [String] fields
2578
+ # Selector specifying which fields to include in a partial response.
2579
+ # @param [String] quota_user
2580
+ # Available to use for quota purposes for server-side applications. Can be any
2581
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2582
+ # @param [Google::Apis::RequestOptions] options
2583
+ # Request-specific options
2584
+ #
2585
+ # @yield [result, err] Result & error if block supplied
2586
+ # @yieldparam result [Google::Apis::ContentV2::PosCustomBatchResponse] parsed result object
2587
+ # @yieldparam err [StandardError] error object if request failed
2588
+ #
2589
+ # @return [Google::Apis::ContentV2::PosCustomBatchResponse]
2590
+ #
2591
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2592
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2593
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2594
+ def custombatch_po(pos_custom_batch_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
2595
+ command = make_simple_command(:post, 'content/v2/pos/batch', options)
2596
+ command.request_representation = Google::Apis::ContentV2::PosCustomBatchRequest::Representation
2597
+ command.request_object = pos_custom_batch_request_object
2598
+ command.response_representation = Google::Apis::ContentV2::PosCustomBatchResponse::Representation
2599
+ command.response_class = Google::Apis::ContentV2::PosCustomBatchResponse
2600
+ command.query['dryRun'] = dry_run unless dry_run.nil?
2601
+ command.query['fields'] = fields unless fields.nil?
2602
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2603
+ execute_or_queue_command(command, &block)
2604
+ end
2605
+
2606
+ # Deletes a store for the given merchant.
2607
+ # @param [Fixnum] merchant_id
2608
+ # The ID of the POS or inventory data provider.
2609
+ # @param [Fixnum] target_merchant_id
2610
+ # The ID of the target merchant.
2611
+ # @param [String] store_code
2612
+ # A store code that is unique per merchant.
2613
+ # @param [Boolean] dry_run
2614
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
2615
+ # mode checks the validity of the request and returns errors (if any).
2616
+ # @param [String] fields
2617
+ # Selector specifying which fields to include in a partial response.
2618
+ # @param [String] quota_user
2619
+ # Available to use for quota purposes for server-side applications. Can be any
2620
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2621
+ # @param [Google::Apis::RequestOptions] options
2622
+ # Request-specific options
2623
+ #
2624
+ # @yield [result, err] Result & error if block supplied
2625
+ # @yieldparam result [NilClass] No result returned for this method
2626
+ # @yieldparam err [StandardError] error object if request failed
2627
+ #
2628
+ # @return [void]
2629
+ #
2630
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2631
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2632
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2633
+ def delete_po(merchant_id, target_merchant_id, store_code, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
2634
+ command = make_simple_command(:delete, 'content/v2/{merchantId}/pos/{targetMerchantId}/store/{storeCode}', options)
2635
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2636
+ command.params['targetMerchantId'] = target_merchant_id unless target_merchant_id.nil?
2637
+ command.params['storeCode'] = store_code unless store_code.nil?
2638
+ command.query['dryRun'] = dry_run unless dry_run.nil?
2639
+ command.query['fields'] = fields unless fields.nil?
2640
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2641
+ execute_or_queue_command(command, &block)
2642
+ end
2643
+
2644
+ # Retrieves information about the given store.
2645
+ # @param [Fixnum] merchant_id
2646
+ # The ID of the POS or inventory data provider.
2647
+ # @param [Fixnum] target_merchant_id
2648
+ # The ID of the target merchant.
2649
+ # @param [String] store_code
2650
+ # A store code that is unique per merchant.
2651
+ # @param [String] fields
2652
+ # Selector specifying which fields to include in a partial response.
2653
+ # @param [String] quota_user
2654
+ # Available to use for quota purposes for server-side applications. Can be any
2655
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2656
+ # @param [Google::Apis::RequestOptions] options
2657
+ # Request-specific options
2658
+ #
2659
+ # @yield [result, err] Result & error if block supplied
2660
+ # @yieldparam result [Google::Apis::ContentV2::PosStore] parsed result object
2661
+ # @yieldparam err [StandardError] error object if request failed
2662
+ #
2663
+ # @return [Google::Apis::ContentV2::PosStore]
2664
+ #
2665
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2666
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2667
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2668
+ def get_po(merchant_id, target_merchant_id, store_code, fields: nil, quota_user: nil, options: nil, &block)
2669
+ command = make_simple_command(:get, 'content/v2/{merchantId}/pos/{targetMerchantId}/store/{storeCode}', options)
2670
+ command.response_representation = Google::Apis::ContentV2::PosStore::Representation
2671
+ command.response_class = Google::Apis::ContentV2::PosStore
2672
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2673
+ command.params['targetMerchantId'] = target_merchant_id unless target_merchant_id.nil?
2674
+ command.params['storeCode'] = store_code unless store_code.nil?
2675
+ command.query['fields'] = fields unless fields.nil?
2676
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2677
+ execute_or_queue_command(command, &block)
2678
+ end
2679
+
2680
+ # Creates a store for the given merchant.
2681
+ # @param [Fixnum] merchant_id
2682
+ # The ID of the POS or inventory data provider.
2683
+ # @param [Fixnum] target_merchant_id
2684
+ # The ID of the target merchant.
2685
+ # @param [Google::Apis::ContentV2::PosStore] pos_store_object
2686
+ # @param [Boolean] dry_run
2687
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
2688
+ # mode checks the validity of the request and returns errors (if any).
2689
+ # @param [String] fields
2690
+ # Selector specifying which fields to include in a partial response.
2691
+ # @param [String] quota_user
2692
+ # Available to use for quota purposes for server-side applications. Can be any
2693
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2694
+ # @param [Google::Apis::RequestOptions] options
2695
+ # Request-specific options
2696
+ #
2697
+ # @yield [result, err] Result & error if block supplied
2698
+ # @yieldparam result [Google::Apis::ContentV2::PosStore] parsed result object
2699
+ # @yieldparam err [StandardError] error object if request failed
2700
+ #
2701
+ # @return [Google::Apis::ContentV2::PosStore]
2702
+ #
2703
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2704
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2705
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2706
+ def insert_po(merchant_id, target_merchant_id, pos_store_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
2707
+ command = make_simple_command(:post, 'content/v2/{merchantId}/pos/{targetMerchantId}/store', options)
2708
+ command.request_representation = Google::Apis::ContentV2::PosStore::Representation
2709
+ command.request_object = pos_store_object
2710
+ command.response_representation = Google::Apis::ContentV2::PosStore::Representation
2711
+ command.response_class = Google::Apis::ContentV2::PosStore
2712
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2713
+ command.params['targetMerchantId'] = target_merchant_id unless target_merchant_id.nil?
2714
+ command.query['dryRun'] = dry_run unless dry_run.nil?
2715
+ command.query['fields'] = fields unless fields.nil?
2716
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2717
+ execute_or_queue_command(command, &block)
2718
+ end
2719
+
2720
+ # Submit inventory for the given merchant.
2721
+ # @param [Fixnum] merchant_id
2722
+ # The ID of the POS or inventory data provider.
2723
+ # @param [Fixnum] target_merchant_id
2724
+ # The ID of the target merchant.
2725
+ # @param [Google::Apis::ContentV2::PosInventoryRequest] pos_inventory_request_object
2726
+ # @param [Boolean] dry_run
2727
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
2728
+ # mode checks the validity of the request and returns errors (if any).
2729
+ # @param [String] fields
2730
+ # Selector specifying which fields to include in a partial response.
2731
+ # @param [String] quota_user
2732
+ # Available to use for quota purposes for server-side applications. Can be any
2733
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2734
+ # @param [Google::Apis::RequestOptions] options
2735
+ # Request-specific options
2736
+ #
2737
+ # @yield [result, err] Result & error if block supplied
2738
+ # @yieldparam result [Google::Apis::ContentV2::PosInventoryResponse] parsed result object
2739
+ # @yieldparam err [StandardError] error object if request failed
2740
+ #
2741
+ # @return [Google::Apis::ContentV2::PosInventoryResponse]
2742
+ #
2743
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2744
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2745
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2746
+ def inventory_po(merchant_id, target_merchant_id, pos_inventory_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
2747
+ command = make_simple_command(:post, 'content/v2/{merchantId}/pos/{targetMerchantId}/inventory', options)
2748
+ command.request_representation = Google::Apis::ContentV2::PosInventoryRequest::Representation
2749
+ command.request_object = pos_inventory_request_object
2750
+ command.response_representation = Google::Apis::ContentV2::PosInventoryResponse::Representation
2751
+ command.response_class = Google::Apis::ContentV2::PosInventoryResponse
2752
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2753
+ command.params['targetMerchantId'] = target_merchant_id unless target_merchant_id.nil?
2754
+ command.query['dryRun'] = dry_run unless dry_run.nil?
2755
+ command.query['fields'] = fields unless fields.nil?
2756
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2757
+ execute_or_queue_command(command, &block)
2758
+ end
2759
+
2760
+ # Lists the stores of the target merchant.
2761
+ # @param [Fixnum] merchant_id
2762
+ # The ID of the POS or inventory data provider.
2763
+ # @param [Fixnum] target_merchant_id
2764
+ # The ID of the target merchant.
2765
+ # @param [String] fields
2766
+ # Selector specifying which fields to include in a partial response.
2767
+ # @param [String] quota_user
2768
+ # Available to use for quota purposes for server-side applications. Can be any
2769
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2770
+ # @param [Google::Apis::RequestOptions] options
2771
+ # Request-specific options
2772
+ #
2773
+ # @yield [result, err] Result & error if block supplied
2774
+ # @yieldparam result [Google::Apis::ContentV2::PosListResponse] parsed result object
2775
+ # @yieldparam err [StandardError] error object if request failed
2776
+ #
2777
+ # @return [Google::Apis::ContentV2::PosListResponse]
2778
+ #
2779
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2780
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2781
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2782
+ def list_pos(merchant_id, target_merchant_id, fields: nil, quota_user: nil, options: nil, &block)
2783
+ command = make_simple_command(:get, 'content/v2/{merchantId}/pos/{targetMerchantId}/store', options)
2784
+ command.response_representation = Google::Apis::ContentV2::PosListResponse::Representation
2785
+ command.response_class = Google::Apis::ContentV2::PosListResponse
2786
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2787
+ command.params['targetMerchantId'] = target_merchant_id unless target_merchant_id.nil?
2788
+ command.query['fields'] = fields unless fields.nil?
2789
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2790
+ execute_or_queue_command(command, &block)
2791
+ end
2792
+
2793
+ # Submit a sale event for the given merchant.
2794
+ # @param [Fixnum] merchant_id
2795
+ # The ID of the POS or inventory data provider.
2796
+ # @param [Fixnum] target_merchant_id
2797
+ # The ID of the target merchant.
2798
+ # @param [Google::Apis::ContentV2::PosSaleRequest] pos_sale_request_object
2799
+ # @param [Boolean] dry_run
2800
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
2801
+ # mode checks the validity of the request and returns errors (if any).
2802
+ # @param [String] fields
2803
+ # Selector specifying which fields to include in a partial response.
2804
+ # @param [String] quota_user
2805
+ # Available to use for quota purposes for server-side applications. Can be any
2806
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2807
+ # @param [Google::Apis::RequestOptions] options
2808
+ # Request-specific options
2809
+ #
2810
+ # @yield [result, err] Result & error if block supplied
2811
+ # @yieldparam result [Google::Apis::ContentV2::PosSaleResponse] parsed result object
2812
+ # @yieldparam err [StandardError] error object if request failed
2813
+ #
2814
+ # @return [Google::Apis::ContentV2::PosSaleResponse]
2815
+ #
2816
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2817
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2818
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2819
+ def sale_po(merchant_id, target_merchant_id, pos_sale_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
2820
+ command = make_simple_command(:post, 'content/v2/{merchantId}/pos/{targetMerchantId}/sale', options)
2821
+ command.request_representation = Google::Apis::ContentV2::PosSaleRequest::Representation
2822
+ command.request_object = pos_sale_request_object
2823
+ command.response_representation = Google::Apis::ContentV2::PosSaleResponse::Representation
2824
+ command.response_class = Google::Apis::ContentV2::PosSaleResponse
2825
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2826
+ command.params['targetMerchantId'] = target_merchant_id unless target_merchant_id.nil?
2827
+ command.query['dryRun'] = dry_run unless dry_run.nil?
2828
+ command.query['fields'] = fields unless fields.nil?
2829
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2830
+ execute_or_queue_command(command, &block)
2831
+ end
2832
+
2833
+ # Retrieves, inserts, and deletes multiple products in a single request.
2834
+ # @param [Google::Apis::ContentV2::BatchProductsRequest] batch_products_request_object
2835
+ # @param [Boolean] dry_run
2836
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
2837
+ # mode checks the validity of the request and returns errors (if any).
2838
+ # @param [String] fields
2839
+ # Selector specifying which fields to include in a partial response.
2840
+ # @param [String] quota_user
2841
+ # Available to use for quota purposes for server-side applications. Can be any
2842
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2843
+ # @param [Google::Apis::RequestOptions] options
2844
+ # Request-specific options
2845
+ #
2846
+ # @yield [result, err] Result & error if block supplied
2847
+ # @yieldparam result [Google::Apis::ContentV2::BatchProductsResponse] parsed result object
2848
+ # @yieldparam err [StandardError] error object if request failed
2849
+ #
2850
+ # @return [Google::Apis::ContentV2::BatchProductsResponse]
2851
+ #
2852
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2853
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2854
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2855
+ def batch_product(batch_products_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
2856
+ command = make_simple_command(:post, 'content/v2/products/batch', options)
2857
+ command.request_representation = Google::Apis::ContentV2::BatchProductsRequest::Representation
2858
+ command.request_object = batch_products_request_object
2859
+ command.response_representation = Google::Apis::ContentV2::BatchProductsResponse::Representation
2860
+ command.response_class = Google::Apis::ContentV2::BatchProductsResponse
2861
+ command.query['dryRun'] = dry_run unless dry_run.nil?
2862
+ command.query['fields'] = fields unless fields.nil?
2863
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2864
+ execute_or_queue_command(command, &block)
2865
+ end
2866
+
2867
+ # Deletes a product from your Merchant Center account.
2868
+ # @param [Fixnum] merchant_id
2869
+ # The ID of the account that contains the product. This account cannot be a
2870
+ # multi-client account.
2871
+ # @param [String] product_id
2872
+ # The REST ID of the product.
2873
+ # @param [Boolean] dry_run
2874
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
2875
+ # mode checks the validity of the request and returns errors (if any).
2876
+ # @param [String] fields
2877
+ # Selector specifying which fields to include in a partial response.
2878
+ # @param [String] quota_user
2879
+ # Available to use for quota purposes for server-side applications. Can be any
2880
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2881
+ # @param [Google::Apis::RequestOptions] options
2882
+ # Request-specific options
2883
+ #
2884
+ # @yield [result, err] Result & error if block supplied
2885
+ # @yieldparam result [NilClass] No result returned for this method
2886
+ # @yieldparam err [StandardError] error object if request failed
2887
+ #
2888
+ # @return [void]
2889
+ #
2890
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2891
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2892
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2893
+ def delete_product(merchant_id, product_id, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
2894
+ command = make_simple_command(:delete, 'content/v2/{merchantId}/products/{productId}', options)
2895
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2896
+ command.params['productId'] = product_id unless product_id.nil?
2897
+ command.query['dryRun'] = dry_run unless dry_run.nil?
2898
+ command.query['fields'] = fields unless fields.nil?
2899
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2900
+ execute_or_queue_command(command, &block)
2901
+ end
2902
+
2903
+ # Retrieves a product from your Merchant Center account.
2904
+ # @param [Fixnum] merchant_id
2905
+ # The ID of the account that contains the product. This account cannot be a
2906
+ # multi-client account.
2907
+ # @param [String] product_id
2908
+ # The REST ID of the product.
2909
+ # @param [String] fields
2910
+ # Selector specifying which fields to include in a partial response.
2911
+ # @param [String] quota_user
2912
+ # Available to use for quota purposes for server-side applications. Can be any
2913
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2914
+ # @param [Google::Apis::RequestOptions] options
2915
+ # Request-specific options
2916
+ #
2917
+ # @yield [result, err] Result & error if block supplied
2918
+ # @yieldparam result [Google::Apis::ContentV2::Product] parsed result object
2919
+ # @yieldparam err [StandardError] error object if request failed
2920
+ #
2921
+ # @return [Google::Apis::ContentV2::Product]
2922
+ #
2923
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2924
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2925
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2926
+ def get_product(merchant_id, product_id, fields: nil, quota_user: nil, options: nil, &block)
2927
+ command = make_simple_command(:get, 'content/v2/{merchantId}/products/{productId}', options)
2928
+ command.response_representation = Google::Apis::ContentV2::Product::Representation
2929
+ command.response_class = Google::Apis::ContentV2::Product
2930
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2931
+ command.params['productId'] = product_id unless product_id.nil?
2932
+ command.query['fields'] = fields unless fields.nil?
2933
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2934
+ execute_or_queue_command(command, &block)
2935
+ end
2936
+
2937
+ # Uploads a product to your Merchant Center account. If an item with the same
2938
+ # channel, contentLanguage, offerId, and targetCountry already exists, this
2939
+ # method updates that entry.
2940
+ # @param [Fixnum] merchant_id
2941
+ # The ID of the account that contains the product. This account cannot be a
2942
+ # multi-client account.
2943
+ # @param [Google::Apis::ContentV2::Product] product_object
2944
+ # @param [Boolean] dry_run
2945
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
2946
+ # mode checks the validity of the request and returns errors (if any).
2947
+ # @param [String] fields
2948
+ # Selector specifying which fields to include in a partial response.
2949
+ # @param [String] quota_user
2950
+ # Available to use for quota purposes for server-side applications. Can be any
2951
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2952
+ # @param [Google::Apis::RequestOptions] options
2953
+ # Request-specific options
2954
+ #
2955
+ # @yield [result, err] Result & error if block supplied
2956
+ # @yieldparam result [Google::Apis::ContentV2::Product] parsed result object
2957
+ # @yieldparam err [StandardError] error object if request failed
2958
+ #
2959
+ # @return [Google::Apis::ContentV2::Product]
2960
+ #
2961
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2962
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2963
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2964
+ def insert_product(merchant_id, product_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
2965
+ command = make_simple_command(:post, 'content/v2/{merchantId}/products', options)
2966
+ command.request_representation = Google::Apis::ContentV2::Product::Representation
2967
+ command.request_object = product_object
2968
+ command.response_representation = Google::Apis::ContentV2::Product::Representation
2969
+ command.response_class = Google::Apis::ContentV2::Product
2970
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
2971
+ command.query['dryRun'] = dry_run unless dry_run.nil?
2972
+ command.query['fields'] = fields unless fields.nil?
2973
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2974
+ execute_or_queue_command(command, &block)
2975
+ end
2976
+
2977
+ # Lists the products in your Merchant Center account. The response might contain
2978
+ # fewer items than specified by maxResults. Rely on nextPageToken to determine
2979
+ # if there are more items to be requested.
2980
+ # @param [Fixnum] merchant_id
2981
+ # The ID of the account that contains the products. This account cannot be a
2982
+ # multi-client account.
2983
+ # @param [Boolean] include_invalid_inserted_items
2984
+ # Flag to include the invalid inserted items in the result of the list request.
2985
+ # By default the invalid items are not shown (the default value is false).
2986
+ # @param [Fixnum] max_results
2987
+ # The maximum number of products to return in the response, used for paging.
2988
+ # @param [String] page_token
2989
+ # The token returned by the previous request.
2990
+ # @param [String] fields
2991
+ # Selector specifying which fields to include in a partial response.
2992
+ # @param [String] quota_user
2993
+ # Available to use for quota purposes for server-side applications. Can be any
2994
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2995
+ # @param [Google::Apis::RequestOptions] options
2996
+ # Request-specific options
2997
+ #
2998
+ # @yield [result, err] Result & error if block supplied
2999
+ # @yieldparam result [Google::Apis::ContentV2::ListProductsResponse] parsed result object
3000
+ # @yieldparam err [StandardError] error object if request failed
3001
+ #
3002
+ # @return [Google::Apis::ContentV2::ListProductsResponse]
3003
+ #
3004
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3005
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3006
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3007
+ def list_products(merchant_id, include_invalid_inserted_items: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3008
+ command = make_simple_command(:get, 'content/v2/{merchantId}/products', options)
3009
+ command.response_representation = Google::Apis::ContentV2::ListProductsResponse::Representation
3010
+ command.response_class = Google::Apis::ContentV2::ListProductsResponse
3011
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
3012
+ command.query['includeInvalidInsertedItems'] = include_invalid_inserted_items unless include_invalid_inserted_items.nil?
3013
+ command.query['maxResults'] = max_results unless max_results.nil?
3014
+ command.query['pageToken'] = page_token unless page_token.nil?
3015
+ command.query['fields'] = fields unless fields.nil?
3016
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3017
+ execute_or_queue_command(command, &block)
3018
+ end
3019
+
3020
+ # Gets the statuses of multiple products in a single request.
3021
+ # @param [Google::Apis::ContentV2::BatchProductStatusesRequest] batch_product_statuses_request_object
3022
+ # @param [Boolean] include_attributes
3023
+ # Flag to include full product data in the results of this request. The default
3024
+ # value is false.
3025
+ # @param [String] fields
3026
+ # Selector specifying which fields to include in a partial response.
3027
+ # @param [String] quota_user
3028
+ # Available to use for quota purposes for server-side applications. Can be any
3029
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3030
+ # @param [Google::Apis::RequestOptions] options
3031
+ # Request-specific options
3032
+ #
3033
+ # @yield [result, err] Result & error if block supplied
3034
+ # @yieldparam result [Google::Apis::ContentV2::BatchProductStatusesResponse] parsed result object
3035
+ # @yieldparam err [StandardError] error object if request failed
3036
+ #
3037
+ # @return [Google::Apis::ContentV2::BatchProductStatusesResponse]
3038
+ #
3039
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3040
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3041
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3042
+ def batch_product_status(batch_product_statuses_request_object = nil, include_attributes: nil, fields: nil, quota_user: nil, options: nil, &block)
3043
+ command = make_simple_command(:post, 'content/v2/productstatuses/batch', options)
3044
+ command.request_representation = Google::Apis::ContentV2::BatchProductStatusesRequest::Representation
3045
+ command.request_object = batch_product_statuses_request_object
3046
+ command.response_representation = Google::Apis::ContentV2::BatchProductStatusesResponse::Representation
3047
+ command.response_class = Google::Apis::ContentV2::BatchProductStatusesResponse
3048
+ command.query['includeAttributes'] = include_attributes unless include_attributes.nil?
3049
+ command.query['fields'] = fields unless fields.nil?
3050
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3051
+ execute_or_queue_command(command, &block)
3052
+ end
3053
+
3054
+ # Gets the status of a product from your Merchant Center account.
3055
+ # @param [Fixnum] merchant_id
3056
+ # The ID of the account that contains the product. This account cannot be a
3057
+ # multi-client account.
3058
+ # @param [String] product_id
3059
+ # The REST ID of the product.
3060
+ # @param [Array<String>, String] destinations
3061
+ # If set, only issues for the specified destinations are returned, otherwise
3062
+ # only issues for the Shopping destination.
3063
+ # @param [Boolean] include_attributes
3064
+ # Flag to include full product data in the result of this get request. The
3065
+ # default value is false.
3066
+ # @param [String] fields
3067
+ # Selector specifying which fields to include in a partial response.
3068
+ # @param [String] quota_user
3069
+ # Available to use for quota purposes for server-side applications. Can be any
3070
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3071
+ # @param [Google::Apis::RequestOptions] options
3072
+ # Request-specific options
3073
+ #
3074
+ # @yield [result, err] Result & error if block supplied
3075
+ # @yieldparam result [Google::Apis::ContentV2::ProductStatus] parsed result object
3076
+ # @yieldparam err [StandardError] error object if request failed
3077
+ #
3078
+ # @return [Google::Apis::ContentV2::ProductStatus]
3079
+ #
3080
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3081
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3082
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3083
+ def get_product_status(merchant_id, product_id, destinations: nil, include_attributes: nil, fields: nil, quota_user: nil, options: nil, &block)
3084
+ command = make_simple_command(:get, 'content/v2/{merchantId}/productstatuses/{productId}', options)
3085
+ command.response_representation = Google::Apis::ContentV2::ProductStatus::Representation
3086
+ command.response_class = Google::Apis::ContentV2::ProductStatus
3087
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
3088
+ command.params['productId'] = product_id unless product_id.nil?
3089
+ command.query['destinations'] = destinations unless destinations.nil?
3090
+ command.query['includeAttributes'] = include_attributes unless include_attributes.nil?
3091
+ command.query['fields'] = fields unless fields.nil?
3092
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3093
+ execute_or_queue_command(command, &block)
3094
+ end
3095
+
3096
+ # Lists the statuses of the products in your Merchant Center account.
3097
+ # @param [Fixnum] merchant_id
3098
+ # The ID of the account that contains the products. This account cannot be a
3099
+ # multi-client account.
3100
+ # @param [Array<String>, String] destinations
3101
+ # If set, only issues for the specified destinations are returned, otherwise
3102
+ # only issues for the Shopping destination.
3103
+ # @param [Boolean] include_attributes
3104
+ # Flag to include full product data in the results of the list request. The
3105
+ # default value is false.
3106
+ # @param [Boolean] include_invalid_inserted_items
3107
+ # Flag to include the invalid inserted items in the result of the list request.
3108
+ # By default the invalid items are not shown (the default value is false).
3109
+ # @param [Fixnum] max_results
3110
+ # The maximum number of product statuses to return in the response, used for
3111
+ # paging.
3112
+ # @param [String] page_token
3113
+ # The token returned by the previous request.
3114
+ # @param [String] fields
3115
+ # Selector specifying which fields to include in a partial response.
3116
+ # @param [String] quota_user
3117
+ # Available to use for quota purposes for server-side applications. Can be any
3118
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3119
+ # @param [Google::Apis::RequestOptions] options
3120
+ # Request-specific options
3121
+ #
3122
+ # @yield [result, err] Result & error if block supplied
3123
+ # @yieldparam result [Google::Apis::ContentV2::ListProductStatusesResponse] parsed result object
3124
+ # @yieldparam err [StandardError] error object if request failed
3125
+ #
3126
+ # @return [Google::Apis::ContentV2::ListProductStatusesResponse]
3127
+ #
3128
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3129
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3130
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3131
+ def list_product_statuses(merchant_id, destinations: nil, include_attributes: nil, include_invalid_inserted_items: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3132
+ command = make_simple_command(:get, 'content/v2/{merchantId}/productstatuses', options)
3133
+ command.response_representation = Google::Apis::ContentV2::ListProductStatusesResponse::Representation
3134
+ command.response_class = Google::Apis::ContentV2::ListProductStatusesResponse
3135
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
3136
+ command.query['destinations'] = destinations unless destinations.nil?
3137
+ command.query['includeAttributes'] = include_attributes unless include_attributes.nil?
3138
+ command.query['includeInvalidInsertedItems'] = include_invalid_inserted_items unless include_invalid_inserted_items.nil?
3139
+ command.query['maxResults'] = max_results unless max_results.nil?
3140
+ command.query['pageToken'] = page_token unless page_token.nil?
3141
+ command.query['fields'] = fields unless fields.nil?
3142
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3143
+ execute_or_queue_command(command, &block)
3144
+ end
3145
+
3146
+ # Retrieves and updates the shipping settings of multiple accounts in a single
3147
+ # request.
3148
+ # @param [Google::Apis::ContentV2::ShippingsettingsCustomBatchRequest] shippingsettings_custom_batch_request_object
3149
+ # @param [Boolean] dry_run
3150
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
3151
+ # mode checks the validity of the request and returns errors (if any).
3152
+ # @param [String] fields
3153
+ # Selector specifying which fields to include in a partial response.
3154
+ # @param [String] quota_user
3155
+ # Available to use for quota purposes for server-side applications. Can be any
3156
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3157
+ # @param [Google::Apis::RequestOptions] options
3158
+ # Request-specific options
3159
+ #
3160
+ # @yield [result, err] Result & error if block supplied
3161
+ # @yieldparam result [Google::Apis::ContentV2::ShippingsettingsCustomBatchResponse] parsed result object
3162
+ # @yieldparam err [StandardError] error object if request failed
3163
+ #
3164
+ # @return [Google::Apis::ContentV2::ShippingsettingsCustomBatchResponse]
3165
+ #
3166
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3167
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3168
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3169
+ def custombatch_shippingsetting(shippingsettings_custom_batch_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
3170
+ command = make_simple_command(:post, 'content/v2/shippingsettings/batch', options)
3171
+ command.request_representation = Google::Apis::ContentV2::ShippingsettingsCustomBatchRequest::Representation
3172
+ command.request_object = shippingsettings_custom_batch_request_object
3173
+ command.response_representation = Google::Apis::ContentV2::ShippingsettingsCustomBatchResponse::Representation
3174
+ command.response_class = Google::Apis::ContentV2::ShippingsettingsCustomBatchResponse
3175
+ command.query['dryRun'] = dry_run unless dry_run.nil?
3176
+ command.query['fields'] = fields unless fields.nil?
3177
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3178
+ execute_or_queue_command(command, &block)
3179
+ end
3180
+
3181
+ # Retrieves the shipping settings of the account.
3182
+ # @param [Fixnum] merchant_id
3183
+ # The ID of the managing account. If this parameter is not the same as accountId,
3184
+ # then this account must be a multi-client account and `accountId` must be the
3185
+ # ID of a sub-account of this account.
3186
+ # @param [Fixnum] account_id
3187
+ # The ID of the account for which to get/update shipping settings.
3188
+ # @param [String] fields
3189
+ # Selector specifying which fields to include in a partial response.
3190
+ # @param [String] quota_user
3191
+ # Available to use for quota purposes for server-side applications. Can be any
3192
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3193
+ # @param [Google::Apis::RequestOptions] options
3194
+ # Request-specific options
3195
+ #
3196
+ # @yield [result, err] Result & error if block supplied
3197
+ # @yieldparam result [Google::Apis::ContentV2::ShippingSettings] parsed result object
3198
+ # @yieldparam err [StandardError] error object if request failed
3199
+ #
3200
+ # @return [Google::Apis::ContentV2::ShippingSettings]
3201
+ #
3202
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3203
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3204
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3205
+ def get_shippingsetting(merchant_id, account_id, fields: nil, quota_user: nil, options: nil, &block)
3206
+ command = make_simple_command(:get, 'content/v2/{merchantId}/shippingsettings/{accountId}', options)
3207
+ command.response_representation = Google::Apis::ContentV2::ShippingSettings::Representation
3208
+ command.response_class = Google::Apis::ContentV2::ShippingSettings
3209
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
3210
+ command.params['accountId'] = account_id unless account_id.nil?
3211
+ command.query['fields'] = fields unless fields.nil?
3212
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3213
+ execute_or_queue_command(command, &block)
3214
+ end
3215
+
3216
+ # Retrieves supported carriers and carrier services for an account.
3217
+ # @param [Fixnum] merchant_id
3218
+ # The ID of the account for which to retrieve the supported carriers.
3219
+ # @param [String] fields
3220
+ # Selector specifying which fields to include in a partial response.
3221
+ # @param [String] quota_user
3222
+ # Available to use for quota purposes for server-side applications. Can be any
3223
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3224
+ # @param [Google::Apis::RequestOptions] options
3225
+ # Request-specific options
3226
+ #
3227
+ # @yield [result, err] Result & error if block supplied
3228
+ # @yieldparam result [Google::Apis::ContentV2::ShippingsettingsGetSupportedCarriersResponse] parsed result object
3229
+ # @yieldparam err [StandardError] error object if request failed
3230
+ #
3231
+ # @return [Google::Apis::ContentV2::ShippingsettingsGetSupportedCarriersResponse]
3232
+ #
3233
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3234
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3235
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3236
+ def getsupportedcarriers_shippingsetting(merchant_id, fields: nil, quota_user: nil, options: nil, &block)
3237
+ command = make_simple_command(:get, 'content/v2/{merchantId}/supportedCarriers', options)
3238
+ command.response_representation = Google::Apis::ContentV2::ShippingsettingsGetSupportedCarriersResponse::Representation
3239
+ command.response_class = Google::Apis::ContentV2::ShippingsettingsGetSupportedCarriersResponse
3240
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
3241
+ command.query['fields'] = fields unless fields.nil?
3242
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3243
+ execute_or_queue_command(command, &block)
3244
+ end
3245
+
3246
+ # Retrieves supported holidays for an account.
3247
+ # @param [Fixnum] merchant_id
3248
+ # The ID of the account for which to retrieve the supported holidays.
3249
+ # @param [String] fields
3250
+ # Selector specifying which fields to include in a partial response.
3251
+ # @param [String] quota_user
3252
+ # Available to use for quota purposes for server-side applications. Can be any
3253
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3254
+ # @param [Google::Apis::RequestOptions] options
3255
+ # Request-specific options
3256
+ #
3257
+ # @yield [result, err] Result & error if block supplied
3258
+ # @yieldparam result [Google::Apis::ContentV2::ShippingsettingsGetSupportedHolidaysResponse] parsed result object
3259
+ # @yieldparam err [StandardError] error object if request failed
3260
+ #
3261
+ # @return [Google::Apis::ContentV2::ShippingsettingsGetSupportedHolidaysResponse]
3262
+ #
3263
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3264
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3265
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3266
+ def getsupportedholidays_shippingsetting(merchant_id, fields: nil, quota_user: nil, options: nil, &block)
3267
+ command = make_simple_command(:get, 'content/v2/{merchantId}/supportedHolidays', options)
3268
+ command.response_representation = Google::Apis::ContentV2::ShippingsettingsGetSupportedHolidaysResponse::Representation
3269
+ command.response_class = Google::Apis::ContentV2::ShippingsettingsGetSupportedHolidaysResponse
3270
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
3271
+ command.query['fields'] = fields unless fields.nil?
3272
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3273
+ execute_or_queue_command(command, &block)
3274
+ end
3275
+
3276
+ # Retrieves supported pickup services for an account.
3277
+ # @param [Fixnum] merchant_id
3278
+ # The ID of the account for which to retrieve the supported pickup services.
3279
+ # @param [String] fields
3280
+ # Selector specifying which fields to include in a partial response.
3281
+ # @param [String] quota_user
3282
+ # Available to use for quota purposes for server-side applications. Can be any
3283
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3284
+ # @param [Google::Apis::RequestOptions] options
3285
+ # Request-specific options
3286
+ #
3287
+ # @yield [result, err] Result & error if block supplied
3288
+ # @yieldparam result [Google::Apis::ContentV2::ShippingsettingsGetSupportedPickupServicesResponse] parsed result object
3289
+ # @yieldparam err [StandardError] error object if request failed
3290
+ #
3291
+ # @return [Google::Apis::ContentV2::ShippingsettingsGetSupportedPickupServicesResponse]
3292
+ #
3293
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3294
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3295
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3296
+ def getsupportedpickupservices_shippingsetting(merchant_id, fields: nil, quota_user: nil, options: nil, &block)
3297
+ command = make_simple_command(:get, 'content/v2/{merchantId}/supportedPickupServices', options)
3298
+ command.response_representation = Google::Apis::ContentV2::ShippingsettingsGetSupportedPickupServicesResponse::Representation
3299
+ command.response_class = Google::Apis::ContentV2::ShippingsettingsGetSupportedPickupServicesResponse
3300
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
3301
+ command.query['fields'] = fields unless fields.nil?
3302
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3303
+ execute_or_queue_command(command, &block)
3304
+ end
3305
+
3306
+ # Lists the shipping settings of the sub-accounts in your Merchant Center
3307
+ # account.
3308
+ # @param [Fixnum] merchant_id
3309
+ # The ID of the managing account. This must be a multi-client account.
3310
+ # @param [Fixnum] max_results
3311
+ # The maximum number of shipping settings to return in the response, used for
3312
+ # paging.
3313
+ # @param [String] page_token
3314
+ # The token returned by the previous request.
3315
+ # @param [String] fields
3316
+ # Selector specifying which fields to include in a partial response.
3317
+ # @param [String] quota_user
3318
+ # Available to use for quota purposes for server-side applications. Can be any
3319
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3320
+ # @param [Google::Apis::RequestOptions] options
3321
+ # Request-specific options
3322
+ #
3323
+ # @yield [result, err] Result & error if block supplied
3324
+ # @yieldparam result [Google::Apis::ContentV2::ShippingsettingsListResponse] parsed result object
3325
+ # @yieldparam err [StandardError] error object if request failed
3326
+ #
3327
+ # @return [Google::Apis::ContentV2::ShippingsettingsListResponse]
3328
+ #
3329
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3330
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3331
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3332
+ def list_shippingsettings(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3333
+ command = make_simple_command(:get, 'content/v2/{merchantId}/shippingsettings', options)
3334
+ command.response_representation = Google::Apis::ContentV2::ShippingsettingsListResponse::Representation
3335
+ command.response_class = Google::Apis::ContentV2::ShippingsettingsListResponse
3336
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
3337
+ command.query['maxResults'] = max_results unless max_results.nil?
3338
+ command.query['pageToken'] = page_token unless page_token.nil?
3339
+ command.query['fields'] = fields unless fields.nil?
3340
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3341
+ execute_or_queue_command(command, &block)
3342
+ end
3343
+
3344
+ # Updates the shipping settings of the account. Any fields that are not provided
3345
+ # are deleted from the resource.
3346
+ # @param [Fixnum] merchant_id
3347
+ # The ID of the managing account. If this parameter is not the same as accountId,
3348
+ # then this account must be a multi-client account and `accountId` must be the
3349
+ # ID of a sub-account of this account.
3350
+ # @param [Fixnum] account_id
3351
+ # The ID of the account for which to get/update shipping settings.
3352
+ # @param [Google::Apis::ContentV2::ShippingSettings] shipping_settings_object
3353
+ # @param [Boolean] dry_run
3354
+ # Flag to simulate a request like in a live environment. If set to true, dry-run
3355
+ # mode checks the validity of the request and returns errors (if any).
3356
+ # @param [String] fields
3357
+ # Selector specifying which fields to include in a partial response.
3358
+ # @param [String] quota_user
3359
+ # Available to use for quota purposes for server-side applications. Can be any
3360
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3361
+ # @param [Google::Apis::RequestOptions] options
3362
+ # Request-specific options
3363
+ #
3364
+ # @yield [result, err] Result & error if block supplied
3365
+ # @yieldparam result [Google::Apis::ContentV2::ShippingSettings] parsed result object
3366
+ # @yieldparam err [StandardError] error object if request failed
3367
+ #
3368
+ # @return [Google::Apis::ContentV2::ShippingSettings]
3369
+ #
3370
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3371
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3372
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3373
+ def update_shippingsetting(merchant_id, account_id, shipping_settings_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
3374
+ command = make_simple_command(:put, 'content/v2/{merchantId}/shippingsettings/{accountId}', options)
3375
+ command.request_representation = Google::Apis::ContentV2::ShippingSettings::Representation
3376
+ command.request_object = shipping_settings_object
3377
+ command.response_representation = Google::Apis::ContentV2::ShippingSettings::Representation
3378
+ command.response_class = Google::Apis::ContentV2::ShippingSettings
3379
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
3380
+ command.params['accountId'] = account_id unless account_id.nil?
3381
+ command.query['dryRun'] = dry_run unless dry_run.nil?
3382
+ command.query['fields'] = fields unless fields.nil?
3383
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3384
+ execute_or_queue_command(command, &block)
3385
+ end
3386
+
3387
+ protected
3388
+
3389
+ def apply_command_defaults(command)
3390
+ command.query['key'] = key unless key.nil?
3391
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3392
+ end
3393
+ end
3394
+ end
3395
+ end
3396
+ end