@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/lfp_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,
|
|
@@ -260,7 +260,7 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
260
260
|
*/
|
|
261
261
|
linkedGbps?: string | null;
|
|
262
262
|
/**
|
|
263
|
-
* Identifier. The name of the `LfpMerchantState` resource. Format: `accounts/{account\}/lfpMerchantStates/{target_merchant\}`
|
|
263
|
+
* Identifier. The name of the `LfpMerchantState` resource. Format: `accounts/{account\}/lfpMerchantStates/{target_merchant\}`. For example, `accounts/123456/lfpMerchantStates/567890`.
|
|
264
264
|
*/
|
|
265
265
|
name?: string | null;
|
|
266
266
|
/**
|
|
@@ -455,7 +455,7 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
455
455
|
*/
|
|
456
456
|
eventTime?: string | null;
|
|
457
457
|
/**
|
|
458
|
-
* Optional. The product expiration time. This field will not
|
|
458
|
+
* Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
|
|
459
459
|
*/
|
|
460
460
|
expirationTime?: string | null;
|
|
461
461
|
/**
|
|
@@ -501,6 +501,86 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
501
501
|
|
|
502
502
|
/**
|
|
503
503
|
* Inserts a `LfpInventory` resource for the given target merchant account. If the resource already exists, it will be replaced. The inventory automatically expires after 30 days.
|
|
504
|
+
* @example
|
|
505
|
+
* ```js
|
|
506
|
+
* // Before running the sample:
|
|
507
|
+
* // - Enable the API at:
|
|
508
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
509
|
+
* // - Login into gcloud by running:
|
|
510
|
+
* // ```sh
|
|
511
|
+
* // $ gcloud auth application-default login
|
|
512
|
+
* // ```
|
|
513
|
+
* // - Install the npm module by running:
|
|
514
|
+
* // ```sh
|
|
515
|
+
* // $ npm install googleapis
|
|
516
|
+
* // ```
|
|
517
|
+
*
|
|
518
|
+
* const {google} = require('googleapis');
|
|
519
|
+
* const merchantapi = google.merchantapi('lfp_v1beta');
|
|
520
|
+
*
|
|
521
|
+
* async function main() {
|
|
522
|
+
* const auth = new google.auth.GoogleAuth({
|
|
523
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
524
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
525
|
+
* });
|
|
526
|
+
*
|
|
527
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
528
|
+
* const authClient = await auth.getClient();
|
|
529
|
+
* google.options({auth: authClient});
|
|
530
|
+
*
|
|
531
|
+
* // Do the magic
|
|
532
|
+
* const res = await merchantapi.accounts.lfpInventories.insert({
|
|
533
|
+
* // Required. The LFP provider account. Format: `accounts/{account\}`
|
|
534
|
+
* parent: 'accounts/my-account',
|
|
535
|
+
*
|
|
536
|
+
* // Request body metadata
|
|
537
|
+
* requestBody: {
|
|
538
|
+
* // request body parameters
|
|
539
|
+
* // {
|
|
540
|
+
* // "availability": "my_availability",
|
|
541
|
+
* // "collectionTime": "my_collectionTime",
|
|
542
|
+
* // "contentLanguage": "my_contentLanguage",
|
|
543
|
+
* // "feedLabel": "my_feedLabel",
|
|
544
|
+
* // "gtin": "my_gtin",
|
|
545
|
+
* // "name": "my_name",
|
|
546
|
+
* // "offerId": "my_offerId",
|
|
547
|
+
* // "pickupMethod": "my_pickupMethod",
|
|
548
|
+
* // "pickupSla": "my_pickupSla",
|
|
549
|
+
* // "price": {},
|
|
550
|
+
* // "quantity": "my_quantity",
|
|
551
|
+
* // "regionCode": "my_regionCode",
|
|
552
|
+
* // "storeCode": "my_storeCode",
|
|
553
|
+
* // "targetAccount": "my_targetAccount"
|
|
554
|
+
* // }
|
|
555
|
+
* },
|
|
556
|
+
* });
|
|
557
|
+
* console.log(res.data);
|
|
558
|
+
*
|
|
559
|
+
* // Example response
|
|
560
|
+
* // {
|
|
561
|
+
* // "availability": "my_availability",
|
|
562
|
+
* // "collectionTime": "my_collectionTime",
|
|
563
|
+
* // "contentLanguage": "my_contentLanguage",
|
|
564
|
+
* // "feedLabel": "my_feedLabel",
|
|
565
|
+
* // "gtin": "my_gtin",
|
|
566
|
+
* // "name": "my_name",
|
|
567
|
+
* // "offerId": "my_offerId",
|
|
568
|
+
* // "pickupMethod": "my_pickupMethod",
|
|
569
|
+
* // "pickupSla": "my_pickupSla",
|
|
570
|
+
* // "price": {},
|
|
571
|
+
* // "quantity": "my_quantity",
|
|
572
|
+
* // "regionCode": "my_regionCode",
|
|
573
|
+
* // "storeCode": "my_storeCode",
|
|
574
|
+
* // "targetAccount": "my_targetAccount"
|
|
575
|
+
* // }
|
|
576
|
+
* }
|
|
577
|
+
*
|
|
578
|
+
* main().catch(e => {
|
|
579
|
+
* console.error(e);
|
|
580
|
+
* throw e;
|
|
581
|
+
* });
|
|
582
|
+
*
|
|
583
|
+
* ```
|
|
504
584
|
*
|
|
505
585
|
* @param params - Parameters for request
|
|
506
586
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -510,11 +590,11 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
510
590
|
insert(
|
|
511
591
|
params: Params$Resource$Accounts$Lfpinventories$Insert,
|
|
512
592
|
options: StreamMethodOptions
|
|
513
|
-
):
|
|
593
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
514
594
|
insert(
|
|
515
595
|
params?: Params$Resource$Accounts$Lfpinventories$Insert,
|
|
516
596
|
options?: MethodOptions
|
|
517
|
-
):
|
|
597
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$LfpInventory>>;
|
|
518
598
|
insert(
|
|
519
599
|
params: Params$Resource$Accounts$Lfpinventories$Insert,
|
|
520
600
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -543,7 +623,10 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
543
623
|
callback?:
|
|
544
624
|
| BodyResponseCallback<Schema$LfpInventory>
|
|
545
625
|
| BodyResponseCallback<Readable>
|
|
546
|
-
):
|
|
626
|
+
):
|
|
627
|
+
| void
|
|
628
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$LfpInventory>>
|
|
629
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
547
630
|
let params = (paramsOrCallback ||
|
|
548
631
|
{}) as Params$Resource$Accounts$Lfpinventories$Insert;
|
|
549
632
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -608,6 +691,56 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
608
691
|
|
|
609
692
|
/**
|
|
610
693
|
* Gets the LFP state of a merchant
|
|
694
|
+
* @example
|
|
695
|
+
* ```js
|
|
696
|
+
* // Before running the sample:
|
|
697
|
+
* // - Enable the API at:
|
|
698
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
699
|
+
* // - Login into gcloud by running:
|
|
700
|
+
* // ```sh
|
|
701
|
+
* // $ gcloud auth application-default login
|
|
702
|
+
* // ```
|
|
703
|
+
* // - Install the npm module by running:
|
|
704
|
+
* // ```sh
|
|
705
|
+
* // $ npm install googleapis
|
|
706
|
+
* // ```
|
|
707
|
+
*
|
|
708
|
+
* const {google} = require('googleapis');
|
|
709
|
+
* const merchantapi = google.merchantapi('lfp_v1beta');
|
|
710
|
+
*
|
|
711
|
+
* async function main() {
|
|
712
|
+
* const auth = new google.auth.GoogleAuth({
|
|
713
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
714
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
715
|
+
* });
|
|
716
|
+
*
|
|
717
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
718
|
+
* const authClient = await auth.getClient();
|
|
719
|
+
* google.options({auth: authClient});
|
|
720
|
+
*
|
|
721
|
+
* // Do the magic
|
|
722
|
+
* const res = await merchantapi.accounts.lfpMerchantStates.get({
|
|
723
|
+
* // Required. The name of the state to retrieve. Format: `accounts/{account\}/lfpMerchantStates/{target_merchant\}`. For example, `accounts/123456/lfpMerchantStates/567890`.
|
|
724
|
+
* name: 'accounts/my-account/lfpMerchantStates/my-lfpMerchantState',
|
|
725
|
+
* });
|
|
726
|
+
* console.log(res.data);
|
|
727
|
+
*
|
|
728
|
+
* // Example response
|
|
729
|
+
* // {
|
|
730
|
+
* // "countrySettings": [],
|
|
731
|
+
* // "inventoryStats": {},
|
|
732
|
+
* // "linkedGbps": "my_linkedGbps",
|
|
733
|
+
* // "name": "my_name",
|
|
734
|
+
* // "storeStates": []
|
|
735
|
+
* // }
|
|
736
|
+
* }
|
|
737
|
+
*
|
|
738
|
+
* main().catch(e => {
|
|
739
|
+
* console.error(e);
|
|
740
|
+
* throw e;
|
|
741
|
+
* });
|
|
742
|
+
*
|
|
743
|
+
* ```
|
|
611
744
|
*
|
|
612
745
|
* @param params - Parameters for request
|
|
613
746
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -617,11 +750,11 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
617
750
|
get(
|
|
618
751
|
params: Params$Resource$Accounts$Lfpmerchantstates$Get,
|
|
619
752
|
options: StreamMethodOptions
|
|
620
|
-
):
|
|
753
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
621
754
|
get(
|
|
622
755
|
params?: Params$Resource$Accounts$Lfpmerchantstates$Get,
|
|
623
756
|
options?: MethodOptions
|
|
624
|
-
):
|
|
757
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$LfpMerchantState>>;
|
|
625
758
|
get(
|
|
626
759
|
params: Params$Resource$Accounts$Lfpmerchantstates$Get,
|
|
627
760
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -650,7 +783,10 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
650
783
|
callback?:
|
|
651
784
|
| BodyResponseCallback<Schema$LfpMerchantState>
|
|
652
785
|
| BodyResponseCallback<Readable>
|
|
653
|
-
):
|
|
786
|
+
):
|
|
787
|
+
| void
|
|
788
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$LfpMerchantState>>
|
|
789
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
654
790
|
let params = (paramsOrCallback ||
|
|
655
791
|
{}) as Params$Resource$Accounts$Lfpmerchantstates$Get;
|
|
656
792
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -698,7 +834,7 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
698
834
|
export interface Params$Resource$Accounts$Lfpmerchantstates$Get
|
|
699
835
|
extends StandardParameters {
|
|
700
836
|
/**
|
|
701
|
-
* Required. The name of the state to retrieve. Format: `accounts/{account\}/lfpMerchantStates/{target_merchant\}`
|
|
837
|
+
* Required. The name of the state to retrieve. Format: `accounts/{account\}/lfpMerchantStates/{target_merchant\}`. For example, `accounts/123456/lfpMerchantStates/567890`.
|
|
702
838
|
*/
|
|
703
839
|
name?: string;
|
|
704
840
|
}
|
|
@@ -711,6 +847,82 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
711
847
|
|
|
712
848
|
/**
|
|
713
849
|
* Inserts a `LfpSale` for the given merchant.
|
|
850
|
+
* @example
|
|
851
|
+
* ```js
|
|
852
|
+
* // Before running the sample:
|
|
853
|
+
* // - Enable the API at:
|
|
854
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
855
|
+
* // - Login into gcloud by running:
|
|
856
|
+
* // ```sh
|
|
857
|
+
* // $ gcloud auth application-default login
|
|
858
|
+
* // ```
|
|
859
|
+
* // - Install the npm module by running:
|
|
860
|
+
* // ```sh
|
|
861
|
+
* // $ npm install googleapis
|
|
862
|
+
* // ```
|
|
863
|
+
*
|
|
864
|
+
* const {google} = require('googleapis');
|
|
865
|
+
* const merchantapi = google.merchantapi('lfp_v1beta');
|
|
866
|
+
*
|
|
867
|
+
* async function main() {
|
|
868
|
+
* const auth = new google.auth.GoogleAuth({
|
|
869
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
870
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
871
|
+
* });
|
|
872
|
+
*
|
|
873
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
874
|
+
* const authClient = await auth.getClient();
|
|
875
|
+
* google.options({auth: authClient});
|
|
876
|
+
*
|
|
877
|
+
* // Do the magic
|
|
878
|
+
* const res = await merchantapi.accounts.lfpSales.insert({
|
|
879
|
+
* // Required. The LFP provider account. Format: `accounts/{lfp_partner\}`
|
|
880
|
+
* parent: 'accounts/my-account',
|
|
881
|
+
*
|
|
882
|
+
* // Request body metadata
|
|
883
|
+
* requestBody: {
|
|
884
|
+
* // request body parameters
|
|
885
|
+
* // {
|
|
886
|
+
* // "contentLanguage": "my_contentLanguage",
|
|
887
|
+
* // "feedLabel": "my_feedLabel",
|
|
888
|
+
* // "gtin": "my_gtin",
|
|
889
|
+
* // "name": "my_name",
|
|
890
|
+
* // "offerId": "my_offerId",
|
|
891
|
+
* // "price": {},
|
|
892
|
+
* // "quantity": "my_quantity",
|
|
893
|
+
* // "regionCode": "my_regionCode",
|
|
894
|
+
* // "saleTime": "my_saleTime",
|
|
895
|
+
* // "storeCode": "my_storeCode",
|
|
896
|
+
* // "targetAccount": "my_targetAccount",
|
|
897
|
+
* // "uid": "my_uid"
|
|
898
|
+
* // }
|
|
899
|
+
* },
|
|
900
|
+
* });
|
|
901
|
+
* console.log(res.data);
|
|
902
|
+
*
|
|
903
|
+
* // Example response
|
|
904
|
+
* // {
|
|
905
|
+
* // "contentLanguage": "my_contentLanguage",
|
|
906
|
+
* // "feedLabel": "my_feedLabel",
|
|
907
|
+
* // "gtin": "my_gtin",
|
|
908
|
+
* // "name": "my_name",
|
|
909
|
+
* // "offerId": "my_offerId",
|
|
910
|
+
* // "price": {},
|
|
911
|
+
* // "quantity": "my_quantity",
|
|
912
|
+
* // "regionCode": "my_regionCode",
|
|
913
|
+
* // "saleTime": "my_saleTime",
|
|
914
|
+
* // "storeCode": "my_storeCode",
|
|
915
|
+
* // "targetAccount": "my_targetAccount",
|
|
916
|
+
* // "uid": "my_uid"
|
|
917
|
+
* // }
|
|
918
|
+
* }
|
|
919
|
+
*
|
|
920
|
+
* main().catch(e => {
|
|
921
|
+
* console.error(e);
|
|
922
|
+
* throw e;
|
|
923
|
+
* });
|
|
924
|
+
*
|
|
925
|
+
* ```
|
|
714
926
|
*
|
|
715
927
|
* @param params - Parameters for request
|
|
716
928
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -720,11 +932,11 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
720
932
|
insert(
|
|
721
933
|
params: Params$Resource$Accounts$Lfpsales$Insert,
|
|
722
934
|
options: StreamMethodOptions
|
|
723
|
-
):
|
|
935
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
724
936
|
insert(
|
|
725
937
|
params?: Params$Resource$Accounts$Lfpsales$Insert,
|
|
726
938
|
options?: MethodOptions
|
|
727
|
-
):
|
|
939
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$LfpSale>>;
|
|
728
940
|
insert(
|
|
729
941
|
params: Params$Resource$Accounts$Lfpsales$Insert,
|
|
730
942
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -753,7 +965,10 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
753
965
|
callback?:
|
|
754
966
|
| BodyResponseCallback<Schema$LfpSale>
|
|
755
967
|
| BodyResponseCallback<Readable>
|
|
756
|
-
):
|
|
968
|
+
):
|
|
969
|
+
| void
|
|
970
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$LfpSale>>
|
|
971
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
757
972
|
let params = (paramsOrCallback ||
|
|
758
973
|
{}) as Params$Resource$Accounts$Lfpsales$Insert;
|
|
759
974
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -819,6 +1034,50 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
819
1034
|
|
|
820
1035
|
/**
|
|
821
1036
|
* Deletes a store for a target merchant.
|
|
1037
|
+
* @example
|
|
1038
|
+
* ```js
|
|
1039
|
+
* // Before running the sample:
|
|
1040
|
+
* // - Enable the API at:
|
|
1041
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1042
|
+
* // - Login into gcloud by running:
|
|
1043
|
+
* // ```sh
|
|
1044
|
+
* // $ gcloud auth application-default login
|
|
1045
|
+
* // ```
|
|
1046
|
+
* // - Install the npm module by running:
|
|
1047
|
+
* // ```sh
|
|
1048
|
+
* // $ npm install googleapis
|
|
1049
|
+
* // ```
|
|
1050
|
+
*
|
|
1051
|
+
* const {google} = require('googleapis');
|
|
1052
|
+
* const merchantapi = google.merchantapi('lfp_v1beta');
|
|
1053
|
+
*
|
|
1054
|
+
* async function main() {
|
|
1055
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1056
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1057
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1058
|
+
* });
|
|
1059
|
+
*
|
|
1060
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1061
|
+
* const authClient = await auth.getClient();
|
|
1062
|
+
* google.options({auth: authClient});
|
|
1063
|
+
*
|
|
1064
|
+
* // Do the magic
|
|
1065
|
+
* const res = await merchantapi.accounts.lfpStores.delete({
|
|
1066
|
+
* // Required. The name of the store to delete for the target merchant account. Format: `accounts/{account\}/lfpStores/{target_merchant\}~{store_code\}`
|
|
1067
|
+
* name: 'accounts/my-account/lfpStores/my-lfpStore',
|
|
1068
|
+
* });
|
|
1069
|
+
* console.log(res.data);
|
|
1070
|
+
*
|
|
1071
|
+
* // Example response
|
|
1072
|
+
* // {}
|
|
1073
|
+
* }
|
|
1074
|
+
*
|
|
1075
|
+
* main().catch(e => {
|
|
1076
|
+
* console.error(e);
|
|
1077
|
+
* throw e;
|
|
1078
|
+
* });
|
|
1079
|
+
*
|
|
1080
|
+
* ```
|
|
822
1081
|
*
|
|
823
1082
|
* @param params - Parameters for request
|
|
824
1083
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -828,11 +1087,11 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
828
1087
|
delete(
|
|
829
1088
|
params: Params$Resource$Accounts$Lfpstores$Delete,
|
|
830
1089
|
options: StreamMethodOptions
|
|
831
|
-
):
|
|
1090
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
832
1091
|
delete(
|
|
833
1092
|
params?: Params$Resource$Accounts$Lfpstores$Delete,
|
|
834
1093
|
options?: MethodOptions
|
|
835
|
-
):
|
|
1094
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
836
1095
|
delete(
|
|
837
1096
|
params: Params$Resource$Accounts$Lfpstores$Delete,
|
|
838
1097
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -861,7 +1120,10 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
861
1120
|
callback?:
|
|
862
1121
|
| BodyResponseCallback<Schema$Empty>
|
|
863
1122
|
| BodyResponseCallback<Readable>
|
|
864
|
-
):
|
|
1123
|
+
):
|
|
1124
|
+
| void
|
|
1125
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
|
|
1126
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
865
1127
|
let params = (paramsOrCallback ||
|
|
866
1128
|
{}) as Params$Resource$Accounts$Lfpstores$Delete;
|
|
867
1129
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -907,6 +1169,62 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
907
1169
|
|
|
908
1170
|
/**
|
|
909
1171
|
* Retrieves information about a store.
|
|
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('lfp_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.lfpStores.get({
|
|
1201
|
+
* // Required. The name of the store to retrieve. Format: `accounts/{account\}/lfpStores/{target_merchant\}~{store_code\}`
|
|
1202
|
+
* name: 'accounts/my-account/lfpStores/my-lfpStore',
|
|
1203
|
+
* });
|
|
1204
|
+
* console.log(res.data);
|
|
1205
|
+
*
|
|
1206
|
+
* // Example response
|
|
1207
|
+
* // {
|
|
1208
|
+
* // "gcidCategory": [],
|
|
1209
|
+
* // "matchingState": "my_matchingState",
|
|
1210
|
+
* // "matchingStateHint": "my_matchingStateHint",
|
|
1211
|
+
* // "name": "my_name",
|
|
1212
|
+
* // "phoneNumber": "my_phoneNumber",
|
|
1213
|
+
* // "placeId": "my_placeId",
|
|
1214
|
+
* // "storeAddress": "my_storeAddress",
|
|
1215
|
+
* // "storeCode": "my_storeCode",
|
|
1216
|
+
* // "storeName": "my_storeName",
|
|
1217
|
+
* // "targetAccount": "my_targetAccount",
|
|
1218
|
+
* // "websiteUri": "my_websiteUri"
|
|
1219
|
+
* // }
|
|
1220
|
+
* }
|
|
1221
|
+
*
|
|
1222
|
+
* main().catch(e => {
|
|
1223
|
+
* console.error(e);
|
|
1224
|
+
* throw e;
|
|
1225
|
+
* });
|
|
1226
|
+
*
|
|
1227
|
+
* ```
|
|
910
1228
|
*
|
|
911
1229
|
* @param params - Parameters for request
|
|
912
1230
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -916,11 +1234,11 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
916
1234
|
get(
|
|
917
1235
|
params: Params$Resource$Accounts$Lfpstores$Get,
|
|
918
1236
|
options: StreamMethodOptions
|
|
919
|
-
):
|
|
1237
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
920
1238
|
get(
|
|
921
1239
|
params?: Params$Resource$Accounts$Lfpstores$Get,
|
|
922
1240
|
options?: MethodOptions
|
|
923
|
-
):
|
|
1241
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$LfpStore>>;
|
|
924
1242
|
get(
|
|
925
1243
|
params: Params$Resource$Accounts$Lfpstores$Get,
|
|
926
1244
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -949,7 +1267,10 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
949
1267
|
callback?:
|
|
950
1268
|
| BodyResponseCallback<Schema$LfpStore>
|
|
951
1269
|
| BodyResponseCallback<Readable>
|
|
952
|
-
):
|
|
1270
|
+
):
|
|
1271
|
+
| void
|
|
1272
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$LfpStore>>
|
|
1273
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
953
1274
|
let params = (paramsOrCallback ||
|
|
954
1275
|
{}) as Params$Resource$Accounts$Lfpstores$Get;
|
|
955
1276
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -995,6 +1316,80 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
995
1316
|
|
|
996
1317
|
/**
|
|
997
1318
|
* Inserts a store for the target merchant. If the store with the same store code already exists, it will be replaced.
|
|
1319
|
+
* @example
|
|
1320
|
+
* ```js
|
|
1321
|
+
* // Before running the sample:
|
|
1322
|
+
* // - Enable the API at:
|
|
1323
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1324
|
+
* // - Login into gcloud by running:
|
|
1325
|
+
* // ```sh
|
|
1326
|
+
* // $ gcloud auth application-default login
|
|
1327
|
+
* // ```
|
|
1328
|
+
* // - Install the npm module by running:
|
|
1329
|
+
* // ```sh
|
|
1330
|
+
* // $ npm install googleapis
|
|
1331
|
+
* // ```
|
|
1332
|
+
*
|
|
1333
|
+
* const {google} = require('googleapis');
|
|
1334
|
+
* const merchantapi = google.merchantapi('lfp_v1beta');
|
|
1335
|
+
*
|
|
1336
|
+
* async function main() {
|
|
1337
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1338
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1339
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1340
|
+
* });
|
|
1341
|
+
*
|
|
1342
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1343
|
+
* const authClient = await auth.getClient();
|
|
1344
|
+
* google.options({auth: authClient});
|
|
1345
|
+
*
|
|
1346
|
+
* // Do the magic
|
|
1347
|
+
* const res = await merchantapi.accounts.lfpStores.insert({
|
|
1348
|
+
* // Required. The LFP provider account Format: `accounts/{account\}`
|
|
1349
|
+
* parent: 'accounts/my-account',
|
|
1350
|
+
*
|
|
1351
|
+
* // Request body metadata
|
|
1352
|
+
* requestBody: {
|
|
1353
|
+
* // request body parameters
|
|
1354
|
+
* // {
|
|
1355
|
+
* // "gcidCategory": [],
|
|
1356
|
+
* // "matchingState": "my_matchingState",
|
|
1357
|
+
* // "matchingStateHint": "my_matchingStateHint",
|
|
1358
|
+
* // "name": "my_name",
|
|
1359
|
+
* // "phoneNumber": "my_phoneNumber",
|
|
1360
|
+
* // "placeId": "my_placeId",
|
|
1361
|
+
* // "storeAddress": "my_storeAddress",
|
|
1362
|
+
* // "storeCode": "my_storeCode",
|
|
1363
|
+
* // "storeName": "my_storeName",
|
|
1364
|
+
* // "targetAccount": "my_targetAccount",
|
|
1365
|
+
* // "websiteUri": "my_websiteUri"
|
|
1366
|
+
* // }
|
|
1367
|
+
* },
|
|
1368
|
+
* });
|
|
1369
|
+
* console.log(res.data);
|
|
1370
|
+
*
|
|
1371
|
+
* // Example response
|
|
1372
|
+
* // {
|
|
1373
|
+
* // "gcidCategory": [],
|
|
1374
|
+
* // "matchingState": "my_matchingState",
|
|
1375
|
+
* // "matchingStateHint": "my_matchingStateHint",
|
|
1376
|
+
* // "name": "my_name",
|
|
1377
|
+
* // "phoneNumber": "my_phoneNumber",
|
|
1378
|
+
* // "placeId": "my_placeId",
|
|
1379
|
+
* // "storeAddress": "my_storeAddress",
|
|
1380
|
+
* // "storeCode": "my_storeCode",
|
|
1381
|
+
* // "storeName": "my_storeName",
|
|
1382
|
+
* // "targetAccount": "my_targetAccount",
|
|
1383
|
+
* // "websiteUri": "my_websiteUri"
|
|
1384
|
+
* // }
|
|
1385
|
+
* }
|
|
1386
|
+
*
|
|
1387
|
+
* main().catch(e => {
|
|
1388
|
+
* console.error(e);
|
|
1389
|
+
* throw e;
|
|
1390
|
+
* });
|
|
1391
|
+
*
|
|
1392
|
+
* ```
|
|
998
1393
|
*
|
|
999
1394
|
* @param params - Parameters for request
|
|
1000
1395
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1004,11 +1399,11 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
1004
1399
|
insert(
|
|
1005
1400
|
params: Params$Resource$Accounts$Lfpstores$Insert,
|
|
1006
1401
|
options: StreamMethodOptions
|
|
1007
|
-
):
|
|
1402
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1008
1403
|
insert(
|
|
1009
1404
|
params?: Params$Resource$Accounts$Lfpstores$Insert,
|
|
1010
1405
|
options?: MethodOptions
|
|
1011
|
-
):
|
|
1406
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$LfpStore>>;
|
|
1012
1407
|
insert(
|
|
1013
1408
|
params: Params$Resource$Accounts$Lfpstores$Insert,
|
|
1014
1409
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1037,7 +1432,10 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
1037
1432
|
callback?:
|
|
1038
1433
|
| BodyResponseCallback<Schema$LfpStore>
|
|
1039
1434
|
| BodyResponseCallback<Readable>
|
|
1040
|
-
):
|
|
1435
|
+
):
|
|
1436
|
+
| void
|
|
1437
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$LfpStore>>
|
|
1438
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1041
1439
|
let params = (paramsOrCallback ||
|
|
1042
1440
|
{}) as Params$Resource$Accounts$Lfpstores$Insert;
|
|
1043
1441
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1083,6 +1481,59 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
1083
1481
|
|
|
1084
1482
|
/**
|
|
1085
1483
|
* Lists the stores of the target merchant, specified by the filter in `ListLfpStoresRequest`.
|
|
1484
|
+
* @example
|
|
1485
|
+
* ```js
|
|
1486
|
+
* // Before running the sample:
|
|
1487
|
+
* // - Enable the API at:
|
|
1488
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1489
|
+
* // - Login into gcloud by running:
|
|
1490
|
+
* // ```sh
|
|
1491
|
+
* // $ gcloud auth application-default login
|
|
1492
|
+
* // ```
|
|
1493
|
+
* // - Install the npm module by running:
|
|
1494
|
+
* // ```sh
|
|
1495
|
+
* // $ npm install googleapis
|
|
1496
|
+
* // ```
|
|
1497
|
+
*
|
|
1498
|
+
* const {google} = require('googleapis');
|
|
1499
|
+
* const merchantapi = google.merchantapi('lfp_v1beta');
|
|
1500
|
+
*
|
|
1501
|
+
* async function main() {
|
|
1502
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1503
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1504
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1505
|
+
* });
|
|
1506
|
+
*
|
|
1507
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1508
|
+
* const authClient = await auth.getClient();
|
|
1509
|
+
* google.options({auth: authClient});
|
|
1510
|
+
*
|
|
1511
|
+
* // Do the magic
|
|
1512
|
+
* const res = await merchantapi.accounts.lfpStores.list({
|
|
1513
|
+
* // Optional. The maximum number of `LfpStore` resources for the given account to return. The service returns fewer than this value if the number of stores for the given account is less than the `pageSize`. The default value is 250. The maximum value is 1000; If a value higher than the maximum is specified, then the `pageSize` will default to the maximum.
|
|
1514
|
+
* pageSize: 'placeholder-value',
|
|
1515
|
+
* // Optional. A page token, received from a previous `ListLfpStoresRequest` call. Provide the page token to retrieve the subsequent page. When paginating, all other parameters provided to `ListLfpStoresRequest` must match the call that provided the page token. The token returned as nextPageToken in the response to the previous request.
|
|
1516
|
+
* pageToken: 'placeholder-value',
|
|
1517
|
+
* // Required. The LFP partner. Format: `accounts/{account\}`
|
|
1518
|
+
* parent: 'accounts/my-account',
|
|
1519
|
+
* // Required. The Merchant Center id of the merchant to list stores for.
|
|
1520
|
+
* targetAccount: 'placeholder-value',
|
|
1521
|
+
* });
|
|
1522
|
+
* console.log(res.data);
|
|
1523
|
+
*
|
|
1524
|
+
* // Example response
|
|
1525
|
+
* // {
|
|
1526
|
+
* // "lfpStores": [],
|
|
1527
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
1528
|
+
* // }
|
|
1529
|
+
* }
|
|
1530
|
+
*
|
|
1531
|
+
* main().catch(e => {
|
|
1532
|
+
* console.error(e);
|
|
1533
|
+
* throw e;
|
|
1534
|
+
* });
|
|
1535
|
+
*
|
|
1536
|
+
* ```
|
|
1086
1537
|
*
|
|
1087
1538
|
* @param params - Parameters for request
|
|
1088
1539
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1092,11 +1543,11 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
1092
1543
|
list(
|
|
1093
1544
|
params: Params$Resource$Accounts$Lfpstores$List,
|
|
1094
1545
|
options: StreamMethodOptions
|
|
1095
|
-
):
|
|
1546
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1096
1547
|
list(
|
|
1097
1548
|
params?: Params$Resource$Accounts$Lfpstores$List,
|
|
1098
1549
|
options?: MethodOptions
|
|
1099
|
-
):
|
|
1550
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListLfpStoresResponse>>;
|
|
1100
1551
|
list(
|
|
1101
1552
|
params: Params$Resource$Accounts$Lfpstores$List,
|
|
1102
1553
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1129,8 +1580,8 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
1129
1580
|
| BodyResponseCallback<Readable>
|
|
1130
1581
|
):
|
|
1131
1582
|
| void
|
|
1132
|
-
|
|
|
1133
|
-
|
|
|
1583
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListLfpStoresResponse>>
|
|
1584
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1134
1585
|
let params = (paramsOrCallback ||
|
|
1135
1586
|
{}) as Params$Resource$Accounts$Lfpstores$List;
|
|
1136
1587
|
let options = (optionsOrCallback || {}) as MethodOptions;
|