@googleapis/merchantapi 13.0.0 → 15.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 +29 -0
- package/accounts_v1.ts +151 -147
- package/accounts_v1beta.ts +151 -147
- package/build/accounts_v1.d.ts +64 -61
- package/build/accounts_v1.js +33 -32
- package/build/accounts_v1.js.map +1 -1
- package/build/accounts_v1beta.d.ts +64 -61
- package/build/accounts_v1beta.js +33 -32
- 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
|
@@ -2060,7 +2060,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
2060
2060
|
checkoutUriTemplate?: string | null;
|
|
2061
2061
|
}
|
|
2062
2062
|
/**
|
|
2063
|
-
* The `User`
|
|
2063
|
+
* The `User` resource represents a user associated with a Merchant Center account. It is used to manage user permissions and access rights within the account. For more information, see [Frequently asked questions about people and access levels](//support.google.com/merchants/answer/12160472).
|
|
2064
2064
|
*/
|
|
2065
2065
|
export interface Schema$User {
|
|
2066
2066
|
/**
|
|
@@ -2380,7 +2380,7 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
2380
2380
|
}
|
|
2381
2381
|
|
|
2382
2382
|
/**
|
|
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. 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.
|
|
2384
2384
|
* @example
|
|
2385
2385
|
* ```js
|
|
2386
2386
|
* // Before running the sample:
|
|
@@ -2657,149 +2657,6 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
2657
2657
|
}
|
|
2658
2658
|
}
|
|
2659
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
|
-
|
|
2803
2660
|
/**
|
|
2804
2661
|
* 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.
|
|
2805
2662
|
* @example
|
|
@@ -3270,8 +3127,6 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
3270
3127
|
*/
|
|
3271
3128
|
name?: string;
|
|
3272
3129
|
}
|
|
3273
|
-
export interface Params$Resource$Accounts$Getaccountforgcpregistration
|
|
3274
|
-
extends StandardParameters {}
|
|
3275
3130
|
export interface Params$Resource$Accounts$List extends StandardParameters {
|
|
3276
3131
|
/**
|
|
3277
3132
|
* 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).
|
|
@@ -4661,6 +4516,153 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
4661
4516
|
this.context = context;
|
|
4662
4517
|
}
|
|
4663
4518
|
|
|
4519
|
+
/**
|
|
4520
|
+
* Retrieves the merchant account that the calling GCP is registered with.
|
|
4521
|
+
* @example
|
|
4522
|
+
* ```js
|
|
4523
|
+
* // Before running the sample:
|
|
4524
|
+
* // - Enable the API at:
|
|
4525
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
4526
|
+
* // - Login into gcloud by running:
|
|
4527
|
+
* // ```sh
|
|
4528
|
+
* // $ gcloud auth application-default login
|
|
4529
|
+
* // ```
|
|
4530
|
+
* // - Install the npm module by running:
|
|
4531
|
+
* // ```sh
|
|
4532
|
+
* // $ npm install googleapis
|
|
4533
|
+
* // ```
|
|
4534
|
+
*
|
|
4535
|
+
* const {google} = require('googleapis');
|
|
4536
|
+
* const merchantapi = google.merchantapi('accounts_v1beta');
|
|
4537
|
+
*
|
|
4538
|
+
* async function main() {
|
|
4539
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4540
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4541
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
4542
|
+
* });
|
|
4543
|
+
*
|
|
4544
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4545
|
+
* const authClient = await auth.getClient();
|
|
4546
|
+
* google.options({auth: authClient});
|
|
4547
|
+
*
|
|
4548
|
+
* // Do the magic
|
|
4549
|
+
* const res =
|
|
4550
|
+
* await merchantapi.accounts.developerRegistration.getAccountForGcpRegistration(
|
|
4551
|
+
* {},
|
|
4552
|
+
* );
|
|
4553
|
+
* console.log(res.data);
|
|
4554
|
+
*
|
|
4555
|
+
* // Example response
|
|
4556
|
+
* // {
|
|
4557
|
+
* // "name": "my_name"
|
|
4558
|
+
* // }
|
|
4559
|
+
* }
|
|
4560
|
+
*
|
|
4561
|
+
* main().catch(e => {
|
|
4562
|
+
* console.error(e);
|
|
4563
|
+
* throw e;
|
|
4564
|
+
* });
|
|
4565
|
+
*
|
|
4566
|
+
* ```
|
|
4567
|
+
*
|
|
4568
|
+
* @param params - Parameters for request
|
|
4569
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
4570
|
+
* @param callback - Optional callback that handles the response.
|
|
4571
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
4572
|
+
*/
|
|
4573
|
+
getAccountForGcpRegistration(
|
|
4574
|
+
params: Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration,
|
|
4575
|
+
options: StreamMethodOptions
|
|
4576
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4577
|
+
getAccountForGcpRegistration(
|
|
4578
|
+
params?: Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration,
|
|
4579
|
+
options?: MethodOptions
|
|
4580
|
+
): Promise<
|
|
4581
|
+
GaxiosResponseWithHTTP2<Schema$GetAccountForGcpRegistrationResponse>
|
|
4582
|
+
>;
|
|
4583
|
+
getAccountForGcpRegistration(
|
|
4584
|
+
params: Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration,
|
|
4585
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
4586
|
+
callback: BodyResponseCallback<Readable>
|
|
4587
|
+
): void;
|
|
4588
|
+
getAccountForGcpRegistration(
|
|
4589
|
+
params: Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration,
|
|
4590
|
+
options:
|
|
4591
|
+
| MethodOptions
|
|
4592
|
+
| BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>,
|
|
4593
|
+
callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
|
|
4594
|
+
): void;
|
|
4595
|
+
getAccountForGcpRegistration(
|
|
4596
|
+
params: Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration,
|
|
4597
|
+
callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
|
|
4598
|
+
): void;
|
|
4599
|
+
getAccountForGcpRegistration(
|
|
4600
|
+
callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
|
|
4601
|
+
): void;
|
|
4602
|
+
getAccountForGcpRegistration(
|
|
4603
|
+
paramsOrCallback?:
|
|
4604
|
+
| Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration
|
|
4605
|
+
| BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
|
|
4606
|
+
| BodyResponseCallback<Readable>,
|
|
4607
|
+
optionsOrCallback?:
|
|
4608
|
+
| MethodOptions
|
|
4609
|
+
| StreamMethodOptions
|
|
4610
|
+
| BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
|
|
4611
|
+
| BodyResponseCallback<Readable>,
|
|
4612
|
+
callback?:
|
|
4613
|
+
| BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
|
|
4614
|
+
| BodyResponseCallback<Readable>
|
|
4615
|
+
):
|
|
4616
|
+
| void
|
|
4617
|
+
| Promise<
|
|
4618
|
+
GaxiosResponseWithHTTP2<Schema$GetAccountForGcpRegistrationResponse>
|
|
4619
|
+
>
|
|
4620
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
4621
|
+
let params = (paramsOrCallback ||
|
|
4622
|
+
{}) as Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration;
|
|
4623
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
4624
|
+
|
|
4625
|
+
if (typeof paramsOrCallback === 'function') {
|
|
4626
|
+
callback = paramsOrCallback;
|
|
4627
|
+
params =
|
|
4628
|
+
{} as Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration;
|
|
4629
|
+
options = {};
|
|
4630
|
+
}
|
|
4631
|
+
|
|
4632
|
+
if (typeof optionsOrCallback === 'function') {
|
|
4633
|
+
callback = optionsOrCallback;
|
|
4634
|
+
options = {};
|
|
4635
|
+
}
|
|
4636
|
+
|
|
4637
|
+
const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
|
|
4638
|
+
const parameters = {
|
|
4639
|
+
options: Object.assign(
|
|
4640
|
+
{
|
|
4641
|
+
url: (
|
|
4642
|
+
rootUrl + '/accounts/v1beta/accounts:getAccountForGcpRegistration'
|
|
4643
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
4644
|
+
method: 'GET',
|
|
4645
|
+
apiVersion: '',
|
|
4646
|
+
},
|
|
4647
|
+
options
|
|
4648
|
+
),
|
|
4649
|
+
params,
|
|
4650
|
+
requiredParams: [],
|
|
4651
|
+
pathParams: [],
|
|
4652
|
+
context: this.context,
|
|
4653
|
+
};
|
|
4654
|
+
if (callback) {
|
|
4655
|
+
createAPIRequest<Schema$GetAccountForGcpRegistrationResponse>(
|
|
4656
|
+
parameters,
|
|
4657
|
+
callback as BodyResponseCallback<unknown>
|
|
4658
|
+
);
|
|
4659
|
+
} else {
|
|
4660
|
+
return createAPIRequest<Schema$GetAccountForGcpRegistrationResponse>(
|
|
4661
|
+
parameters
|
|
4662
|
+
);
|
|
4663
|
+
}
|
|
4664
|
+
}
|
|
4665
|
+
|
|
4664
4666
|
/**
|
|
4665
4667
|
* Retrieves a developer registration for a merchant.
|
|
4666
4668
|
* @example
|
|
@@ -5099,6 +5101,8 @@ export namespace merchantapi_accounts_v1beta {
|
|
|
5099
5101
|
}
|
|
5100
5102
|
}
|
|
5101
5103
|
|
|
5104
|
+
export interface Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration
|
|
5105
|
+
extends StandardParameters {}
|
|
5102
5106
|
export interface Params$Resource$Accounts$Developerregistration$Getdeveloperregistration
|
|
5103
5107
|
extends StandardParameters {
|
|
5104
5108
|
/**
|
package/build/accounts_v1.d.ts
CHANGED
|
@@ -2081,7 +2081,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
2081
2081
|
checkoutUriTemplate?: string | null;
|
|
2082
2082
|
}
|
|
2083
2083
|
/**
|
|
2084
|
-
* The `User`
|
|
2084
|
+
* The `User` resource represents a user associated with a Merchant Center account. It is used to manage user permissions and access rights within the account. For more information, see [Frequently asked questions about people and access levels](//support.google.com/merchants/answer/12160472).
|
|
2085
2085
|
*/
|
|
2086
2086
|
export interface Schema$User {
|
|
2087
2087
|
/**
|
|
@@ -2285,7 +2285,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
2285
2285
|
createAndConfigure(params: Params$Resource$Accounts$Createandconfigure, callback: BodyResponseCallback<Schema$Account>): void;
|
|
2286
2286
|
createAndConfigure(callback: BodyResponseCallback<Schema$Account>): void;
|
|
2287
2287
|
/**
|
|
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. 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.
|
|
2289
2289
|
* @example
|
|
2290
2290
|
* ```js
|
|
2291
2291
|
* // Before running the sample:
|
|
@@ -2410,63 +2410,6 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
2410
2410
|
get(params: Params$Resource$Accounts$Get, options: MethodOptions | BodyResponseCallback<Schema$Account>, callback: BodyResponseCallback<Schema$Account>): void;
|
|
2411
2411
|
get(params: Params$Resource$Accounts$Get, callback: BodyResponseCallback<Schema$Account>): void;
|
|
2412
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;
|
|
2470
2413
|
/**
|
|
2471
2414
|
* 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.
|
|
2472
2415
|
* @example
|
|
@@ -2702,8 +2645,6 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
2702
2645
|
*/
|
|
2703
2646
|
name?: string;
|
|
2704
2647
|
}
|
|
2705
|
-
export interface Params$Resource$Accounts$Getaccountforgcpregistration extends StandardParameters {
|
|
2706
|
-
}
|
|
2707
2648
|
export interface Params$Resource$Accounts$List extends StandardParameters {
|
|
2708
2649
|
/**
|
|
2709
2650
|
* 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).
|
|
@@ -3419,6 +3360,66 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
3419
3360
|
export class Resource$Accounts$Developerregistration {
|
|
3420
3361
|
context: APIRequestContext;
|
|
3421
3362
|
constructor(context: APIRequestContext);
|
|
3363
|
+
/**
|
|
3364
|
+
* Retrieves the merchant account that the calling GCP is registered with.
|
|
3365
|
+
* @example
|
|
3366
|
+
* ```js
|
|
3367
|
+
* // Before running the sample:
|
|
3368
|
+
* // - Enable the API at:
|
|
3369
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
3370
|
+
* // - Login into gcloud by running:
|
|
3371
|
+
* // ```sh
|
|
3372
|
+
* // $ gcloud auth application-default login
|
|
3373
|
+
* // ```
|
|
3374
|
+
* // - Install the npm module by running:
|
|
3375
|
+
* // ```sh
|
|
3376
|
+
* // $ npm install googleapis
|
|
3377
|
+
* // ```
|
|
3378
|
+
*
|
|
3379
|
+
* const {google} = require('googleapis');
|
|
3380
|
+
* const merchantapi = google.merchantapi('accounts_v1');
|
|
3381
|
+
*
|
|
3382
|
+
* async function main() {
|
|
3383
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3384
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3385
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
3386
|
+
* });
|
|
3387
|
+
*
|
|
3388
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3389
|
+
* const authClient = await auth.getClient();
|
|
3390
|
+
* google.options({auth: authClient});
|
|
3391
|
+
*
|
|
3392
|
+
* // Do the magic
|
|
3393
|
+
* const res =
|
|
3394
|
+
* await merchantapi.accounts.developerRegistration.getAccountForGcpRegistration(
|
|
3395
|
+
* {},
|
|
3396
|
+
* );
|
|
3397
|
+
* console.log(res.data);
|
|
3398
|
+
*
|
|
3399
|
+
* // Example response
|
|
3400
|
+
* // {
|
|
3401
|
+
* // "name": "my_name"
|
|
3402
|
+
* // }
|
|
3403
|
+
* }
|
|
3404
|
+
*
|
|
3405
|
+
* main().catch(e => {
|
|
3406
|
+
* console.error(e);
|
|
3407
|
+
* throw e;
|
|
3408
|
+
* });
|
|
3409
|
+
*
|
|
3410
|
+
* ```
|
|
3411
|
+
*
|
|
3412
|
+
* @param params - Parameters for request
|
|
3413
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3414
|
+
* @param callback - Optional callback that handles the response.
|
|
3415
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3416
|
+
*/
|
|
3417
|
+
getAccountForGcpRegistration(params: Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3418
|
+
getAccountForGcpRegistration(params?: Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GetAccountForGcpRegistrationResponse>>;
|
|
3419
|
+
getAccountForGcpRegistration(params: Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3420
|
+
getAccountForGcpRegistration(params: Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration, options: MethodOptions | BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>, callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>): void;
|
|
3421
|
+
getAccountForGcpRegistration(params: Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration, callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>): void;
|
|
3422
|
+
getAccountForGcpRegistration(callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>): void;
|
|
3422
3423
|
/**
|
|
3423
3424
|
* Retrieves a developer registration for a merchant.
|
|
3424
3425
|
* @example
|
|
@@ -3615,6 +3616,8 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
3615
3616
|
unregisterGcp(params: Params$Resource$Accounts$Developerregistration$Unregistergcp, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
3616
3617
|
unregisterGcp(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
3617
3618
|
}
|
|
3619
|
+
export interface Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration extends StandardParameters {
|
|
3620
|
+
}
|
|
3618
3621
|
export interface Params$Resource$Accounts$Developerregistration$Getdeveloperregistration extends StandardParameters {
|
|
3619
3622
|
/**
|
|
3620
3623
|
* Required. The `name` (ID) of the developer registration.
|
package/build/accounts_v1.js
CHANGED
|
@@ -182,38 +182,6 @@ var merchantapi_accounts_v1;
|
|
|
182
182
|
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
getAccountForGcpRegistration(paramsOrCallback, optionsOrCallback, callback) {
|
|
186
|
-
let params = (paramsOrCallback ||
|
|
187
|
-
{});
|
|
188
|
-
let options = (optionsOrCallback || {});
|
|
189
|
-
if (typeof paramsOrCallback === 'function') {
|
|
190
|
-
callback = paramsOrCallback;
|
|
191
|
-
params = {};
|
|
192
|
-
options = {};
|
|
193
|
-
}
|
|
194
|
-
if (typeof optionsOrCallback === 'function') {
|
|
195
|
-
callback = optionsOrCallback;
|
|
196
|
-
options = {};
|
|
197
|
-
}
|
|
198
|
-
const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
|
|
199
|
-
const parameters = {
|
|
200
|
-
options: Object.assign({
|
|
201
|
-
url: (rootUrl + '/accounts/v1/accounts:getAccountForGcpRegistration').replace(/([^:]\/)\/+/g, '$1'),
|
|
202
|
-
method: 'GET',
|
|
203
|
-
apiVersion: '',
|
|
204
|
-
}, options),
|
|
205
|
-
params,
|
|
206
|
-
requiredParams: [],
|
|
207
|
-
pathParams: [],
|
|
208
|
-
context: this.context,
|
|
209
|
-
};
|
|
210
|
-
if (callback) {
|
|
211
|
-
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
185
|
list(paramsOrCallback, optionsOrCallback, callback) {
|
|
218
186
|
let params = (paramsOrCallback || {});
|
|
219
187
|
let options = (optionsOrCallback || {});
|
|
@@ -605,6 +573,39 @@ var merchantapi_accounts_v1;
|
|
|
605
573
|
constructor(context) {
|
|
606
574
|
this.context = context;
|
|
607
575
|
}
|
|
576
|
+
getAccountForGcpRegistration(paramsOrCallback, optionsOrCallback, callback) {
|
|
577
|
+
let params = (paramsOrCallback ||
|
|
578
|
+
{});
|
|
579
|
+
let options = (optionsOrCallback || {});
|
|
580
|
+
if (typeof paramsOrCallback === 'function') {
|
|
581
|
+
callback = paramsOrCallback;
|
|
582
|
+
params =
|
|
583
|
+
{};
|
|
584
|
+
options = {};
|
|
585
|
+
}
|
|
586
|
+
if (typeof optionsOrCallback === 'function') {
|
|
587
|
+
callback = optionsOrCallback;
|
|
588
|
+
options = {};
|
|
589
|
+
}
|
|
590
|
+
const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
|
|
591
|
+
const parameters = {
|
|
592
|
+
options: Object.assign({
|
|
593
|
+
url: (rootUrl + '/accounts/v1/accounts:getAccountForGcpRegistration').replace(/([^:]\/)\/+/g, '$1'),
|
|
594
|
+
method: 'GET',
|
|
595
|
+
apiVersion: '',
|
|
596
|
+
}, options),
|
|
597
|
+
params,
|
|
598
|
+
requiredParams: [],
|
|
599
|
+
pathParams: [],
|
|
600
|
+
context: this.context,
|
|
601
|
+
};
|
|
602
|
+
if (callback) {
|
|
603
|
+
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
|
|
604
|
+
}
|
|
605
|
+
else {
|
|
606
|
+
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
608
609
|
getDeveloperRegistration(paramsOrCallback, optionsOrCallback, callback) {
|
|
609
610
|
let params = (paramsOrCallback ||
|
|
610
611
|
{});
|