@googleapis/merchantapi 6.0.1 → 9.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +9 -0
  3. package/accounts_v1beta.ts +6894 -534
  4. package/build/accounts_v1beta.d.ts +4933 -137
  5. package/build/accounts_v1beta.js +679 -26
  6. package/build/accounts_v1beta.js.map +1 -1
  7. package/build/conversions_v1beta.d.ts +336 -1
  8. package/build/conversions_v1beta.js.map +1 -1
  9. package/build/datasources_v1beta.d.ts +412 -6
  10. package/build/datasources_v1beta.js.map +1 -1
  11. package/build/inventories_v1beta.d.ts +336 -2
  12. package/build/inventories_v1beta.js.map +1 -1
  13. package/build/issueresolution_v1beta.d.ts +367 -1
  14. package/build/issueresolution_v1beta.js +48 -0
  15. package/build/issueresolution_v1beta.js.map +1 -1
  16. package/build/lfp_v1beta.d.ts +436 -3
  17. package/build/lfp_v1beta.js.map +1 -1
  18. package/build/notifications_v1beta.d.ts +272 -1
  19. package/build/notifications_v1beta.js.map +1 -1
  20. package/build/ordertracking_v1beta.d.ts +75 -1
  21. package/build/ordertracking_v1beta.js.map +1 -1
  22. package/build/products_v1beta.d.ts +352 -45
  23. package/build/products_v1beta.js.map +1 -1
  24. package/build/promotions_v1beta.d.ts +171 -4
  25. package/build/promotions_v1beta.js.map +1 -1
  26. package/build/quota_v1beta.d.ts +52 -1
  27. package/build/quota_v1beta.js.map +1 -1
  28. package/build/reports_v1beta.d.ts +58 -1
  29. package/build/reports_v1beta.js.map +1 -1
  30. package/build/reviews_v1beta.d.ts +434 -2
  31. package/build/reviews_v1beta.js.map +1 -1
  32. package/conversions_v1beta.ts +336 -1
  33. package/datasources_v1beta.ts +412 -6
  34. package/inventories_v1beta.ts +336 -2
  35. package/issueresolution_v1beta.ts +465 -1
  36. package/lfp_v1beta.ts +436 -3
  37. package/notifications_v1beta.ts +272 -1
  38. package/ordertracking_v1beta.ts +75 -1
  39. package/package.json +1 -1
  40. package/products_v1beta.ts +352 -45
  41. package/promotions_v1beta.ts +171 -4
  42. package/quota_v1beta.ts +52 -1
  43. package/reports_v1beta.ts +58 -1
  44. package/reviews_v1beta.ts +434 -2
