@googleapis/merchantapi 5.0.0 → 8.0.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.
- package/CHANGELOG.md +50 -0
- package/README.md +9 -0
- package/accounts_v1beta.ts +6487 -518
- package/build/accounts_v1beta.d.ts +4773 -229
- package/build/accounts_v1beta.js +560 -12
- package/build/accounts_v1beta.js.map +1 -1
- package/build/conversions_v1beta.d.ts +349 -14
- package/build/conversions_v1beta.js.map +1 -1
- package/build/datasources_v1beta.d.ts +427 -18
- package/build/datasources_v1beta.js.map +1 -1
- package/build/index.d.ts +11 -1
- package/build/index.js +7 -1
- package/build/index.js.map +1 -1
- package/build/inventories_v1beta.d.ts +349 -15
- package/build/inventories_v1beta.js.map +1 -1
- package/build/issueresolution_v1beta.d.ts +1027 -0
- package/build/issueresolution_v1beta.js +196 -0
- package/build/issueresolution_v1beta.js.map +1 -0
- package/build/lfp_v1beta.d.ts +451 -18
- package/build/lfp_v1beta.js.map +1 -1
- package/build/notifications_v1beta.d.ts +283 -12
- package/build/notifications_v1beta.js.map +1 -1
- package/build/ordertracking_v1beta.d.ts +459 -0
- package/build/ordertracking_v1beta.js +91 -0
- package/build/ordertracking_v1beta.js.map +1 -0
- package/build/products_v1beta.d.ts +358 -55
- package/build/products_v1beta.js.map +1 -1
- package/build/promotions_v1beta.d.ts +178 -11
- package/build/promotions_v1beta.js.map +1 -1
- package/build/quota_v1beta.d.ts +55 -4
- package/build/quota_v1beta.js.map +1 -1
- package/build/reports_v1beta.d.ts +61 -4
- package/build/reports_v1beta.js.map +1 -1
- package/build/reviews_v1beta.d.ts +443 -19
- package/build/reviews_v1beta.js.map +1 -1
- package/conversions_v1beta.ts +371 -21
- package/datasources_v1beta.ts +453 -26
- package/index.ts +24 -1
- package/inventories_v1beta.ts +367 -24
- package/issueresolution_v1beta.ts +1426 -0
- package/lfp_v1beta.ts +477 -26
- package/notifications_v1beta.ts +299 -21
- package/ordertracking_v1beta.ts +599 -0
- package/package.json +2 -2
- package/products_v1beta.ts +376 -61
- package/promotions_v1beta.ts +188 -15
- package/quota_v1beta.ts +57 -6
- package/reports_v1beta.ts +65 -5
- package/reviews_v1beta.ts +471 -29
package/index.ts
CHANGED
|
@@ -18,8 +18,10 @@ import {merchantapi_accounts_v1beta} from './accounts_v1beta';
|
|
|
18
18
|
import {merchantapi_conversions_v1beta} from './conversions_v1beta';
|
|
19
19
|
import {merchantapi_datasources_v1beta} from './datasources_v1beta';
|
|
20
20
|
import {merchantapi_inventories_v1beta} from './inventories_v1beta';
|
|
21
|
+
import {merchantapi_issueresolution_v1beta} from './issueresolution_v1beta';
|
|
21
22
|
import {merchantapi_lfp_v1beta} from './lfp_v1beta';
|
|
22
23
|
import {merchantapi_notifications_v1beta} from './notifications_v1beta';
|
|
24
|
+
import {merchantapi_ordertracking_v1beta} from './ordertracking_v1beta';
|
|
23
25
|
import {merchantapi_products_v1beta} from './products_v1beta';
|
|
24
26
|
import {merchantapi_promotions_v1beta} from './promotions_v1beta';
|
|
25
27
|
import {merchantapi_quota_v1beta} from './quota_v1beta';
|
|
@@ -31,8 +33,10 @@ export const VERSIONS = {
|
|
|
31
33
|
conversions_v1beta: merchantapi_conversions_v1beta.Merchantapi,
|
|
32
34
|
datasources_v1beta: merchantapi_datasources_v1beta.Merchantapi,
|
|
33
35
|
inventories_v1beta: merchantapi_inventories_v1beta.Merchantapi,
|
|
36
|
+
issueresolution_v1beta: merchantapi_issueresolution_v1beta.Merchantapi,
|
|
34
37
|
lfp_v1beta: merchantapi_lfp_v1beta.Merchantapi,
|
|
35
38
|
notifications_v1beta: merchantapi_notifications_v1beta.Merchantapi,
|
|
39
|
+
ordertracking_v1beta: merchantapi_ordertracking_v1beta.Merchantapi,
|
|
36
40
|
products_v1beta: merchantapi_products_v1beta.Merchantapi,
|
|
37
41
|
promotions_v1beta: merchantapi_promotions_v1beta.Merchantapi,
|
|
38
42
|
quota_v1beta: merchantapi_quota_v1beta.Merchantapi,
|
|
@@ -64,6 +68,12 @@ export function merchantapi(
|
|
|
64
68
|
export function merchantapi(
|
|
65
69
|
options: merchantapi_inventories_v1beta.Options
|
|
66
70
|
): merchantapi_inventories_v1beta.Merchantapi;
|
|
71
|
+
export function merchantapi(
|
|
72
|
+
version: 'issueresolution_v1beta'
|
|
73
|
+
): merchantapi_issueresolution_v1beta.Merchantapi;
|
|
74
|
+
export function merchantapi(
|
|
75
|
+
options: merchantapi_issueresolution_v1beta.Options
|
|
76
|
+
): merchantapi_issueresolution_v1beta.Merchantapi;
|
|
67
77
|
export function merchantapi(
|
|
68
78
|
version: 'lfp_v1beta'
|
|
69
79
|
): merchantapi_lfp_v1beta.Merchantapi;
|
|
@@ -76,6 +86,12 @@ export function merchantapi(
|
|
|
76
86
|
export function merchantapi(
|
|
77
87
|
options: merchantapi_notifications_v1beta.Options
|
|
78
88
|
): merchantapi_notifications_v1beta.Merchantapi;
|
|
89
|
+
export function merchantapi(
|
|
90
|
+
version: 'ordertracking_v1beta'
|
|
91
|
+
): merchantapi_ordertracking_v1beta.Merchantapi;
|
|
92
|
+
export function merchantapi(
|
|
93
|
+
options: merchantapi_ordertracking_v1beta.Options
|
|
94
|
+
): merchantapi_ordertracking_v1beta.Merchantapi;
|
|
79
95
|
export function merchantapi(
|
|
80
96
|
version: 'products_v1beta'
|
|
81
97
|
): merchantapi_products_v1beta.Merchantapi;
|
|
@@ -112,8 +128,10 @@ export function merchantapi<
|
|
|
112
128
|
| merchantapi_conversions_v1beta.Merchantapi
|
|
113
129
|
| merchantapi_datasources_v1beta.Merchantapi
|
|
114
130
|
| merchantapi_inventories_v1beta.Merchantapi
|
|
131
|
+
| merchantapi_issueresolution_v1beta.Merchantapi
|
|
115
132
|
| merchantapi_lfp_v1beta.Merchantapi
|
|
116
133
|
| merchantapi_notifications_v1beta.Merchantapi
|
|
134
|
+
| merchantapi_ordertracking_v1beta.Merchantapi
|
|
117
135
|
| merchantapi_products_v1beta.Merchantapi
|
|
118
136
|
| merchantapi_promotions_v1beta.Merchantapi
|
|
119
137
|
| merchantapi_quota_v1beta.Merchantapi
|
|
@@ -130,10 +148,14 @@ export function merchantapi<
|
|
|
130
148
|
| merchantapi_datasources_v1beta.Options
|
|
131
149
|
| 'inventories_v1beta'
|
|
132
150
|
| merchantapi_inventories_v1beta.Options
|
|
151
|
+
| 'issueresolution_v1beta'
|
|
152
|
+
| merchantapi_issueresolution_v1beta.Options
|
|
133
153
|
| 'lfp_v1beta'
|
|
134
154
|
| merchantapi_lfp_v1beta.Options
|
|
135
155
|
| 'notifications_v1beta'
|
|
136
156
|
| merchantapi_notifications_v1beta.Options
|
|
157
|
+
| 'ordertracking_v1beta'
|
|
158
|
+
| merchantapi_ordertracking_v1beta.Options
|
|
137
159
|
| 'products_v1beta'
|
|
138
160
|
| merchantapi_products_v1beta.Options
|
|
139
161
|
| 'promotions_v1beta'
|
|
@@ -154,8 +176,10 @@ export {merchantapi_accounts_v1beta};
|
|
|
154
176
|
export {merchantapi_conversions_v1beta};
|
|
155
177
|
export {merchantapi_datasources_v1beta};
|
|
156
178
|
export {merchantapi_inventories_v1beta};
|
|
179
|
+
export {merchantapi_issueresolution_v1beta};
|
|
157
180
|
export {merchantapi_lfp_v1beta};
|
|
158
181
|
export {merchantapi_notifications_v1beta};
|
|
182
|
+
export {merchantapi_ordertracking_v1beta};
|
|
159
183
|
export {merchantapi_products_v1beta};
|
|
160
184
|
export {merchantapi_promotions_v1beta};
|
|
161
185
|
export {merchantapi_quota_v1beta};
|
|
@@ -167,7 +191,6 @@ export {
|
|
|
167
191
|
APIRequestContext,
|
|
168
192
|
GoogleConfigurable,
|
|
169
193
|
StreamMethodOptions,
|
|
170
|
-
GaxiosPromise,
|
|
171
194
|
MethodOptions,
|
|
172
195
|
BodyResponseCallback,
|
|
173
196
|
} from 'googleapis-common';
|
package/inventories_v1beta.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
Compute,
|
|
24
24
|
UserRefreshClient,
|
|
25
25
|
BaseExternalAccountClient,
|
|
26
|
-
|
|
26
|
+
GaxiosResponseWithHTTP2,
|
|
27
27
|
GoogleConfigurable,
|
|
28
28
|
createAPIRequest,
|
|
29
29
|
MethodOptions,
|
|
@@ -292,7 +292,7 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
292
292
|
*/
|
|
293
293
|
eventTime?: string | null;
|
|
294
294
|
/**
|
|
295
|
-
* Optional. The product expiration time. This field will not
|
|
295
|
+
* Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
|
|
296
296
|
*/
|
|
297
297
|
expirationTime?: string | null;
|
|
298
298
|
/**
|
|
@@ -321,7 +321,7 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
321
321
|
*/
|
|
322
322
|
account?: string | null;
|
|
323
323
|
/**
|
|
324
|
-
* Availability of the product in this region. For accepted attribute values, see the [regional product inventory data specification](https://support.google.com/merchants/answer/
|
|
324
|
+
* Availability of the product in this region. For accepted attribute values, see the [regional product inventory data specification](https://support.google.com/merchants/answer/14644124).
|
|
325
325
|
*/
|
|
326
326
|
availability?: string | null;
|
|
327
327
|
/**
|
|
@@ -381,6 +381,50 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
381
381
|
|
|
382
382
|
/**
|
|
383
383
|
* Deletes the specified `LocalInventory` from the given product in your merchant account. It might take a up to an hour for the `LocalInventory` to be deleted from the specific product. Once you have received a successful delete response, wait for that period before attempting a delete again.
|
|
384
|
+
* @example
|
|
385
|
+
* ```js
|
|
386
|
+
* // Before running the sample:
|
|
387
|
+
* // - Enable the API at:
|
|
388
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
389
|
+
* // - Login into gcloud by running:
|
|
390
|
+
* // ```sh
|
|
391
|
+
* // $ gcloud auth application-default login
|
|
392
|
+
* // ```
|
|
393
|
+
* // - Install the npm module by running:
|
|
394
|
+
* // ```sh
|
|
395
|
+
* // $ npm install googleapis
|
|
396
|
+
* // ```
|
|
397
|
+
*
|
|
398
|
+
* const {google} = require('googleapis');
|
|
399
|
+
* const merchantapi = google.merchantapi('inventories_v1beta');
|
|
400
|
+
*
|
|
401
|
+
* async function main() {
|
|
402
|
+
* const auth = new google.auth.GoogleAuth({
|
|
403
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
404
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
405
|
+
* });
|
|
406
|
+
*
|
|
407
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
408
|
+
* const authClient = await auth.getClient();
|
|
409
|
+
* google.options({auth: authClient});
|
|
410
|
+
*
|
|
411
|
+
* // Do the magic
|
|
412
|
+
* const res = await merchantapi.accounts.products.localInventories.delete({
|
|
413
|
+
* // Required. The name of the local inventory for the given product to delete. Format: `accounts/{account\}/products/{product\}/localInventories/{store_code\}`
|
|
414
|
+
* name: 'accounts/my-account/products/my-product/localInventories/my-localInventorie',
|
|
415
|
+
* });
|
|
416
|
+
* console.log(res.data);
|
|
417
|
+
*
|
|
418
|
+
* // Example response
|
|
419
|
+
* // {}
|
|
420
|
+
* }
|
|
421
|
+
*
|
|
422
|
+
* main().catch(e => {
|
|
423
|
+
* console.error(e);
|
|
424
|
+
* throw e;
|
|
425
|
+
* });
|
|
426
|
+
*
|
|
427
|
+
* ```
|
|
384
428
|
*
|
|
385
429
|
* @param params - Parameters for request
|
|
386
430
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -390,11 +434,11 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
390
434
|
delete(
|
|
391
435
|
params: Params$Resource$Accounts$Products$Localinventories$Delete,
|
|
392
436
|
options: StreamMethodOptions
|
|
393
|
-
):
|
|
437
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
394
438
|
delete(
|
|
395
439
|
params?: Params$Resource$Accounts$Products$Localinventories$Delete,
|
|
396
440
|
options?: MethodOptions
|
|
397
|
-
):
|
|
441
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
398
442
|
delete(
|
|
399
443
|
params: Params$Resource$Accounts$Products$Localinventories$Delete,
|
|
400
444
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -423,7 +467,10 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
423
467
|
callback?:
|
|
424
468
|
| BodyResponseCallback<Schema$Empty>
|
|
425
469
|
| BodyResponseCallback<Readable>
|
|
426
|
-
):
|
|
470
|
+
):
|
|
471
|
+
| void
|
|
472
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
|
|
473
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
427
474
|
let params = (paramsOrCallback ||
|
|
428
475
|
{}) as Params$Resource$Accounts$Products$Localinventories$Delete;
|
|
429
476
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -470,6 +517,82 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
470
517
|
|
|
471
518
|
/**
|
|
472
519
|
* Inserts a `LocalInventory` resource to a product in your merchant account. Replaces the full `LocalInventory` resource if an entry with the same `storeCode` already exists for the product. It might take up to 30 minutes for the new or updated `LocalInventory` resource to appear in products.
|
|
520
|
+
* @example
|
|
521
|
+
* ```js
|
|
522
|
+
* // Before running the sample:
|
|
523
|
+
* // - Enable the API at:
|
|
524
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
525
|
+
* // - Login into gcloud by running:
|
|
526
|
+
* // ```sh
|
|
527
|
+
* // $ gcloud auth application-default login
|
|
528
|
+
* // ```
|
|
529
|
+
* // - Install the npm module by running:
|
|
530
|
+
* // ```sh
|
|
531
|
+
* // $ npm install googleapis
|
|
532
|
+
* // ```
|
|
533
|
+
*
|
|
534
|
+
* const {google} = require('googleapis');
|
|
535
|
+
* const merchantapi = google.merchantapi('inventories_v1beta');
|
|
536
|
+
*
|
|
537
|
+
* async function main() {
|
|
538
|
+
* const auth = new google.auth.GoogleAuth({
|
|
539
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
540
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
541
|
+
* });
|
|
542
|
+
*
|
|
543
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
544
|
+
* const authClient = await auth.getClient();
|
|
545
|
+
* google.options({auth: authClient});
|
|
546
|
+
*
|
|
547
|
+
* // Do the magic
|
|
548
|
+
* const res = await merchantapi.accounts.products.localInventories.insert({
|
|
549
|
+
* // Required. The account and product where this inventory will be inserted. Format: `accounts/{account\}/products/{product\}`
|
|
550
|
+
* parent: 'accounts/my-account/products/my-product',
|
|
551
|
+
*
|
|
552
|
+
* // Request body metadata
|
|
553
|
+
* requestBody: {
|
|
554
|
+
* // request body parameters
|
|
555
|
+
* // {
|
|
556
|
+
* // "account": "my_account",
|
|
557
|
+
* // "availability": "my_availability",
|
|
558
|
+
* // "customAttributes": [],
|
|
559
|
+
* // "instoreProductLocation": "my_instoreProductLocation",
|
|
560
|
+
* // "name": "my_name",
|
|
561
|
+
* // "pickupMethod": "my_pickupMethod",
|
|
562
|
+
* // "pickupSla": "my_pickupSla",
|
|
563
|
+
* // "price": {},
|
|
564
|
+
* // "quantity": "my_quantity",
|
|
565
|
+
* // "salePrice": {},
|
|
566
|
+
* // "salePriceEffectiveDate": {},
|
|
567
|
+
* // "storeCode": "my_storeCode"
|
|
568
|
+
* // }
|
|
569
|
+
* },
|
|
570
|
+
* });
|
|
571
|
+
* console.log(res.data);
|
|
572
|
+
*
|
|
573
|
+
* // Example response
|
|
574
|
+
* // {
|
|
575
|
+
* // "account": "my_account",
|
|
576
|
+
* // "availability": "my_availability",
|
|
577
|
+
* // "customAttributes": [],
|
|
578
|
+
* // "instoreProductLocation": "my_instoreProductLocation",
|
|
579
|
+
* // "name": "my_name",
|
|
580
|
+
* // "pickupMethod": "my_pickupMethod",
|
|
581
|
+
* // "pickupSla": "my_pickupSla",
|
|
582
|
+
* // "price": {},
|
|
583
|
+
* // "quantity": "my_quantity",
|
|
584
|
+
* // "salePrice": {},
|
|
585
|
+
* // "salePriceEffectiveDate": {},
|
|
586
|
+
* // "storeCode": "my_storeCode"
|
|
587
|
+
* // }
|
|
588
|
+
* }
|
|
589
|
+
*
|
|
590
|
+
* main().catch(e => {
|
|
591
|
+
* console.error(e);
|
|
592
|
+
* throw e;
|
|
593
|
+
* });
|
|
594
|
+
*
|
|
595
|
+
* ```
|
|
473
596
|
*
|
|
474
597
|
* @param params - Parameters for request
|
|
475
598
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -479,11 +602,11 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
479
602
|
insert(
|
|
480
603
|
params: Params$Resource$Accounts$Products$Localinventories$Insert,
|
|
481
604
|
options: StreamMethodOptions
|
|
482
|
-
):
|
|
605
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
483
606
|
insert(
|
|
484
607
|
params?: Params$Resource$Accounts$Products$Localinventories$Insert,
|
|
485
608
|
options?: MethodOptions
|
|
486
|
-
):
|
|
609
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$LocalInventory>>;
|
|
487
610
|
insert(
|
|
488
611
|
params: Params$Resource$Accounts$Products$Localinventories$Insert,
|
|
489
612
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -512,7 +635,10 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
512
635
|
callback?:
|
|
513
636
|
| BodyResponseCallback<Schema$LocalInventory>
|
|
514
637
|
| BodyResponseCallback<Readable>
|
|
515
|
-
):
|
|
638
|
+
):
|
|
639
|
+
| void
|
|
640
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$LocalInventory>>
|
|
641
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
516
642
|
let params = (paramsOrCallback ||
|
|
517
643
|
{}) as Params$Resource$Accounts$Products$Localinventories$Insert;
|
|
518
644
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -558,6 +684,57 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
558
684
|
|
|
559
685
|
/**
|
|
560
686
|
* Lists the `LocalInventory` resources for the given product in your merchant account. The response might contain fewer items than specified by `pageSize`. If `pageToken` was returned in previous request, it can be used to obtain additional results. `LocalInventory` resources are listed per product for a given account.
|
|
687
|
+
* @example
|
|
688
|
+
* ```js
|
|
689
|
+
* // Before running the sample:
|
|
690
|
+
* // - Enable the API at:
|
|
691
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
692
|
+
* // - Login into gcloud by running:
|
|
693
|
+
* // ```sh
|
|
694
|
+
* // $ gcloud auth application-default login
|
|
695
|
+
* // ```
|
|
696
|
+
* // - Install the npm module by running:
|
|
697
|
+
* // ```sh
|
|
698
|
+
* // $ npm install googleapis
|
|
699
|
+
* // ```
|
|
700
|
+
*
|
|
701
|
+
* const {google} = require('googleapis');
|
|
702
|
+
* const merchantapi = google.merchantapi('inventories_v1beta');
|
|
703
|
+
*
|
|
704
|
+
* async function main() {
|
|
705
|
+
* const auth = new google.auth.GoogleAuth({
|
|
706
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
707
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
708
|
+
* });
|
|
709
|
+
*
|
|
710
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
711
|
+
* const authClient = await auth.getClient();
|
|
712
|
+
* google.options({auth: authClient});
|
|
713
|
+
*
|
|
714
|
+
* // Do the magic
|
|
715
|
+
* const res = await merchantapi.accounts.products.localInventories.list({
|
|
716
|
+
* // The maximum number of `LocalInventory` resources for the given product to return. The service returns fewer than this value if the number of inventories for the given product is less that than the `pageSize`. The default value is 25000. The maximum value is 25000; If a value higher than the maximum is specified, then the `pageSize` will default to the maximum
|
|
717
|
+
* pageSize: 'placeholder-value',
|
|
718
|
+
* // A page token, received from a previous `ListLocalInventories` call. Provide the page token to retrieve the subsequent page. When paginating, all other parameters provided to `ListLocalInventories` must match the call that provided the page token. The token returned as nextPageToken in the response to the previous request.
|
|
719
|
+
* pageToken: 'placeholder-value',
|
|
720
|
+
* // Required. The `name` of the parent product to list local inventories for. Format: `accounts/{account\}/products/{product\}`
|
|
721
|
+
* parent: 'accounts/my-account/products/my-product',
|
|
722
|
+
* });
|
|
723
|
+
* console.log(res.data);
|
|
724
|
+
*
|
|
725
|
+
* // Example response
|
|
726
|
+
* // {
|
|
727
|
+
* // "localInventories": [],
|
|
728
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
729
|
+
* // }
|
|
730
|
+
* }
|
|
731
|
+
*
|
|
732
|
+
* main().catch(e => {
|
|
733
|
+
* console.error(e);
|
|
734
|
+
* throw e;
|
|
735
|
+
* });
|
|
736
|
+
*
|
|
737
|
+
* ```
|
|
561
738
|
*
|
|
562
739
|
* @param params - Parameters for request
|
|
563
740
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -567,11 +744,11 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
567
744
|
list(
|
|
568
745
|
params: Params$Resource$Accounts$Products$Localinventories$List,
|
|
569
746
|
options: StreamMethodOptions
|
|
570
|
-
):
|
|
747
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
571
748
|
list(
|
|
572
749
|
params?: Params$Resource$Accounts$Products$Localinventories$List,
|
|
573
750
|
options?: MethodOptions
|
|
574
|
-
):
|
|
751
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListLocalInventoriesResponse>>;
|
|
575
752
|
list(
|
|
576
753
|
params: Params$Resource$Accounts$Products$Localinventories$List,
|
|
577
754
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -606,8 +783,8 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
606
783
|
| BodyResponseCallback<Readable>
|
|
607
784
|
):
|
|
608
785
|
| void
|
|
609
|
-
|
|
|
610
|
-
|
|
|
786
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListLocalInventoriesResponse>>
|
|
787
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
611
788
|
let params = (paramsOrCallback ||
|
|
612
789
|
{}) as Params$Resource$Accounts$Products$Localinventories$List;
|
|
613
790
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -696,6 +873,50 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
696
873
|
|
|
697
874
|
/**
|
|
698
875
|
* Deletes the specified `RegionalInventory` resource from the given product in your merchant account. It might take up to an hour for the `RegionalInventory` to be deleted from the specific product. Once you have received a successful delete response, wait for that period before attempting a delete again.
|
|
876
|
+
* @example
|
|
877
|
+
* ```js
|
|
878
|
+
* // Before running the sample:
|
|
879
|
+
* // - Enable the API at:
|
|
880
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
881
|
+
* // - Login into gcloud by running:
|
|
882
|
+
* // ```sh
|
|
883
|
+
* // $ gcloud auth application-default login
|
|
884
|
+
* // ```
|
|
885
|
+
* // - Install the npm module by running:
|
|
886
|
+
* // ```sh
|
|
887
|
+
* // $ npm install googleapis
|
|
888
|
+
* // ```
|
|
889
|
+
*
|
|
890
|
+
* const {google} = require('googleapis');
|
|
891
|
+
* const merchantapi = google.merchantapi('inventories_v1beta');
|
|
892
|
+
*
|
|
893
|
+
* async function main() {
|
|
894
|
+
* const auth = new google.auth.GoogleAuth({
|
|
895
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
896
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
897
|
+
* });
|
|
898
|
+
*
|
|
899
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
900
|
+
* const authClient = await auth.getClient();
|
|
901
|
+
* google.options({auth: authClient});
|
|
902
|
+
*
|
|
903
|
+
* // Do the magic
|
|
904
|
+
* const res = await merchantapi.accounts.products.regionalInventories.delete({
|
|
905
|
+
* // Required. The name of the `RegionalInventory` resource to delete. Format: `accounts/{account\}/products/{product\}/regionalInventories/{region\}`
|
|
906
|
+
* name: 'accounts/my-account/products/my-product/regionalInventories/my-regionalInventorie',
|
|
907
|
+
* });
|
|
908
|
+
* console.log(res.data);
|
|
909
|
+
*
|
|
910
|
+
* // Example response
|
|
911
|
+
* // {}
|
|
912
|
+
* }
|
|
913
|
+
*
|
|
914
|
+
* main().catch(e => {
|
|
915
|
+
* console.error(e);
|
|
916
|
+
* throw e;
|
|
917
|
+
* });
|
|
918
|
+
*
|
|
919
|
+
* ```
|
|
699
920
|
*
|
|
700
921
|
* @param params - Parameters for request
|
|
701
922
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -705,11 +926,11 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
705
926
|
delete(
|
|
706
927
|
params: Params$Resource$Accounts$Products$Regionalinventories$Delete,
|
|
707
928
|
options: StreamMethodOptions
|
|
708
|
-
):
|
|
929
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
709
930
|
delete(
|
|
710
931
|
params?: Params$Resource$Accounts$Products$Regionalinventories$Delete,
|
|
711
932
|
options?: MethodOptions
|
|
712
|
-
):
|
|
933
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
713
934
|
delete(
|
|
714
935
|
params: Params$Resource$Accounts$Products$Regionalinventories$Delete,
|
|
715
936
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -738,7 +959,10 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
738
959
|
callback?:
|
|
739
960
|
| BodyResponseCallback<Schema$Empty>
|
|
740
961
|
| BodyResponseCallback<Readable>
|
|
741
|
-
):
|
|
962
|
+
):
|
|
963
|
+
| void
|
|
964
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
|
|
965
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
742
966
|
let params = (paramsOrCallback ||
|
|
743
967
|
{}) as Params$Resource$Accounts$Products$Regionalinventories$Delete;
|
|
744
968
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -785,6 +1009,74 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
785
1009
|
|
|
786
1010
|
/**
|
|
787
1011
|
* Inserts a `RegionalInventory` to a given product in your merchant account. Replaces the full `RegionalInventory` resource if an entry with the same `region` already exists for the product. It might take up to 30 minutes for the new or updated `RegionalInventory` resource to appear in products.
|
|
1012
|
+
* @example
|
|
1013
|
+
* ```js
|
|
1014
|
+
* // Before running the sample:
|
|
1015
|
+
* // - Enable the API at:
|
|
1016
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1017
|
+
* // - Login into gcloud by running:
|
|
1018
|
+
* // ```sh
|
|
1019
|
+
* // $ gcloud auth application-default login
|
|
1020
|
+
* // ```
|
|
1021
|
+
* // - Install the npm module by running:
|
|
1022
|
+
* // ```sh
|
|
1023
|
+
* // $ npm install googleapis
|
|
1024
|
+
* // ```
|
|
1025
|
+
*
|
|
1026
|
+
* const {google} = require('googleapis');
|
|
1027
|
+
* const merchantapi = google.merchantapi('inventories_v1beta');
|
|
1028
|
+
*
|
|
1029
|
+
* async function main() {
|
|
1030
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1031
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1032
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1033
|
+
* });
|
|
1034
|
+
*
|
|
1035
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1036
|
+
* const authClient = await auth.getClient();
|
|
1037
|
+
* google.options({auth: authClient});
|
|
1038
|
+
*
|
|
1039
|
+
* // Do the magic
|
|
1040
|
+
* const res = await merchantapi.accounts.products.regionalInventories.insert({
|
|
1041
|
+
* // Required. The account and product where this inventory will be inserted. Format: `accounts/{account\}/products/{product\}`
|
|
1042
|
+
* parent: 'accounts/my-account/products/my-product',
|
|
1043
|
+
*
|
|
1044
|
+
* // Request body metadata
|
|
1045
|
+
* requestBody: {
|
|
1046
|
+
* // request body parameters
|
|
1047
|
+
* // {
|
|
1048
|
+
* // "account": "my_account",
|
|
1049
|
+
* // "availability": "my_availability",
|
|
1050
|
+
* // "customAttributes": [],
|
|
1051
|
+
* // "name": "my_name",
|
|
1052
|
+
* // "price": {},
|
|
1053
|
+
* // "region": "my_region",
|
|
1054
|
+
* // "salePrice": {},
|
|
1055
|
+
* // "salePriceEffectiveDate": {}
|
|
1056
|
+
* // }
|
|
1057
|
+
* },
|
|
1058
|
+
* });
|
|
1059
|
+
* console.log(res.data);
|
|
1060
|
+
*
|
|
1061
|
+
* // Example response
|
|
1062
|
+
* // {
|
|
1063
|
+
* // "account": "my_account",
|
|
1064
|
+
* // "availability": "my_availability",
|
|
1065
|
+
* // "customAttributes": [],
|
|
1066
|
+
* // "name": "my_name",
|
|
1067
|
+
* // "price": {},
|
|
1068
|
+
* // "region": "my_region",
|
|
1069
|
+
* // "salePrice": {},
|
|
1070
|
+
* // "salePriceEffectiveDate": {}
|
|
1071
|
+
* // }
|
|
1072
|
+
* }
|
|
1073
|
+
*
|
|
1074
|
+
* main().catch(e => {
|
|
1075
|
+
* console.error(e);
|
|
1076
|
+
* throw e;
|
|
1077
|
+
* });
|
|
1078
|
+
*
|
|
1079
|
+
* ```
|
|
788
1080
|
*
|
|
789
1081
|
* @param params - Parameters for request
|
|
790
1082
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -794,11 +1086,11 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
794
1086
|
insert(
|
|
795
1087
|
params: Params$Resource$Accounts$Products$Regionalinventories$Insert,
|
|
796
1088
|
options: StreamMethodOptions
|
|
797
|
-
):
|
|
1089
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
798
1090
|
insert(
|
|
799
1091
|
params?: Params$Resource$Accounts$Products$Regionalinventories$Insert,
|
|
800
1092
|
options?: MethodOptions
|
|
801
|
-
):
|
|
1093
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$RegionalInventory>>;
|
|
802
1094
|
insert(
|
|
803
1095
|
params: Params$Resource$Accounts$Products$Regionalinventories$Insert,
|
|
804
1096
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -829,8 +1121,8 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
829
1121
|
| BodyResponseCallback<Readable>
|
|
830
1122
|
):
|
|
831
1123
|
| void
|
|
832
|
-
|
|
|
833
|
-
|
|
|
1124
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$RegionalInventory>>
|
|
1125
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
834
1126
|
let params = (paramsOrCallback ||
|
|
835
1127
|
{}) as Params$Resource$Accounts$Products$Regionalinventories$Insert;
|
|
836
1128
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -877,6 +1169,57 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
877
1169
|
|
|
878
1170
|
/**
|
|
879
1171
|
* Lists the `RegionalInventory` resources for the given product in your merchant account. The response might contain fewer items than specified by `pageSize`. If `pageToken` was returned in previous request, it can be used to obtain additional results. `RegionalInventory` resources are listed per product for a given account.
|
|
1172
|
+
* @example
|
|
1173
|
+
* ```js
|
|
1174
|
+
* // Before running the sample:
|
|
1175
|
+
* // - Enable the API at:
|
|
1176
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1177
|
+
* // - Login into gcloud by running:
|
|
1178
|
+
* // ```sh
|
|
1179
|
+
* // $ gcloud auth application-default login
|
|
1180
|
+
* // ```
|
|
1181
|
+
* // - Install the npm module by running:
|
|
1182
|
+
* // ```sh
|
|
1183
|
+
* // $ npm install googleapis
|
|
1184
|
+
* // ```
|
|
1185
|
+
*
|
|
1186
|
+
* const {google} = require('googleapis');
|
|
1187
|
+
* const merchantapi = google.merchantapi('inventories_v1beta');
|
|
1188
|
+
*
|
|
1189
|
+
* async function main() {
|
|
1190
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1191
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1192
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1193
|
+
* });
|
|
1194
|
+
*
|
|
1195
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1196
|
+
* const authClient = await auth.getClient();
|
|
1197
|
+
* google.options({auth: authClient});
|
|
1198
|
+
*
|
|
1199
|
+
* // Do the magic
|
|
1200
|
+
* const res = await merchantapi.accounts.products.regionalInventories.list({
|
|
1201
|
+
* // The maximum number of `RegionalInventory` resources for the given product to return. The service returns fewer than this value if the number of inventories for the given product is less that than the `pageSize`. The default value is 25000. The maximum value is 100000; If a value higher than the maximum is specified, then the `pageSize` will default to the maximum.
|
|
1202
|
+
* pageSize: 'placeholder-value',
|
|
1203
|
+
* // A page token, received from a previous `ListRegionalInventories` call. Provide the page token to retrieve the subsequent page. When paginating, all other parameters provided to `ListRegionalInventories` must match the call that provided the page token. The token returned as nextPageToken in the response to the previous request.
|
|
1204
|
+
* pageToken: 'placeholder-value',
|
|
1205
|
+
* // Required. The `name` of the parent product to list `RegionalInventory` resources for. Format: `accounts/{account\}/products/{product\}`
|
|
1206
|
+
* parent: 'accounts/my-account/products/my-product',
|
|
1207
|
+
* });
|
|
1208
|
+
* console.log(res.data);
|
|
1209
|
+
*
|
|
1210
|
+
* // Example response
|
|
1211
|
+
* // {
|
|
1212
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
1213
|
+
* // "regionalInventories": []
|
|
1214
|
+
* // }
|
|
1215
|
+
* }
|
|
1216
|
+
*
|
|
1217
|
+
* main().catch(e => {
|
|
1218
|
+
* console.error(e);
|
|
1219
|
+
* throw e;
|
|
1220
|
+
* });
|
|
1221
|
+
*
|
|
1222
|
+
* ```
|
|
880
1223
|
*
|
|
881
1224
|
* @param params - Parameters for request
|
|
882
1225
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -886,11 +1229,11 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
886
1229
|
list(
|
|
887
1230
|
params: Params$Resource$Accounts$Products$Regionalinventories$List,
|
|
888
1231
|
options: StreamMethodOptions
|
|
889
|
-
):
|
|
1232
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
890
1233
|
list(
|
|
891
1234
|
params?: Params$Resource$Accounts$Products$Regionalinventories$List,
|
|
892
1235
|
options?: MethodOptions
|
|
893
|
-
):
|
|
1236
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListRegionalInventoriesResponse>>;
|
|
894
1237
|
list(
|
|
895
1238
|
params: Params$Resource$Accounts$Products$Regionalinventories$List,
|
|
896
1239
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -925,8 +1268,8 @@ export namespace merchantapi_inventories_v1beta {
|
|
|
925
1268
|
| BodyResponseCallback<Readable>
|
|
926
1269
|
):
|
|
927
1270
|
| void
|
|
928
|
-
|
|
|
929
|
-
|
|
|
1271
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListRegionalInventoriesResponse>>
|
|
1272
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
930
1273
|
let params = (paramsOrCallback ||
|
|
931
1274
|
{}) as Params$Resource$Accounts$Products$Regionalinventories$List;
|
|
932
1275
|
let options = (optionsOrCallback || {}) as MethodOptions;
|