@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.
- package/CHANGELOG.md +43 -0
- package/README.md +9 -0
- package/accounts_v1beta.ts +6894 -534
- package/build/accounts_v1beta.d.ts +4933 -137
- package/build/accounts_v1beta.js +679 -26
- package/build/accounts_v1beta.js.map +1 -1
- package/build/conversions_v1beta.d.ts +336 -1
- package/build/conversions_v1beta.js.map +1 -1
- package/build/datasources_v1beta.d.ts +412 -6
- package/build/datasources_v1beta.js.map +1 -1
- package/build/inventories_v1beta.d.ts +336 -2
- package/build/inventories_v1beta.js.map +1 -1
- package/build/issueresolution_v1beta.d.ts +367 -1
- package/build/issueresolution_v1beta.js +48 -0
- package/build/issueresolution_v1beta.js.map +1 -1
- package/build/lfp_v1beta.d.ts +436 -3
- package/build/lfp_v1beta.js.map +1 -1
- package/build/notifications_v1beta.d.ts +272 -1
- package/build/notifications_v1beta.js.map +1 -1
- package/build/ordertracking_v1beta.d.ts +75 -1
- package/build/ordertracking_v1beta.js.map +1 -1
- package/build/products_v1beta.d.ts +352 -45
- package/build/products_v1beta.js.map +1 -1
- package/build/promotions_v1beta.d.ts +171 -4
- package/build/promotions_v1beta.js.map +1 -1
- package/build/quota_v1beta.d.ts +52 -1
- package/build/quota_v1beta.js.map +1 -1
- package/build/reports_v1beta.d.ts +58 -1
- package/build/reports_v1beta.js.map +1 -1
- package/build/reviews_v1beta.d.ts +434 -2
- package/build/reviews_v1beta.js.map +1 -1
- package/conversions_v1beta.ts +336 -1
- package/datasources_v1beta.ts +412 -6
- package/inventories_v1beta.ts +336 -2
- package/issueresolution_v1beta.ts +465 -1
- package/lfp_v1beta.ts +436 -3
- package/notifications_v1beta.ts +272 -1
- package/ordertracking_v1beta.ts +75 -1
- package/package.json +1 -1
- package/products_v1beta.ts +352 -45
- package/promotions_v1beta.ts +171 -4
- package/quota_v1beta.ts +52 -1
- package/reports_v1beta.ts +58 -1
- package/reviews_v1beta.ts +434 -2
package/lfp_v1beta.ts
CHANGED
|
@@ -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`.
|
|
@@ -611,6 +691,56 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
611
691
|
|
|
612
692
|
/**
|
|
613
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
|
+
* ```
|
|
614
744
|
*
|
|
615
745
|
* @param params - Parameters for request
|
|
616
746
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -704,7 +834,7 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
704
834
|
export interface Params$Resource$Accounts$Lfpmerchantstates$Get
|
|
705
835
|
extends StandardParameters {
|
|
706
836
|
/**
|
|
707
|
-
* 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`.
|
|
708
838
|
*/
|
|
709
839
|
name?: string;
|
|
710
840
|
}
|
|
@@ -717,6 +847,82 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
717
847
|
|
|
718
848
|
/**
|
|
719
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
|
+
* ```
|
|
720
926
|
*
|
|
721
927
|
* @param params - Parameters for request
|
|
722
928
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -828,6 +1034,50 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
828
1034
|
|
|
829
1035
|
/**
|
|
830
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
|
+
* ```
|
|
831
1081
|
*
|
|
832
1082
|
* @param params - Parameters for request
|
|
833
1083
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -919,6 +1169,62 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
919
1169
|
|
|
920
1170
|
/**
|
|
921
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
|
+
* ```
|
|
922
1228
|
*
|
|
923
1229
|
* @param params - Parameters for request
|
|
924
1230
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1010,6 +1316,80 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
1010
1316
|
|
|
1011
1317
|
/**
|
|
1012
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
|
+
* ```
|
|
1013
1393
|
*
|
|
1014
1394
|
* @param params - Parameters for request
|
|
1015
1395
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1101,6 +1481,59 @@ export namespace merchantapi_lfp_v1beta {
|
|
|
1101
1481
|
|
|
1102
1482
|
/**
|
|
1103
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
|
+
* ```
|
|
1104
1537
|
*
|
|
1105
1538
|
* @param params - Parameters for request
|
|
1106
1539
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|