@@ -192,9 +192,6 @@ export namespace merchantapi_promotions_v1beta {
192
192
  * Optional. [Minimum purchase amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC) for the promotion.
193
193
  */
194
194
  minimumPurchaseAmount?: Schema$Price;
195
- /**
196
- * Optional. [Minimum purchase quantity](https://support.google.com/merchants/answer/13838182?ref_topic=13773355&sjid=17642868584668136159-NC) for the promotion.
197
- */
198
195
  minimumPurchaseQuantity?: string | null;
199
196
  /**
200
197
  * Optional. The [money off amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC) offered in the promotion.
@@ -414,7 +411,7 @@ export namespace merchantapi_promotions_v1beta {
414
411
  */
415
412
  eventTime?: string | null;
416
413
  /**
417
- * Optional. The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
414
+ * Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
418
415
  */
419
416
  expirationTime?: string | null;
420
417
  /**
@@ -518,6 +515,61 @@ export namespace merchantapi_promotions_v1beta {
518
515
 
519
516
  /**
520
517
  * Retrieves the promotion from your Merchant Center account. After inserting or updating a promotion input, it may take several minutes before the updated promotion can be retrieved.
518
+ * @example
519
+ * ```js
520
+ * // Before running the sample:
521
+ * // - Enable the API at:
522
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
523
+ * // - Login into gcloud by running:
524
+ * // ```sh
525
+ * // $ gcloud auth application-default login
526
+ * // ```
527
+ * // - Install the npm module by running:
528
+ * // ```sh
529
+ * // $ npm install googleapis
530
+ * // ```
531
+ *
532
+ * const {google} = require('googleapis');
533
+ * const merchantapi = google.merchantapi('promotions_v1beta');
534
+ *
535
+ * async function main() {
536
+ * const auth = new google.auth.GoogleAuth({
537
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
538
+ * scopes: ['https://www.googleapis.com/auth/content'],
539
+ * });
540
+ *
541
+ * // Acquire an auth client, and bind it to all future calls
542
+ * const authClient = await auth.getClient();
543
+ * google.options({auth: authClient});
544
+ *
545
+ * // Do the magic
546
+ * const res = await merchantapi.accounts.promotions.get({
547
+ * // Required. The name of the promotion to retrieve. Format: `accounts/{account\}/promotions/{promotions\}`
548
+ * name: 'accounts/my-account/promotions/my-promotion',
549
+ * });
550
+ * console.log(res.data);
551
+ *
552
+ * // Example response
553
+ * // {
554
+ * // "attributes": {},
555
+ * // "contentLanguage": "my_contentLanguage",
556
+ * // "customAttributes": [],
557
+ * // "dataSource": "my_dataSource",
558
+ * // "name": "my_name",
559
+ * // "promotionId": "my_promotionId",
560
+ * // "promotionStatus": {},
561
+ * // "redemptionChannel": [],
562
+ * // "targetCountry": "my_targetCountry",
563
+ * // "versionNumber": "my_versionNumber"
564
+ * // }
565
+ * }
566
+ *
567
+ * main().catch(e => {
568
+ * console.error(e);
569
+ * throw e;
570
+ * });
571
+ *
572
+ * ```
521
573
  *
522
574
  * @param params - Parameters for request
523
575
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -609,6 +661,70 @@ export namespace merchantapi_promotions_v1beta {
609
661
 
610
662
  /**
611
663
  * Inserts a promotion for your Merchant Center account. If the promotion already exists, then it updates the promotion instead.
664
+ * @example
665
+ * ```js
666
+ * // Before running the sample:
667
+ * // - Enable the API at:
668
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
669
+ * // - Login into gcloud by running:
670
+ * // ```sh
671
+ * // $ gcloud auth application-default login
672
+ * // ```
673
+ * // - Install the npm module by running:
674
+ * // ```sh
675
+ * // $ npm install googleapis
676
+ * // ```
677
+ *
678
+ * const {google} = require('googleapis');
679
+ * const merchantapi = google.merchantapi('promotions_v1beta');
680
+ *
681
+ * async function main() {
682
+ * const auth = new google.auth.GoogleAuth({
683
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
684
+ * scopes: ['https://www.googleapis.com/auth/content'],
685
+ * });
686
+ *
687
+ * // Acquire an auth client, and bind it to all future calls
688
+ * const authClient = await auth.getClient();
689
+ * google.options({auth: authClient});
690
+ *
691
+ * // Do the magic
692
+ * const res = await merchantapi.accounts.promotions.insert({
693
+ * // Required. The account where the promotion will be inserted. Format: accounts/{account\}
694
+ * parent: 'accounts/my-account',
695
+ *
696
+ * // Request body metadata
697
+ * requestBody: {
698
+ * // request body parameters
699
+ * // {
700
+ * // "dataSource": "my_dataSource",
701
+ * // "promotion": {}
702
+ * // }
703
+ * },
704
+ * });
705
+ * console.log(res.data);
706
+ *
707
+ * // Example response
708
+ * // {
709
+ * // "attributes": {},
710
+ * // "contentLanguage": "my_contentLanguage",
711
+ * // "customAttributes": [],
712
+ * // "dataSource": "my_dataSource",
713
+ * // "name": "my_name",
714
+ * // "promotionId": "my_promotionId",
715
+ * // "promotionStatus": {},
716
+ * // "redemptionChannel": [],
717
+ * // "targetCountry": "my_targetCountry",
718
+ * // "versionNumber": "my_versionNumber"
719
+ * // }
720
+ * }
721
+ *
722
+ * main().catch(e => {
723
+ * console.error(e);
724
+ * throw e;
725
+ * });
726
+ *
727
+ * ```
612
728
  *
613
729
  * @param params - Parameters for request
614
730
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -699,6 +815,57 @@ export namespace merchantapi_promotions_v1beta {
699
815
 
700
816
  /**
701
817
  * Lists the promotions in your Merchant Center account. The response might contain fewer items than specified by `pageSize`. Rely on `pageToken` to determine if there are more items to be requested. After inserting or updating a promotion, it may take several minutes before the updated processed promotion can be retrieved.
818
+ * @example
819
+ * ```js
820
+ * // Before running the sample:
821
+ * // - Enable the API at:
822
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
823
+ * // - Login into gcloud by running:
824
+ * // ```sh
825
+ * // $ gcloud auth application-default login
826
+ * // ```
827
+ * // - Install the npm module by running:
828
+ * // ```sh
829
+ * // $ npm install googleapis
830
+ * // ```
831
+ *
832
+ * const {google} = require('googleapis');
833
+ * const merchantapi = google.merchantapi('promotions_v1beta');
834
+ *
835
+ * async function main() {
836
+ * const auth = new google.auth.GoogleAuth({
837
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
838
+ * scopes: ['https://www.googleapis.com/auth/content'],
839
+ * });
840
+ *
841
+ * // Acquire an auth client, and bind it to all future calls
842
+ * const authClient = await auth.getClient();
843
+ * google.options({auth: authClient});
844
+ *
845
+ * // Do the magic
846
+ * const res = await merchantapi.accounts.promotions.list({
847
+ * // Output only. The maximum number of promotions to return. The service may return fewer than this value. The maximum value is 250; values above 250 will be coerced to 250. If unspecified, the maximum number of promotions will be returned.
848
+ * pageSize: 'placeholder-value',
849
+ * // Output only. A page token, received from a previous `ListPromotions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPromotions` must match the call that provided the page token.
850
+ * pageToken: 'placeholder-value',
851
+ * // Required. The account to list processed promotions for. Format: `accounts/{account\}`
852
+ * parent: 'accounts/my-account',
853
+ * });
854
+ * console.log(res.data);
855
+ *
856
+ * // Example response
857
+ * // {
858
+ * // "nextPageToken": "my_nextPageToken",
859
+ * // "promotions": []
860
+ * // }
861
+ * }
862
+ *
863
+ * main().catch(e => {
864
+ * console.error(e);
865
+ * throw e;
866
+ * });
867
+ *
868
+ * ```
702
869
  *
703
870
  * @param params - Parameters for request
704
871
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
package/quota_v1beta.ts CHANGED
@@ -200,7 +200,7 @@ export namespace merchantapi_quota_v1beta {
200
200
  */
201
201
  eventTime?: string | null;
202
202
  /**
203
- * Optional. The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
203
+ * Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
204
204
  */
205
205
  expirationTime?: string | null;
206
206
  /**
@@ -263,6 +263,57 @@ export namespace merchantapi_quota_v1beta {
263
263
 
264
264
  /**
265
265
  * Lists the daily call quota and usage per group for your Merchant Center account.
266
+ * @example
267
+ * ```js
268
+ * // Before running the sample:
269
+ * // - Enable the API at:
270
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
271
+ * // - Login into gcloud by running:
272
+ * // ```sh
273
+ * // $ gcloud auth application-default login
274
+ * // ```
275
+ * // - Install the npm module by running:
276
+ * // ```sh
277
+ * // $ npm install googleapis
278
+ * // ```
279
+ *
280
+ * const {google} = require('googleapis');
281
+ * const merchantapi = google.merchantapi('quota_v1beta');
282
+ *
283
+ * async function main() {
284
+ * const auth = new google.auth.GoogleAuth({
285
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
286
+ * scopes: ['https://www.googleapis.com/auth/content'],
287
+ * });
288
+ *
289
+ * // Acquire an auth client, and bind it to all future calls
290
+ * const authClient = await auth.getClient();
291
+ * google.options({auth: authClient});
292
+ *
293
+ * // Do the magic
294
+ * const res = await merchantapi.accounts.quotas.list({
295
+ * // Optional. The maximum number of quotas to return in the response, used for paging. Defaults to 500; values above 1000 will be coerced to 1000.
296
+ * pageSize: 'placeholder-value',
297
+ * // Optional. Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.
298
+ * pageToken: 'placeholder-value',
299
+ * // Required. The merchant account who owns the collection of method quotas Format: accounts/{account\}
300
+ * parent: 'accounts/my-account',
301
+ * });
302
+ * console.log(res.data);
303
+ *
304
+ * // Example response
305
+ * // {
306
+ * // "nextPageToken": "my_nextPageToken",
307
+ * // "quotaGroups": []
308
+ * // }
309
+ * }
310
+ *
311
+ * main().catch(e => {
312
+ * console.error(e);
313
+ * throw e;
314
+ * });
315
+ *
316
+ * ```
266
317
  *
267
318
  * @param params - Parameters for request
268
319
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
package/reports_v1beta.ts CHANGED
@@ -805,7 +805,7 @@ export namespace merchantapi_reports_v1beta {
805
805
  */
806
806
  eventTime?: string | null;
807
807
  /**
808
- * Optional. The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
808
+ * Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
809
809
  */
810
810
  expirationTime?: string | null;
811
811
  /**
@@ -1043,6 +1043,63 @@ export namespace merchantapi_reports_v1beta {
1043
1043
 
1044
1044
  /**
1045
1045
  * Retrieves a report defined by a search query. The response might contain fewer rows than specified by `page_size`. Rely on `next_page_token` to determine if there are more rows to be requested.
1046
+ * @example
1047
+ * ```js
1048
+ * // Before running the sample:
1049
+ * // - Enable the API at:
1050
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
1051
+ * // - Login into gcloud by running:
1052
+ * // ```sh
1053
+ * // $ gcloud auth application-default login
1054
+ * // ```
1055
+ * // - Install the npm module by running:
1056
+ * // ```sh
1057
+ * // $ npm install googleapis
1058
+ * // ```
1059
+ *
1060
+ * const {google} = require('googleapis');
1061
+ * const merchantapi = google.merchantapi('reports_v1beta');
1062
+ *
1063
+ * async function main() {
1064
+ * const auth = new google.auth.GoogleAuth({
1065
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1066
+ * scopes: ['https://www.googleapis.com/auth/content'],
1067
+ * });
1068
+ *
1069
+ * // Acquire an auth client, and bind it to all future calls
1070
+ * const authClient = await auth.getClient();
1071
+ * google.options({auth: authClient});
1072
+ *
1073
+ * // Do the magic
1074
+ * const res = await merchantapi.accounts.reports.search({
1075
+ * // Required. Id of the account making the call. Must be a standalone account or an MCA subaccount. Format: accounts/{account\}
1076
+ * parent: 'accounts/my-account',
1077
+ *
1078
+ * // Request body metadata
1079
+ * requestBody: {
1080
+ * // request body parameters
1081
+ * // {
1082
+ * // "pageSize": 0,
1083
+ * // "pageToken": "my_pageToken",
1084
+ * // "query": "my_query"
1085
+ * // }
1086
+ * },
1087
+ * });
1088
+ * console.log(res.data);
1089
+ *
1090
+ * // Example response
1091
+ * // {
1092
+ * // "nextPageToken": "my_nextPageToken",
1093
+ * // "results": []
1094
+ * // }
1095
+ * }
1096
+ *
1097
+ * main().catch(e => {
1098
+ * console.error(e);
1099
+ * throw e;
1100
+ * });
1101
+ *
1102
+ * ```
1046
1103
  *
1047
1104
  * @param params - Parameters for request
1048
1105
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.