@googleapis/merchantapi 13.1.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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [15.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/merchantapi-v14.0.0...merchantapi-v15.0.0) (2025-11-04)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **merchantapi:** This release has breaking changes.
9
+
10
+ ### Features
11
+
12
+ * **merchantapi:** update the API ([e54c417](https://github.com/googleapis/google-api-nodejs-client/commit/e54c417628a4f222d52e5b8ae02738611413ef16))
13
+
14
+ ## [14.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/merchantapi-v13.1.0...merchantapi-v14.0.0) (2025-10-15)
15
+
16
+
17
+ ### ⚠ BREAKING CHANGES
18
+
19
+ * This release has breaking changes.
20
+
21
+ ### Features
22
+
23
+ * run the generator ([#3814](https://github.com/googleapis/google-api-nodejs-client/issues/3814)) ([4ba19d0](https://github.com/googleapis/google-api-nodejs-client/commit/4ba19d068b2b8deb28d773ebc6a3418f5e4a7162))
24
+
3
25
  ## [13.1.0](https://github.com/googleapis/google-api-nodejs-client/compare/merchantapi-v13.0.0...merchantapi-v13.1.0) (2025-10-09)
4
26
 
5
27
 
package/accounts_v1.ts CHANGED
@@ -2123,7 +2123,7 @@ export namespace merchantapi_accounts_v1 {
2123
2123
  checkoutUriTemplate?: string | null;
2124
2124
  }
2125
2125
  /**
2126
- * The `User` message 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).
2126
+ * 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).
2127
2127
  */
2128
2128
  export interface Schema$User {
2129
2129
  /**
@@ -2720,149 +2720,6 @@ export namespace merchantapi_accounts_v1 {
2720
2720
  }
2721
2721
  }
2722
2722
 
2723
- /**
2724
- * Retrieves the merchant account that the calling GCP is registered with.
2725
- * @example
2726
- * ```js
2727
- * // Before running the sample:
2728
- * // - Enable the API at:
2729
- * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
2730
- * // - Login into gcloud by running:
2731
- * // ```sh
2732
- * // $ gcloud auth application-default login
2733
- * // ```
2734
- * // - Install the npm module by running:
2735
- * // ```sh
2736
- * // $ npm install googleapis
2737
- * // ```
2738
- *
2739
- * const {google} = require('googleapis');
2740
- * const merchantapi = google.merchantapi('accounts_v1');
2741
- *
2742
- * async function main() {
2743
- * const auth = new google.auth.GoogleAuth({
2744
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2745
- * scopes: ['https://www.googleapis.com/auth/content'],
2746
- * });
2747
- *
2748
- * // Acquire an auth client, and bind it to all future calls
2749
- * const authClient = await auth.getClient();
2750
- * google.options({auth: authClient});
2751
- *
2752
- * // Do the magic
2753
- * const res = await merchantapi.accounts.getAccountForGcpRegistration({});
2754
- * console.log(res.data);
2755
- *
2756
- * // Example response
2757
- * // {
2758
- * // "name": "my_name"
2759
- * // }
2760
- * }
2761
- *
2762
- * main().catch(e => {
2763
- * console.error(e);
2764
- * throw e;
2765
- * });
2766
- *
2767
- * ```
2768
- *
2769
- * @param params - Parameters for request
2770
- * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2771
- * @param callback - Optional callback that handles the response.
2772
- * @returns A promise if used with async/await, or void if used with a callback.
2773
- */
2774
- getAccountForGcpRegistration(
2775
- params: Params$Resource$Accounts$Getaccountforgcpregistration,
2776
- options: StreamMethodOptions
2777
- ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2778
- getAccountForGcpRegistration(
2779
- params?: Params$Resource$Accounts$Getaccountforgcpregistration,
2780
- options?: MethodOptions
2781
- ): Promise<
2782
- GaxiosResponseWithHTTP2<Schema$GetAccountForGcpRegistrationResponse>
2783
- >;
2784
- getAccountForGcpRegistration(
2785
- params: Params$Resource$Accounts$Getaccountforgcpregistration,
2786
- options: StreamMethodOptions | BodyResponseCallback<Readable>,
2787
- callback: BodyResponseCallback<Readable>
2788
- ): void;
2789
- getAccountForGcpRegistration(
2790
- params: Params$Resource$Accounts$Getaccountforgcpregistration,
2791
- options:
2792
- | MethodOptions
2793
- | BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>,
2794
- callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
2795
- ): void;
2796
- getAccountForGcpRegistration(
2797
- params: Params$Resource$Accounts$Getaccountforgcpregistration,
2798
- callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
2799
- ): void;
2800
- getAccountForGcpRegistration(
2801
- callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
2802
- ): void;
2803
- getAccountForGcpRegistration(
2804
- paramsOrCallback?:
2805
- | Params$Resource$Accounts$Getaccountforgcpregistration
2806
- | BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
2807
- | BodyResponseCallback<Readable>,
2808
- optionsOrCallback?:
2809
- | MethodOptions
2810
- | StreamMethodOptions
2811
- | BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
2812
- | BodyResponseCallback<Readable>,
2813
- callback?:
2814
- | BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
2815
- | BodyResponseCallback<Readable>
2816
- ):
2817
- | void
2818
- | Promise<
2819
- GaxiosResponseWithHTTP2<Schema$GetAccountForGcpRegistrationResponse>
2820
- >
2821
- | Promise<GaxiosResponseWithHTTP2<Readable>> {
2822
- let params = (paramsOrCallback ||
2823
- {}) as Params$Resource$Accounts$Getaccountforgcpregistration;
2824
- let options = (optionsOrCallback || {}) as MethodOptions;
2825
-
2826
- if (typeof paramsOrCallback === 'function') {
2827
- callback = paramsOrCallback;
2828
- params = {} as Params$Resource$Accounts$Getaccountforgcpregistration;
2829
- options = {};
2830
- }
2831
-
2832
- if (typeof optionsOrCallback === 'function') {
2833
- callback = optionsOrCallback;
2834
- options = {};
2835
- }
2836
-
2837
- const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
2838
- const parameters = {
2839
- options: Object.assign(
2840
- {
2841
- url: (
2842
- rootUrl + '/accounts/v1/accounts:getAccountForGcpRegistration'
2843
- ).replace(/([^:]\/)\/+/g, '$1'),
2844
- method: 'GET',
2845
- apiVersion: '',
2846
- },
2847
- options
2848
- ),
2849
- params,
2850
- requiredParams: [],
2851
- pathParams: [],
2852
- context: this.context,
2853
- };
2854
- if (callback) {
2855
- createAPIRequest<Schema$GetAccountForGcpRegistrationResponse>(
2856
- parameters,
2857
- callback as BodyResponseCallback<unknown>
2858
- );
2859
- } else {
2860
- return createAPIRequest<Schema$GetAccountForGcpRegistrationResponse>(
2861
- parameters
2862
- );
2863
- }
2864
- }
2865
-
2866
2723
  /**
2867
2724
  * 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.
2868
2725
  * @example
@@ -3334,8 +3191,6 @@ export namespace merchantapi_accounts_v1 {
3334
3191
  */
3335
3192
  name?: string;
3336
3193
  }
3337
- export interface Params$Resource$Accounts$Getaccountforgcpregistration
3338
- extends StandardParameters {}
3339
3194
  export interface Params$Resource$Accounts$List extends StandardParameters {
3340
3195
  /**
3341
3196
  * 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).
@@ -4725,6 +4580,153 @@ export namespace merchantapi_accounts_v1 {
4725
4580
  this.context = context;
4726
4581
  }
4727
4582
 
4583
+ /**
4584
+ * Retrieves the merchant account that the calling GCP is registered with.
4585
+ * @example
4586
+ * ```js
4587
+ * // Before running the sample:
4588
+ * // - Enable the API at:
4589
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
4590
+ * // - Login into gcloud by running:
4591
+ * // ```sh
4592
+ * // $ gcloud auth application-default login
4593
+ * // ```
4594
+ * // - Install the npm module by running:
4595
+ * // ```sh
4596
+ * // $ npm install googleapis
4597
+ * // ```
4598
+ *
4599
+ * const {google} = require('googleapis');
4600
+ * const merchantapi = google.merchantapi('accounts_v1');
4601
+ *
4602
+ * async function main() {
4603
+ * const auth = new google.auth.GoogleAuth({
4604
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4605
+ * scopes: ['https://www.googleapis.com/auth/content'],
4606
+ * });
4607
+ *
4608
+ * // Acquire an auth client, and bind it to all future calls
4609
+ * const authClient = await auth.getClient();
4610
+ * google.options({auth: authClient});
4611
+ *
4612
+ * // Do the magic
4613
+ * const res =
4614
+ * await merchantapi.accounts.developerRegistration.getAccountForGcpRegistration(
4615
+ * {},
4616
+ * );
4617
+ * console.log(res.data);
4618
+ *
4619
+ * // Example response
4620
+ * // {
4621
+ * // "name": "my_name"
4622
+ * // }
4623
+ * }
4624
+ *
4625
+ * main().catch(e => {
4626
+ * console.error(e);
4627
+ * throw e;
4628
+ * });
4629
+ *
4630
+ * ```
4631
+ *
4632
+ * @param params - Parameters for request
4633
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
4634
+ * @param callback - Optional callback that handles the response.
4635
+ * @returns A promise if used with async/await, or void if used with a callback.
4636
+ */
4637
+ getAccountForGcpRegistration(
4638
+ params: Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration,
4639
+ options: StreamMethodOptions
4640
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
4641
+ getAccountForGcpRegistration(
4642
+ params?: Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration,
4643
+ options?: MethodOptions
4644
+ ): Promise<
4645
+ GaxiosResponseWithHTTP2<Schema$GetAccountForGcpRegistrationResponse>
4646
+ >;
4647
+ getAccountForGcpRegistration(
4648
+ params: Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration,
4649
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
4650
+ callback: BodyResponseCallback<Readable>
4651
+ ): void;
4652
+ getAccountForGcpRegistration(
4653
+ params: Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration,
4654
+ options:
4655
+ | MethodOptions
4656
+ | BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>,
4657
+ callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
4658
+ ): void;
4659
+ getAccountForGcpRegistration(
4660
+ params: Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration,
4661
+ callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
4662
+ ): void;
4663
+ getAccountForGcpRegistration(
4664
+ callback: BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
4665
+ ): void;
4666
+ getAccountForGcpRegistration(
4667
+ paramsOrCallback?:
4668
+ | Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration
4669
+ | BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
4670
+ | BodyResponseCallback<Readable>,
4671
+ optionsOrCallback?:
4672
+ | MethodOptions
4673
+ | StreamMethodOptions
4674
+ | BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
4675
+ | BodyResponseCallback<Readable>,
4676
+ callback?:
4677
+ | BodyResponseCallback<Schema$GetAccountForGcpRegistrationResponse>
4678
+ | BodyResponseCallback<Readable>
4679
+ ):
4680
+ | void
4681
+ | Promise<
4682
+ GaxiosResponseWithHTTP2<Schema$GetAccountForGcpRegistrationResponse>
4683
+ >
4684
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
4685
+ let params = (paramsOrCallback ||
4686
+ {}) as Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration;
4687
+ let options = (optionsOrCallback || {}) as MethodOptions;
4688
+
4689
+ if (typeof paramsOrCallback === 'function') {
4690
+ callback = paramsOrCallback;
4691
+ params =
4692
+ {} as Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration;
4693
+ options = {};
4694
+ }
4695
+
4696
+ if (typeof optionsOrCallback === 'function') {
4697
+ callback = optionsOrCallback;
4698
+ options = {};
4699
+ }
4700
+
4701
+ const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
4702
+ const parameters = {
4703
+ options: Object.assign(
4704
+ {
4705
+ url: (
4706
+ rootUrl + '/accounts/v1/accounts:getAccountForGcpRegistration'
4707
+ ).replace(/([^:]\/)\/+/g, '$1'),
4708
+ method: 'GET',
4709
+ apiVersion: '',
4710
+ },
4711
+ options
4712
+ ),
4713
+ params,
4714
+ requiredParams: [],
4715
+ pathParams: [],
4716
+ context: this.context,
4717
+ };
4718
+ if (callback) {
4719
+ createAPIRequest<Schema$GetAccountForGcpRegistrationResponse>(
4720
+ parameters,
4721
+ callback as BodyResponseCallback<unknown>
4722
+ );
4723
+ } else {
4724
+ return createAPIRequest<Schema$GetAccountForGcpRegistrationResponse>(
4725
+ parameters
4726
+ );
4727
+ }
4728
+ }
4729
+
4728
4730
  /**
4729
4731
  * Retrieves a developer registration for a merchant.
4730
4732
  * @example
@@ -5163,6 +5165,8 @@ export namespace merchantapi_accounts_v1 {
5163
5165
  }
5164
5166
  }
5165
5167
 
5168
+ export interface Params$Resource$Accounts$Developerregistration$Getaccountforgcpregistration
5169
+ extends StandardParameters {}
5166
5170
  export interface Params$Resource$Accounts$Developerregistration$Getdeveloperregistration
5167
5171
  extends StandardParameters {
5168
5172
  /**
@@ -2060,7 +2060,7 @@ export namespace merchantapi_accounts_v1beta {
2060
2060
  checkoutUriTemplate?: string | null;
2061
2061
  }
2062
2062
  /**
2063
- * The `User` message 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).
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
  /**
@@ -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
  /**