@googleapis/merchantapi 12.0.0 → 13.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/accounts_v1.ts +784 -72
- package/accounts_v1beta.ts +157 -3
- package/build/accounts_v1.d.ts +387 -3
- package/build/accounts_v1.js +128 -0
- package/build/accounts_v1.js.map +1 -1
- package/build/accounts_v1beta.d.ts +71 -3
- package/build/accounts_v1beta.js +32 -0
- package/build/accounts_v1beta.js.map +1 -1
- package/build/products_v1.d.ts +94 -0
- package/build/products_v1.js.map +1 -1
- package/build/products_v1beta.d.ts +8 -0
- package/build/products_v1beta.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/products_v1.ts +94 -0
- package/products_v1beta.ts +8 -0
package/accounts_v1beta.ts
CHANGED
|
@@ -840,6 +840,15 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
840
840
|
*/
|
|
841
841
|
geotargetCriteriaIds?: string[] | null;
|
|
842
842
|
}
|
|
843
|
+
/**
|
|
844
|
+
* Response message for the GetAccountForGcpRegistration method.
|
|
845
|
+
*/
|
|
846
|
+
export interface Schema$GetAccountForGcpRegistrationResponse {
|
|
847
|
+
/**
|
|
848
|
+
* The name of the merchant account id that the GCP is registered with.
|
|
849
|
+
*/
|
|
850
|
+
name?: string | null;
|
|
851
|
+
}
|
|
843
852
|
/**
|
|
844
853
|
* The current status of establishing of the service. (for example, pending approval or approved).
|
|
845
854
|
*/
|
|
@@ -1581,7 +1590,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
1581
1590
|
resourceType?: string | null;
|
|
1582
1591
|
}
|
|
1583
1592
|
/**
|
|
1584
|
-
* Defines participation in a given program for the specified account. Programs provide a mechanism for adding functionality to a Merchant Center accounts. A typical example of this is the [Free product listings](https://support.google.com/merchants/answer/13889434) program, which enables products from a business's store to be shown across Google for free. The following list is the available set of program resource IDs accessible through the API: * `free-listings` * `shopping-ads` * `youtube-shopping-checkout`
|
|
1593
|
+
* Defines participation in a given program for the specified account. Programs provide a mechanism for adding functionality to a Merchant Center accounts. A typical example of this is the [Free product listings](https://support.google.com/merchants/answer/13889434) program, which enables products from a business's store to be shown across Google for free. The following list is the available set of program resource IDs accessible through the API: * `checkout` * `free-listings` * `shopping-ads` * `youtube-shopping-checkout`
|
|
1585
1594
|
*/
|
|
1586
1595
|
export interface Schema$Program {
|
|
1587
1596
|
/**
|
|
@@ -1681,7 +1690,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
1681
1690
|
*/
|
|
1682
1691
|
export interface Schema$RegisterGcpRequest {
|
|
1683
1692
|
/**
|
|
1684
|
-
* Immutable. If the developer email provided is associated with a user in the merchant account provided, the user will be updated to have "API developer" access type and the email preference corresponding to that user will be updated to have the new "API notifications" preference. If the developer email provided is not associated with any user we will just add it as a contact. The email preference corresponding to that contact will have the new "API notifications" preference
|
|
1693
|
+
* Immutable. If the developer email provided is associated with a user in the merchant account provided, the user will be updated to have "API developer" access type and the email preference corresponding to that user will be updated to have the new "API notifications" preference. If the developer email provided is not associated with any user we will just add it as a contact. The email preference corresponding to that contact will have the new "API notifications" preference. Make sure the email used is associated with a Google Account (Google Workspace account or Gmail account) and is not a service account as service accounts can't receive emails.
|
|
1685
1694
|
*/
|
|
1686
1695
|
developerEmail?: string | null;
|
|
1687
1696
|
}
|
|
@@ -2371,7 +2380,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
2371
2380
|
}
|
|
2372
2381
|
|
|
2373
2382
|
/**
|
|
2374
|
-
* Deletes the specified account regardless of its type: standalone, advanced account or sub-account. Deleting an advanced account leads to the deletion of all of its sub-accounts. Executing this method requires admin access. The deletion succeeds only if the account does not provide services to any other account and has no processed offers. You can use the `force` parameter to override this.
|
|
2383
|
+
* Deletes the specified account regardless of its type: standalone, advanced account or sub-account. Deleting an advanced account leads to the deletion of all of its sub-accounts. This also deletes the account's [developer registration entity](/merchant/api/reference/rest/accounts_v1beta/accounts.developerRegistration) and any associated GCP project to the account. Executing this method requires admin access. The deletion succeeds only if the account does not provide services to any other account and has no processed offers. You can use the `force` parameter to override this.
|
|
2375
2384
|
* @example
|
|
2376
2385
|
* ```js
|
|
2377
2386
|
* // Before running the sample:
|
|
@@ -2648,6 +2657,149 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
2648
2657
|
}
|
|
2649
2658
|
}
|
|
2650
2659
|
|
|
2660
|
+
/**
|
|
2661
|
+
* Retrieves the merchant account that the calling GCP is registered with.
|
|
2662
|
+
* @example
|
|
2663
|
+
* ```js
|
|
2664
|
+
* // Before running the sample:
|
|
2665
|
+
* // - Enable the API at:
|
|
2666
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
2667
|
+
* // - Login into gcloud by running:
|
|
2668
|
+
* // ```sh
|
|
2669
|
+
* // $ gcloud auth application-default login
|
|
2670
|
+
* // ```
|
|
2671
|
+
* // - Install the npm module by running:
|
|
2672
|
+
* // ```sh
|
|
2673
|
+
* // $ npm install googleapis
|
|
2674
|
+
* // ```
|
|
2675
|
+
*
|
|
2676
|
+
* const {google} = require('googleapis');
|
|
2677
|
+
* const merchantapi = google.merchantapi('accounts_v1beta');
|
|
2678
|
+
*
|
|
2679
|
+
* async function main() {
|
|
2680
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2681
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2682
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
2683
|
+
* });
|
|
2684
|
+
*
|
|
2685
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2686
|
+
* const authClient = await auth.getClient();
|
|
2687
|
+
* google.options({auth: authClient});
|
|
2688
|
+
*
|
|
2689
|
+
* // Do the magic
|
|
2690
|
+
* const res = await merchantapi.accounts.getAccountForGcpRegistration({});
|
|
2691
|
+
* console.log(res.data);
|
|
2692
|
+
*
|
|
2693
|
+
* // Example response
|
|
2694
|
+
* // {
|
|
2695
|
+
* // "name": "my_name"
|
|
2696
|
+
* // }
|
|
2697
|
+
* }
|
|
2698
|
+
*
|
|
2699
|
+
* main().catch(e => {
|
|
2700
|
+
* console.error(e);
|
|
2701
|
+
* throw e;
|
|
2702
|
+
* });
|
|
2703
|
+
*
|
|
2704
|
+
* ```
|
|
2705
|
+
*
|
|
2706
|
+
* @param params - Parameters for request
|
|
2707
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2708
|
+
* @param callback - Optional callback that handles the response.
|
|
2709
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2710
|
+
*/
|
|
2711
|
+
getAccountForGcpRegistration(
|
|
2712
|
+
params: Params$Resource$Accounts$Getaccountforgcpregistration,
|
|
2713
|
+
options: StreamMethodOptions
|
|
2714
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2715
|
+
getAccountForGcpRegistration(
|
|
2716
|
+
params?: Params$Resource$Accounts$Getaccountforgcpregistration,
|
|
2717
|
+
options?: MethodOptions
|
|
2718
|
+
): Promise<
|
|
2719
|
+
GaxiosResponseWithHTTP2<Schema$GetAccountForGcpRegistrationResponse>
|
|
2720
|
+
>;
|
|
2721
|
+
getAccountForGcpRegistration(
|
|
2722
|
+
params: Params$Resource$Accounts$Getaccountforgcpregistration,
|
|
2723
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
2724
|
+
callback: BodyResponseCallback<Readable>
|
|
2725
|
+
): void;
|
|
2726
|
+
getAccountForGcpRegistration(
|
|
2727
|
+
params: Params$Resource$Accounts$Getaccountforgcpregistration,
|
|
2728
|
+
options:
|
|
2729
|
+
| MethodOptions
|
|
2730
|
+
| BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>,
|
|
2731
|
+
callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
|
|
2732
|
+
): void;
|
|
2733
|
+
getAccountForGcpRegistration(
|
|
2734
|
+
params: Params$Resource$Accounts$Getaccountforgcpregistration,
|
|
2735
|
+
callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
|
|
2736
|
+
): void;
|
|
2737
|
+
getAccountForGcpRegistration(
|
|
2738
|
+
callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
|
|
2739
|
+
): void;
|
|
2740
|
+
getAccountForGcpRegistration(
|
|
2741
|
+
paramsOrCallback?:
|
|
2742
|
+
| Params$Resource$Accounts$Getaccountforgcpregistration
|
|
2743
|
+
| BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
|
|
2744
|
+
| BodyResponseCallback<Readable>,
|
|
2745
|
+
optionsOrCallback?:
|
|
2746
|
+
| MethodOptions
|
|
2747
|
+
| StreamMethodOptions
|
|
2748
|
+
| BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
|
|
2749
|
+
| BodyResponseCallback<Readable>,
|
|
2750
|
+
callback?:
|
|
2751
|
+
| BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
|
|
2752
|
+
| BodyResponseCallback<Readable>
|
|
2753
|
+
):
|
|
2754
|
+
| void
|
|
2755
|
+
| Promise<
|
|
2756
|
+
GaxiosResponseWithHTTP2<Schema$GetAccountForGcpRegistrationResponse>
|
|
2757
|
+
>
|
|
2758
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2759
|
+
let params = (paramsOrCallback ||
|
|
2760
|
+
{}) as Params$Resource$Accounts$Getaccountforgcpregistration;
|
|
2761
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
2762
|
+
|
|
2763
|
+
if (typeof paramsOrCallback === 'function') {
|
|
2764
|
+
callback = paramsOrCallback;
|
|
2765
|
+
params = {} as Params$Resource$Accounts$Getaccountforgcpregistration;
|
|
2766
|
+
options = {};
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
if (typeof optionsOrCallback === 'function') {
|
|
2770
|
+
callback = optionsOrCallback;
|
|
2771
|
+
options = {};
|
|
2772
|
+
}
|
|
2773
|
+
|
|
2774
|
+
const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
|
|
2775
|
+
const parameters = {
|
|
2776
|
+
options: Object.assign(
|
|
2777
|
+
{
|
|
2778
|
+
url: (
|
|
2779
|
+
rootUrl + '/accounts/v1beta/accounts:getAccountForGcpRegistration'
|
|
2780
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
2781
|
+
method: 'GET',
|
|
2782
|
+
apiVersion: '',
|
|
2783
|
+
},
|
|
2784
|
+
options
|
|
2785
|
+
),
|
|
2786
|
+
params,
|
|
2787
|
+
requiredParams: [],
|
|
2788
|
+
pathParams: [],
|
|
2789
|
+
context: this.context,
|
|
2790
|
+
};
|
|
2791
|
+
if (callback) {
|
|
2792
|
+
createAPIRequest<Schema$GetAccountForGcpRegistrationResponse>(
|
|
2793
|
+
parameters,
|
|
2794
|
+
callback as BodyResponseCallback<unknown>
|
|
2795
|
+
);
|
|
2796
|
+
} else {
|
|
2797
|
+
return createAPIRequest<Schema$GetAccountForGcpRegistrationResponse>(
|
|
2798
|
+
parameters
|
|
2799
|
+
);
|
|
2800
|
+
}
|
|
2801
|
+
}
|
|
2802
|
+
|
|
2651
2803
|
/**
|
|
2652
2804
|
* Note: For the `accounts.list` method, quota and limits usage are charged for each user, and not for the Merchant Center ID or the advanced account ID. To list several sub-accounts, you should use the `accounts.listSubaccounts` method, which is more suitable for advanced accounts use case.
|
|
2653
2805
|
* @example
|
|
@@ -3118,6 +3270,8 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
3118
3270
|
*/
|
|
3119
3271
|
name?: string;
|
|
3120
3272
|
}
|
|
3273
|
+
export interface Params$Resource$Accounts$Getaccountforgcpregistration
|
|
3274
|
+
extends StandardParameters {}
|
|
3121
3275
|
export interface Params$Resource$Accounts$List extends StandardParameters {
|
|
3122
3276
|
/**
|
|
3123
3277
|
* Optional. Returns only accounts that match the [filter](https://developers.google.com/merchant/api/guides/accounts/filter). For more details, see the [filter syntax reference](https://developers.google.com/merchant/api/guides/accounts/filter-syntax).
|
package/build/accounts_v1.d.ts
CHANGED
|
@@ -393,6 +393,51 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
393
393
|
*/
|
|
394
394
|
allowShippingImprovements?: boolean | null;
|
|
395
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* Request message for the `BatchCreateRegions` method.
|
|
398
|
+
*/
|
|
399
|
+
export interface Schema$BatchCreateRegionsRequest {
|
|
400
|
+
/**
|
|
401
|
+
* Required. The region(s) to create. The maximum number of regions that can be created in a batch is 100.
|
|
402
|
+
*/
|
|
403
|
+
requests?: Schema$CreateRegionRequest[];
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Response message for the `BatchCreateRegions` method.
|
|
407
|
+
*/
|
|
408
|
+
export interface Schema$BatchCreateRegionsResponse {
|
|
409
|
+
/**
|
|
410
|
+
* The created region(s).
|
|
411
|
+
*/
|
|
412
|
+
regions?: Schema$Region[];
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Request message for the `BatchDeleteRegions` method.
|
|
416
|
+
*/
|
|
417
|
+
export interface Schema$BatchDeleteRegionsRequest {
|
|
418
|
+
/**
|
|
419
|
+
* Required. The names of the regions to delete. A maximum of 100 regions can be deleted in a batch.
|
|
420
|
+
*/
|
|
421
|
+
requests?: Schema$DeleteRegionRequest[];
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Request message for the `BatchUpdateRegions` method.
|
|
425
|
+
*/
|
|
426
|
+
export interface Schema$BatchUpdateRegionsRequest {
|
|
427
|
+
/**
|
|
428
|
+
* Required. The region(s) to update. The maximum number of regions that can be updated in a batch is 100.
|
|
429
|
+
*/
|
|
430
|
+
requests?: Schema$UpdateRegionRequest[];
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Response message for the `BatchUpdateRegions` method.
|
|
434
|
+
*/
|
|
435
|
+
export interface Schema$BatchUpdateRegionsResponse {
|
|
436
|
+
/**
|
|
437
|
+
* The updated region(s).
|
|
438
|
+
*/
|
|
439
|
+
regions?: Schema$Region[];
|
|
440
|
+
}
|
|
396
441
|
/**
|
|
397
442
|
* Business days of the warehouse.
|
|
398
443
|
*/
|
|
@@ -561,6 +606,23 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
561
606
|
*/
|
|
562
607
|
user?: Schema$AddUser[];
|
|
563
608
|
}
|
|
609
|
+
/**
|
|
610
|
+
* Request message for the `CreateRegion` method.
|
|
611
|
+
*/
|
|
612
|
+
export interface Schema$CreateRegionRequest {
|
|
613
|
+
/**
|
|
614
|
+
* Required. The account to create a region for. Format: `accounts/{account\}`
|
|
615
|
+
*/
|
|
616
|
+
parent?: string | null;
|
|
617
|
+
/**
|
|
618
|
+
* Required. The region to create.
|
|
619
|
+
*/
|
|
620
|
+
region?: Schema$Region;
|
|
621
|
+
/**
|
|
622
|
+
* Required. The identifier for the region, unique over all regions of the same account.
|
|
623
|
+
*/
|
|
624
|
+
regionId?: string | null;
|
|
625
|
+
}
|
|
564
626
|
/**
|
|
565
627
|
* Customer service information.
|
|
566
628
|
*/
|
|
@@ -629,6 +691,15 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
629
691
|
*/
|
|
630
692
|
year?: number | null;
|
|
631
693
|
}
|
|
694
|
+
/**
|
|
695
|
+
* Request message for the `DeleteRegion` method.
|
|
696
|
+
*/
|
|
697
|
+
export interface Schema$DeleteRegionRequest {
|
|
698
|
+
/**
|
|
699
|
+
* Required. The name of the region to delete. Format: `accounts/{account\}/regions/{region\}`
|
|
700
|
+
*/
|
|
701
|
+
name?: string | null;
|
|
702
|
+
}
|
|
632
703
|
/**
|
|
633
704
|
* Time spent in various aspects from order to the delivery of the product.
|
|
634
705
|
*/
|
|
@@ -771,6 +842,15 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
771
842
|
*/
|
|
772
843
|
geotargetCriteriaIds?: string[] | null;
|
|
773
844
|
}
|
|
845
|
+
/**
|
|
846
|
+
* Response message for the GetAccountForGcpRegistration method.
|
|
847
|
+
*/
|
|
848
|
+
export interface Schema$GetAccountForGcpRegistrationResponse {
|
|
849
|
+
/**
|
|
850
|
+
* The name of the merchant account id that the GCP is registered with.
|
|
851
|
+
*/
|
|
852
|
+
name?: string | null;
|
|
853
|
+
}
|
|
774
854
|
/**
|
|
775
855
|
* The current status of establishing of the service. (for example, pending approval or approved).
|
|
776
856
|
*/
|
|
@@ -1514,7 +1594,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
1514
1594
|
resourceType?: string | null;
|
|
1515
1595
|
}
|
|
1516
1596
|
/**
|
|
1517
|
-
* Defines participation in a given program for the specified account. Programs provide a mechanism for adding functionality to a Merchant Center accounts. A typical example of this is the [Free product listings](https://support.google.com/merchants/answer/13889434) program, which enables products from a business's store to be shown across Google for free. The following list is the available set of program resource IDs accessible through the API: * `free-listings` * `shopping-ads` * `youtube-shopping-checkout`
|
|
1597
|
+
* Defines participation in a given program for the specified account. Programs provide a mechanism for adding functionality to a Merchant Center accounts. A typical example of this is the [Free product listings](https://support.google.com/merchants/answer/13889434) program, which enables products from a business's store to be shown across Google for free. The following list is the available set of program resource IDs accessible through the API: * `checkout` * `free-listings` * `shopping-ads` * `youtube-shopping-checkout`
|
|
1518
1598
|
*/
|
|
1519
1599
|
export interface Schema$Program {
|
|
1520
1600
|
/**
|
|
@@ -1614,7 +1694,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
1614
1694
|
*/
|
|
1615
1695
|
export interface Schema$RegisterGcpRequest {
|
|
1616
1696
|
/**
|
|
1617
|
-
* Immutable. If the developer email provided is associated with a user in the merchant account provided, the user will be updated to have "API developer" access type and the email preference corresponding to that user will be updated to have the new "API notifications" preference. If the developer email provided is not associated with any user we will just add it as a contact. The email preference corresponding to that contact will have the new "API notifications" preference
|
|
1697
|
+
* Immutable. If the developer email provided is associated with a user in the merchant account provided, the user will be updated to have "API developer" access type and the email preference corresponding to that user will be updated to have the new "API notifications" preference. If the developer email provided is not associated with any user we will just add it as a contact. The email preference corresponding to that contact will have the new "API notifications" preference. Make sure the email used is associated with a Google Account (Google Workspace account or Gmail account) and is not a service account as service accounts can't receive emails.
|
|
1618
1698
|
*/
|
|
1619
1699
|
developerEmail?: string | null;
|
|
1620
1700
|
}
|
|
@@ -1974,6 +2054,19 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
1974
2054
|
*/
|
|
1975
2055
|
export interface Schema$UnregisterGcpRequest {
|
|
1976
2056
|
}
|
|
2057
|
+
/**
|
|
2058
|
+
* Request message for the `UpdateRegion` method.
|
|
2059
|
+
*/
|
|
2060
|
+
export interface Schema$UpdateRegionRequest {
|
|
2061
|
+
/**
|
|
2062
|
+
* Required. The updated region.
|
|
2063
|
+
*/
|
|
2064
|
+
region?: Schema$Region;
|
|
2065
|
+
/**
|
|
2066
|
+
* Optional. The comma-separated field mask indicating the fields to update. Example: `"displayName,postalCodeArea.regionCode"`.
|
|
2067
|
+
*/
|
|
2068
|
+
updateMask?: string | null;
|
|
2069
|
+
}
|
|
1977
2070
|
/**
|
|
1978
2071
|
* URL settings for cart or checkout URL.
|
|
1979
2072
|
*/
|
|
@@ -2192,7 +2285,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
2192
2285
|
createAndConfigure(params: Params$Resource$Accounts$Createandconfigure, callback: BodyResponseCallback<Schema$Account>): void;
|
|
2193
2286
|
createAndConfigure(callback: BodyResponseCallback<Schema$Account>): void;
|
|
2194
2287
|
/**
|
|
2195
|
-
* Deletes the specified account regardless of its type: standalone, advanced account or sub-account. Deleting an advanced account leads to the deletion of all of its sub-accounts. Executing this method requires admin access. The deletion succeeds only if the account does not provide services to any other account and has no processed offers. You can use the `force` parameter to override this.
|
|
2288
|
+
* Deletes the specified account regardless of its type: standalone, advanced account or sub-account. Deleting an advanced account leads to the deletion of all of its sub-accounts. This also deletes the account's [developer registration entity](/merchant/api/reference/rest/accounts_v1/accounts.developerRegistration) and any associated GCP project to the account. Executing this method requires admin access. The deletion succeeds only if the account does not provide services to any other account and has no processed offers. You can use the `force` parameter to override this.
|
|
2196
2289
|
* @example
|
|
2197
2290
|
* ```js
|
|
2198
2291
|
* // Before running the sample:
|
|
@@ -2317,6 +2410,63 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
2317
2410
|
get(params: Params$Resource$Accounts$Get, options: MethodOptions | BodyResponseCallback<Schema$Account>, callback: BodyResponseCallback<Schema$Account>): void;
|
|
2318
2411
|
get(params: Params$Resource$Accounts$Get, callback: BodyResponseCallback<Schema$Account>): void;
|
|
2319
2412
|
get(callback: BodyResponseCallback<Schema$Account>): void;
|
|
2413
|
+
/**
|
|
2414
|
+
* Retrieves the merchant account that the calling GCP is registered with.
|
|
2415
|
+
* @example
|
|
2416
|
+
* ```js
|
|
2417
|
+
* // Before running the sample:
|
|
2418
|
+
* // - Enable the API at:
|
|
2419
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
2420
|
+
* // - Login into gcloud by running:
|
|
2421
|
+
* // ```sh
|
|
2422
|
+
* // $ gcloud auth application-default login
|
|
2423
|
+
* // ```
|
|
2424
|
+
* // - Install the npm module by running:
|
|
2425
|
+
* // ```sh
|
|
2426
|
+
* // $ npm install googleapis
|
|
2427
|
+
* // ```
|
|
2428
|
+
*
|
|
2429
|
+
* const {google} = require('googleapis');
|
|
2430
|
+
* const merchantapi = google.merchantapi('accounts_v1');
|
|
2431
|
+
*
|
|
2432
|
+
* async function main() {
|
|
2433
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2434
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2435
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
2436
|
+
* });
|
|
2437
|
+
*
|
|
2438
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2439
|
+
* const authClient = await auth.getClient();
|
|
2440
|
+
* google.options({auth: authClient});
|
|
2441
|
+
*
|
|
2442
|
+
* // Do the magic
|
|
2443
|
+
* const res = await merchantapi.accounts.getAccountForGcpRegistration({});
|
|
2444
|
+
* console.log(res.data);
|
|
2445
|
+
*
|
|
2446
|
+
* // Example response
|
|
2447
|
+
* // {
|
|
2448
|
+
* // "name": "my_name"
|
|
2449
|
+
* // }
|
|
2450
|
+
* }
|
|
2451
|
+
*
|
|
2452
|
+
* main().catch(e => {
|
|
2453
|
+
* console.error(e);
|
|
2454
|
+
* throw e;
|
|
2455
|
+
* });
|
|
2456
|
+
*
|
|
2457
|
+
* ```
|
|
2458
|
+
*
|
|
2459
|
+
* @param params - Parameters for request
|
|
2460
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2461
|
+
* @param callback - Optional callback that handles the response.
|
|
2462
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2463
|
+
*/
|
|
2464
|
+
getAccountForGcpRegistration(params: Params$Resource$Accounts$Getaccountforgcpregistration, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2465
|
+
getAccountForGcpRegistration(params?: Params$Resource$Accounts$Getaccountforgcpregistration, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GetAccountForGcpRegistrationResponse>>;
|
|
2466
|
+
getAccountForGcpRegistration(params: Params$Resource$Accounts$Getaccountforgcpregistration, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2467
|
+
getAccountForGcpRegistration(params: Params$Resource$Accounts$Getaccountforgcpregistration, options: MethodOptions | BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>, callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>): void;
|
|
2468
|
+
getAccountForGcpRegistration(params: Params$Resource$Accounts$Getaccountforgcpregistration, callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>): void;
|
|
2469
|
+
getAccountForGcpRegistration(callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>): void;
|
|
2320
2470
|
/**
|
|
2321
2471
|
* Note: For the `accounts.list` method, quota and limits usage are charged for each user, and not for the Merchant Center ID or the advanced account ID. To list several sub-accounts, you should use the `accounts.listSubaccounts` method, which is more suitable for advanced accounts use case.
|
|
2322
2472
|
* @example
|
|
@@ -2552,6 +2702,8 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
2552
2702
|
*/
|
|
2553
2703
|
name?: string;
|
|
2554
2704
|
}
|
|
2705
|
+
export interface Params$Resource$Accounts$Getaccountforgcpregistration extends StandardParameters {
|
|
2706
|
+
}
|
|
2555
2707
|
export interface Params$Resource$Accounts$List extends StandardParameters {
|
|
2556
2708
|
/**
|
|
2557
2709
|
* Optional. Returns only accounts that match the [filter](https://developers.google.com/merchant/api/guides/accounts/filter). For more details, see the [filter syntax reference](https://developers.google.com/merchant/api/guides/accounts/filter-syntax).
|
|
@@ -5804,6 +5956,208 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
5804
5956
|
export class Resource$Accounts$Regions {
|
|
5805
5957
|
context: APIRequestContext;
|
|
5806
5958
|
constructor(context: APIRequestContext);
|
|
5959
|
+
/**
|
|
5960
|
+
* Creates one or more regions in your Merchant Center account. Executing this method requires admin access.
|
|
5961
|
+
* @example
|
|
5962
|
+
* ```js
|
|
5963
|
+
* // Before running the sample:
|
|
5964
|
+
* // - Enable the API at:
|
|
5965
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
5966
|
+
* // - Login into gcloud by running:
|
|
5967
|
+
* // ```sh
|
|
5968
|
+
* // $ gcloud auth application-default login
|
|
5969
|
+
* // ```
|
|
5970
|
+
* // - Install the npm module by running:
|
|
5971
|
+
* // ```sh
|
|
5972
|
+
* // $ npm install googleapis
|
|
5973
|
+
* // ```
|
|
5974
|
+
*
|
|
5975
|
+
* const {google} = require('googleapis');
|
|
5976
|
+
* const merchantapi = google.merchantapi('accounts_v1');
|
|
5977
|
+
*
|
|
5978
|
+
* async function main() {
|
|
5979
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5980
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5981
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
5982
|
+
* });
|
|
5983
|
+
*
|
|
5984
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5985
|
+
* const authClient = await auth.getClient();
|
|
5986
|
+
* google.options({auth: authClient});
|
|
5987
|
+
*
|
|
5988
|
+
* // Do the magic
|
|
5989
|
+
* const res = await merchantapi.accounts.regions.batchCreate({
|
|
5990
|
+
* // Required. The account to create one or more regions for. Format: `accounts/{account\}`
|
|
5991
|
+
* parent: 'accounts/my-account',
|
|
5992
|
+
*
|
|
5993
|
+
* // Request body metadata
|
|
5994
|
+
* requestBody: {
|
|
5995
|
+
* // request body parameters
|
|
5996
|
+
* // {
|
|
5997
|
+
* // "requests": []
|
|
5998
|
+
* // }
|
|
5999
|
+
* },
|
|
6000
|
+
* });
|
|
6001
|
+
* console.log(res.data);
|
|
6002
|
+
*
|
|
6003
|
+
* // Example response
|
|
6004
|
+
* // {
|
|
6005
|
+
* // "regions": []
|
|
6006
|
+
* // }
|
|
6007
|
+
* }
|
|
6008
|
+
*
|
|
6009
|
+
* main().catch(e => {
|
|
6010
|
+
* console.error(e);
|
|
6011
|
+
* throw e;
|
|
6012
|
+
* });
|
|
6013
|
+
*
|
|
6014
|
+
* ```
|
|
6015
|
+
*
|
|
6016
|
+
* @param params - Parameters for request
|
|
6017
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
6018
|
+
* @param callback - Optional callback that handles the response.
|
|
6019
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6020
|
+
*/
|
|
6021
|
+
batchCreate(params: Params$Resource$Accounts$Regions$Batchcreate, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
6022
|
+
batchCreate(params?: Params$Resource$Accounts$Regions$Batchcreate, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$BatchCreateRegionsResponse>>;
|
|
6023
|
+
batchCreate(params: Params$Resource$Accounts$Regions$Batchcreate, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
6024
|
+
batchCreate(params: Params$Resource$Accounts$Regions$Batchcreate, options: MethodOptions | BodyResponseCallback<Schema$BatchCreateRegionsResponse>, callback: BodyResponseCallback<Schema$BatchCreateRegionsResponse>): void;
|
|
6025
|
+
batchCreate(params: Params$Resource$Accounts$Regions$Batchcreate, callback: BodyResponseCallback<Schema$BatchCreateRegionsResponse>): void;
|
|
6026
|
+
batchCreate(callback: BodyResponseCallback<Schema$BatchCreateRegionsResponse>): void;
|
|
6027
|
+
/**
|
|
6028
|
+
* Deletes multiple regions by name from your Merchant Center account. Executing this method requires admin access.
|
|
6029
|
+
* @example
|
|
6030
|
+
* ```js
|
|
6031
|
+
* // Before running the sample:
|
|
6032
|
+
* // - Enable the API at:
|
|
6033
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
6034
|
+
* // - Login into gcloud by running:
|
|
6035
|
+
* // ```sh
|
|
6036
|
+
* // $ gcloud auth application-default login
|
|
6037
|
+
* // ```
|
|
6038
|
+
* // - Install the npm module by running:
|
|
6039
|
+
* // ```sh
|
|
6040
|
+
* // $ npm install googleapis
|
|
6041
|
+
* // ```
|
|
6042
|
+
*
|
|
6043
|
+
* const {google} = require('googleapis');
|
|
6044
|
+
* const merchantapi = google.merchantapi('accounts_v1');
|
|
6045
|
+
*
|
|
6046
|
+
* async function main() {
|
|
6047
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6048
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6049
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
6050
|
+
* });
|
|
6051
|
+
*
|
|
6052
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6053
|
+
* const authClient = await auth.getClient();
|
|
6054
|
+
* google.options({auth: authClient});
|
|
6055
|
+
*
|
|
6056
|
+
* // Do the magic
|
|
6057
|
+
* const res = await merchantapi.accounts.regions.batchDelete({
|
|
6058
|
+
* // Required. The account to delete one or more regions from. Format: `accounts/{account\}`
|
|
6059
|
+
* parent: 'accounts/my-account',
|
|
6060
|
+
*
|
|
6061
|
+
* // Request body metadata
|
|
6062
|
+
* requestBody: {
|
|
6063
|
+
* // request body parameters
|
|
6064
|
+
* // {
|
|
6065
|
+
* // "requests": []
|
|
6066
|
+
* // }
|
|
6067
|
+
* },
|
|
6068
|
+
* });
|
|
6069
|
+
* console.log(res.data);
|
|
6070
|
+
*
|
|
6071
|
+
* // Example response
|
|
6072
|
+
* // {}
|
|
6073
|
+
* }
|
|
6074
|
+
*
|
|
6075
|
+
* main().catch(e => {
|
|
6076
|
+
* console.error(e);
|
|
6077
|
+
* throw e;
|
|
6078
|
+
* });
|
|
6079
|
+
*
|
|
6080
|
+
* ```
|
|
6081
|
+
*
|
|
6082
|
+
* @param params - Parameters for request
|
|
6083
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
6084
|
+
* @param callback - Optional callback that handles the response.
|
|
6085
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6086
|
+
*/
|
|
6087
|
+
batchDelete(params: Params$Resource$Accounts$Regions$Batchdelete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
6088
|
+
batchDelete(params?: Params$Resource$Accounts$Regions$Batchdelete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
6089
|
+
batchDelete(params: Params$Resource$Accounts$Regions$Batchdelete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
6090
|
+
batchDelete(params: Params$Resource$Accounts$Regions$Batchdelete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
6091
|
+
batchDelete(params: Params$Resource$Accounts$Regions$Batchdelete, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
6092
|
+
batchDelete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
6093
|
+
/**
|
|
6094
|
+
* Updates one or more regions in your Merchant Center account. Executing this method requires admin access.
|
|
6095
|
+
* @example
|
|
6096
|
+
* ```js
|
|
6097
|
+
* // Before running the sample:
|
|
6098
|
+
* // - Enable the API at:
|
|
6099
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
6100
|
+
* // - Login into gcloud by running:
|
|
6101
|
+
* // ```sh
|
|
6102
|
+
* // $ gcloud auth application-default login
|
|
6103
|
+
* // ```
|
|
6104
|
+
* // - Install the npm module by running:
|
|
6105
|
+
* // ```sh
|
|
6106
|
+
* // $ npm install googleapis
|
|
6107
|
+
* // ```
|
|
6108
|
+
*
|
|
6109
|
+
* const {google} = require('googleapis');
|
|
6110
|
+
* const merchantapi = google.merchantapi('accounts_v1');
|
|
6111
|
+
*
|
|
6112
|
+
* async function main() {
|
|
6113
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6114
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6115
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
6116
|
+
* });
|
|
6117
|
+
*
|
|
6118
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6119
|
+
* const authClient = await auth.getClient();
|
|
6120
|
+
* google.options({auth: authClient});
|
|
6121
|
+
*
|
|
6122
|
+
* // Do the magic
|
|
6123
|
+
* const res = await merchantapi.accounts.regions.batchUpdate({
|
|
6124
|
+
* // Required. The account to update one or more regions for. Format: `accounts/{account\}`
|
|
6125
|
+
* parent: 'accounts/my-account',
|
|
6126
|
+
*
|
|
6127
|
+
* // Request body metadata
|
|
6128
|
+
* requestBody: {
|
|
6129
|
+
* // request body parameters
|
|
6130
|
+
* // {
|
|
6131
|
+
* // "requests": []
|
|
6132
|
+
* // }
|
|
6133
|
+
* },
|
|
6134
|
+
* });
|
|
6135
|
+
* console.log(res.data);
|
|
6136
|
+
*
|
|
6137
|
+
* // Example response
|
|
6138
|
+
* // {
|
|
6139
|
+
* // "regions": []
|
|
6140
|
+
* // }
|
|
6141
|
+
* }
|
|
6142
|
+
*
|
|
6143
|
+
* main().catch(e => {
|
|
6144
|
+
* console.error(e);
|
|
6145
|
+
* throw e;
|
|
6146
|
+
* });
|
|
6147
|
+
*
|
|
6148
|
+
* ```
|
|
6149
|
+
*
|
|
6150
|
+
* @param params - Parameters for request
|
|
6151
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
6152
|
+
* @param callback - Optional callback that handles the response.
|
|
6153
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6154
|
+
*/
|
|
6155
|
+
batchUpdate(params: Params$Resource$Accounts$Regions$Batchupdate, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
6156
|
+
batchUpdate(params?: Params$Resource$Accounts$Regions$Batchupdate, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$BatchUpdateRegionsResponse>>;
|
|
6157
|
+
batchUpdate(params: Params$Resource$Accounts$Regions$Batchupdate, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
6158
|
+
batchUpdate(params: Params$Resource$Accounts$Regions$Batchupdate, options: MethodOptions | BodyResponseCallback<Schema$BatchUpdateRegionsResponse>, callback: BodyResponseCallback<Schema$BatchUpdateRegionsResponse>): void;
|
|
6159
|
+
batchUpdate(params: Params$Resource$Accounts$Regions$Batchupdate, callback: BodyResponseCallback<Schema$BatchUpdateRegionsResponse>): void;
|
|
6160
|
+
batchUpdate(callback: BodyResponseCallback<Schema$BatchUpdateRegionsResponse>): void;
|
|
5807
6161
|
/**
|
|
5808
6162
|
* Creates a region definition in your Merchant Center account. Executing this method requires admin access.
|
|
5809
6163
|
* @example
|
|
@@ -6153,6 +6507,36 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
6153
6507
|
patch(params: Params$Resource$Accounts$Regions$Patch, callback: BodyResponseCallback<Schema$Region>): void;
|
|
6154
6508
|
patch(callback: BodyResponseCallback<Schema$Region>): void;
|
|
6155
6509
|
}
|
|
6510
|
+
export interface Params$Resource$Accounts$Regions$Batchcreate extends StandardParameters {
|
|
6511
|
+
/**
|
|
6512
|
+
* Required. The account to create one or more regions for. Format: `accounts/{account\}`
|
|
6513
|
+
*/
|
|
6514
|
+
parent?: string;
|
|
6515
|
+
/**
|
|
6516
|
+
* Request body metadata
|
|
6517
|
+
*/
|
|
6518
|
+
requestBody?: Schema$BatchCreateRegionsRequest;
|
|
6519
|
+
}
|
|
6520
|
+
export interface Params$Resource$Accounts$Regions$Batchdelete extends StandardParameters {
|
|
6521
|
+
/**
|
|
6522
|
+
* Required. The account to delete one or more regions from. Format: `accounts/{account\}`
|
|
6523
|
+
*/
|
|
6524
|
+
parent?: string;
|
|
6525
|
+
/**
|
|
6526
|
+
* Request body metadata
|
|
6527
|
+
*/
|
|
6528
|
+
requestBody?: Schema$BatchDeleteRegionsRequest;
|
|
6529
|
+
}
|
|
6530
|
+
export interface Params$Resource$Accounts$Regions$Batchupdate extends StandardParameters {
|
|
6531
|
+
/**
|
|
6532
|
+
* Required. The account to update one or more regions for. Format: `accounts/{account\}`
|
|
6533
|
+
*/
|
|
6534
|
+
parent?: string;
|
|
6535
|
+
/**
|
|
6536
|
+
* Request body metadata
|
|
6537
|
+
*/
|
|
6538
|
+
requestBody?: Schema$BatchUpdateRegionsRequest;
|
|
6539
|
+
}
|
|
6156
6540
|
export interface Params$Resource$Accounts$Regions$Create extends StandardParameters {
|
|
6157
6541
|
/**
|
|
6158
6542
|
* Required. The account to create a region for. Format: `accounts/{account\}`
|