@googleapis/merchantapi 16.0.0 → 16.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 +9 -0
- package/accounts_v1.ts +361 -0
- package/build/accounts_v1.d.ts +196 -0
- package/build/accounts_v1.js +73 -0
- package/build/accounts_v1.js.map +1 -1
- package/build/inventories_v1.d.ts +36 -0
- package/build/inventories_v1.js.map +1 -1
- package/build/inventories_v1beta.d.ts +36 -0
- package/build/inventories_v1beta.js.map +1 -1
- package/build/issueresolution_v1.d.ts +6 -0
- package/build/issueresolution_v1.js.map +1 -1
- package/build/issueresolution_v1beta.d.ts +6 -0
- package/build/issueresolution_v1beta.js.map +1 -1
- package/build/products_v1.d.ts +18 -0
- package/build/products_v1.js.map +1 -1
- package/build/products_v1beta.d.ts +18 -0
- package/build/products_v1beta.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/inventories_v1.ts +36 -0
- package/inventories_v1beta.ts +36 -0
- package/issueresolution_v1.ts +6 -0
- package/issueresolution_v1beta.ts +6 -0
- package/package.json +1 -1
- package/products_v1.ts +18 -0
- package/products_v1beta.ts +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [16.1.0](https://github.com/googleapis/google-api-nodejs-client/compare/merchantapi-v16.0.0...merchantapi-v16.1.0) (2025-11-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **merchantapi:** update the API ([126dbf3](https://github.com/googleapis/google-api-nodejs-client/commit/126dbf39a0b92092e2f19efb491d4e07de74c418))
|
|
9
|
+
* **merchantapi:** update the API ([33ba80e](https://github.com/googleapis/google-api-nodejs-client/commit/33ba80e5bf48a4cc05552c8a8607e98c43d8c0a7))
|
|
10
|
+
* regenerate index files ([55171de](https://github.com/googleapis/google-api-nodejs-client/commit/55171de7cd500021ca8df008337dacc3ca9da23b))
|
|
11
|
+
|
|
3
12
|
## [16.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/merchantapi-v15.0.0...merchantapi-v16.0.0) (2025-11-11)
|
|
4
13
|
|
|
5
14
|
|
package/accounts_v1.ts
CHANGED
|
@@ -231,6 +231,19 @@ export namespace merchantapi_accounts_v1 {
|
|
|
231
231
|
*/
|
|
232
232
|
title?: string | null;
|
|
233
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* A limit of a certain type that is applied to an account.
|
|
236
|
+
*/
|
|
237
|
+
export interface Schema$AccountLimit {
|
|
238
|
+
/**
|
|
239
|
+
* Identifier. The limit part of the name will be a combination of the type and the scope. For example: `accounts/123/limits/products~ADS_NON_EEA` Format: `accounts/{account\}/limits/{limit\}`
|
|
240
|
+
*/
|
|
241
|
+
name?: string | null;
|
|
242
|
+
/**
|
|
243
|
+
* The limit for products.
|
|
244
|
+
*/
|
|
245
|
+
products?: Schema$ProductLimit;
|
|
246
|
+
}
|
|
234
247
|
/**
|
|
235
248
|
* `AccountManagement` payload.
|
|
236
249
|
*/
|
|
@@ -1136,6 +1149,19 @@ export namespace merchantapi_accounts_v1 {
|
|
|
1136
1149
|
*/
|
|
1137
1150
|
nextPageToken?: string | null;
|
|
1138
1151
|
}
|
|
1152
|
+
/**
|
|
1153
|
+
* Response message for the `ListAccountLimits` method.
|
|
1154
|
+
*/
|
|
1155
|
+
export interface Schema$ListAccountLimitsResponse {
|
|
1156
|
+
/**
|
|
1157
|
+
* The limits for the given account.
|
|
1158
|
+
*/
|
|
1159
|
+
accountLimits?: Schema$AccountLimit[];
|
|
1160
|
+
/**
|
|
1161
|
+
* A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
|
|
1162
|
+
*/
|
|
1163
|
+
nextPageToken?: string | null;
|
|
1164
|
+
}
|
|
1139
1165
|
/**
|
|
1140
1166
|
* Response after trying to list account relationships.
|
|
1141
1167
|
*/
|
|
@@ -1594,6 +1620,19 @@ export namespace merchantapi_accounts_v1 {
|
|
|
1594
1620
|
*/
|
|
1595
1621
|
reportingContext?: string | null;
|
|
1596
1622
|
}
|
|
1623
|
+
/**
|
|
1624
|
+
* The limit for products.
|
|
1625
|
+
*/
|
|
1626
|
+
export interface Schema$ProductLimit {
|
|
1627
|
+
/**
|
|
1628
|
+
* Required. The maximum number of products that are allowed in the account in the given scope.
|
|
1629
|
+
*/
|
|
1630
|
+
limit?: string | null;
|
|
1631
|
+
/**
|
|
1632
|
+
* Required. The scope of the product limit.
|
|
1633
|
+
*/
|
|
1634
|
+
scope?: string | null;
|
|
1635
|
+
}
|
|
1597
1636
|
/**
|
|
1598
1637
|
* `ProductsManagement` payload.
|
|
1599
1638
|
*/
|
|
@@ -2244,6 +2283,7 @@ export namespace merchantapi_accounts_v1 {
|
|
|
2244
2283
|
gbpAccounts: Resource$Accounts$Gbpaccounts;
|
|
2245
2284
|
homepage: Resource$Accounts$Homepage;
|
|
2246
2285
|
issues: Resource$Accounts$Issues;
|
|
2286
|
+
limits: Resource$Accounts$Limits;
|
|
2247
2287
|
omnichannelSettings: Resource$Accounts$Omnichannelsettings;
|
|
2248
2288
|
onlineReturnPolicies: Resource$Accounts$Onlinereturnpolicies;
|
|
2249
2289
|
programs: Resource$Accounts$Programs;
|
|
@@ -2274,6 +2314,7 @@ export namespace merchantapi_accounts_v1 {
|
|
|
2274
2314
|
this.gbpAccounts = new Resource$Accounts$Gbpaccounts(this.context);
|
|
2275
2315
|
this.homepage = new Resource$Accounts$Homepage(this.context);
|
|
2276
2316
|
this.issues = new Resource$Accounts$Issues(this.context);
|
|
2317
|
+
this.limits = new Resource$Accounts$Limits(this.context);
|
|
2277
2318
|
this.omnichannelSettings = new Resource$Accounts$Omnichannelsettings(
|
|
2278
2319
|
this.context
|
|
2279
2320
|
);
|
|
@@ -6669,6 +6710,326 @@ export namespace merchantapi_accounts_v1 {
|
|
|
6669
6710
|
timeZone?: string;
|
|
6670
6711
|
}
|
|
6671
6712
|
|
|
6713
|
+
export class Resource$Accounts$Limits {
|
|
6714
|
+
context: APIRequestContext;
|
|
6715
|
+
constructor(context: APIRequestContext) {
|
|
6716
|
+
this.context = context;
|
|
6717
|
+
}
|
|
6718
|
+
|
|
6719
|
+
/**
|
|
6720
|
+
* Retrieves an account limit.
|
|
6721
|
+
* @example
|
|
6722
|
+
* ```js
|
|
6723
|
+
* // Before running the sample:
|
|
6724
|
+
* // - Enable the API at:
|
|
6725
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
6726
|
+
* // - Login into gcloud by running:
|
|
6727
|
+
* // ```sh
|
|
6728
|
+
* // $ gcloud auth application-default login
|
|
6729
|
+
* // ```
|
|
6730
|
+
* // - Install the npm module by running:
|
|
6731
|
+
* // ```sh
|
|
6732
|
+
* // $ npm install googleapis
|
|
6733
|
+
* // ```
|
|
6734
|
+
*
|
|
6735
|
+
* const {google} = require('googleapis');
|
|
6736
|
+
* const merchantapi = google.merchantapi('accounts_v1');
|
|
6737
|
+
*
|
|
6738
|
+
* async function main() {
|
|
6739
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6740
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6741
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
6742
|
+
* });
|
|
6743
|
+
*
|
|
6744
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6745
|
+
* const authClient = await auth.getClient();
|
|
6746
|
+
* google.options({auth: authClient});
|
|
6747
|
+
*
|
|
6748
|
+
* // Do the magic
|
|
6749
|
+
* const res = await merchantapi.accounts.limits.get({
|
|
6750
|
+
* // Required. The name of the limit to retrieve. Format: `accounts/{account\}/limits/{limit\}` For example: `accounts/123/limits/products~ADS_NON_EEA`
|
|
6751
|
+
* name: 'accounts/my-account/limits/my-limit',
|
|
6752
|
+
* });
|
|
6753
|
+
* console.log(res.data);
|
|
6754
|
+
*
|
|
6755
|
+
* // Example response
|
|
6756
|
+
* // {
|
|
6757
|
+
* // "name": "my_name",
|
|
6758
|
+
* // "products": {}
|
|
6759
|
+
* // }
|
|
6760
|
+
* }
|
|
6761
|
+
*
|
|
6762
|
+
* main().catch(e => {
|
|
6763
|
+
* console.error(e);
|
|
6764
|
+
* throw e;
|
|
6765
|
+
* });
|
|
6766
|
+
*
|
|
6767
|
+
* ```
|
|
6768
|
+
*
|
|
6769
|
+
* @param params - Parameters for request
|
|
6770
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
6771
|
+
* @param callback - Optional callback that handles the response.
|
|
6772
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6773
|
+
*/
|
|
6774
|
+
get(
|
|
6775
|
+
params: Params$Resource$Accounts$Limits$Get,
|
|
6776
|
+
options: StreamMethodOptions
|
|
6777
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
6778
|
+
get(
|
|
6779
|
+
params?: Params$Resource$Accounts$Limits$Get,
|
|
6780
|
+
options?: MethodOptions
|
|
6781
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$AccountLimit>>;
|
|
6782
|
+
get(
|
|
6783
|
+
params: Params$Resource$Accounts$Limits$Get,
|
|
6784
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
6785
|
+
callback: BodyResponseCallback<Readable>
|
|
6786
|
+
): void;
|
|
6787
|
+
get(
|
|
6788
|
+
params: Params$Resource$Accounts$Limits$Get,
|
|
6789
|
+
options: MethodOptions | BodyResponseCallback<Schema$AccountLimit>,
|
|
6790
|
+
callback: BodyResponseCallback<Schema$AccountLimit>
|
|
6791
|
+
): void;
|
|
6792
|
+
get(
|
|
6793
|
+
params: Params$Resource$Accounts$Limits$Get,
|
|
6794
|
+
callback: BodyResponseCallback<Schema$AccountLimit>
|
|
6795
|
+
): void;
|
|
6796
|
+
get(callback: BodyResponseCallback<Schema$AccountLimit>): void;
|
|
6797
|
+
get(
|
|
6798
|
+
paramsOrCallback?:
|
|
6799
|
+
| Params$Resource$Accounts$Limits$Get
|
|
6800
|
+
| BodyResponseCallback<Schema$AccountLimit>
|
|
6801
|
+
| BodyResponseCallback<Readable>,
|
|
6802
|
+
optionsOrCallback?:
|
|
6803
|
+
| MethodOptions
|
|
6804
|
+
| StreamMethodOptions
|
|
6805
|
+
| BodyResponseCallback<Schema$AccountLimit>
|
|
6806
|
+
| BodyResponseCallback<Readable>,
|
|
6807
|
+
callback?:
|
|
6808
|
+
| BodyResponseCallback<Schema$AccountLimit>
|
|
6809
|
+
| BodyResponseCallback<Readable>
|
|
6810
|
+
):
|
|
6811
|
+
| void
|
|
6812
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$AccountLimit>>
|
|
6813
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
6814
|
+
let params = (paramsOrCallback ||
|
|
6815
|
+
{}) as Params$Resource$Accounts$Limits$Get;
|
|
6816
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
6817
|
+
|
|
6818
|
+
if (typeof paramsOrCallback === 'function') {
|
|
6819
|
+
callback = paramsOrCallback;
|
|
6820
|
+
params = {} as Params$Resource$Accounts$Limits$Get;
|
|
6821
|
+
options = {};
|
|
6822
|
+
}
|
|
6823
|
+
|
|
6824
|
+
if (typeof optionsOrCallback === 'function') {
|
|
6825
|
+
callback = optionsOrCallback;
|
|
6826
|
+
options = {};
|
|
6827
|
+
}
|
|
6828
|
+
|
|
6829
|
+
const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
|
|
6830
|
+
const parameters = {
|
|
6831
|
+
options: Object.assign(
|
|
6832
|
+
{
|
|
6833
|
+
url: (rootUrl + '/accounts/v1/{+name}').replace(
|
|
6834
|
+
/([^:]\/)\/+/g,
|
|
6835
|
+
'$1'
|
|
6836
|
+
),
|
|
6837
|
+
method: 'GET',
|
|
6838
|
+
apiVersion: '',
|
|
6839
|
+
},
|
|
6840
|
+
options
|
|
6841
|
+
),
|
|
6842
|
+
params,
|
|
6843
|
+
requiredParams: ['name'],
|
|
6844
|
+
pathParams: ['name'],
|
|
6845
|
+
context: this.context,
|
|
6846
|
+
};
|
|
6847
|
+
if (callback) {
|
|
6848
|
+
createAPIRequest<Schema$AccountLimit>(
|
|
6849
|
+
parameters,
|
|
6850
|
+
callback as BodyResponseCallback<unknown>
|
|
6851
|
+
);
|
|
6852
|
+
} else {
|
|
6853
|
+
return createAPIRequest<Schema$AccountLimit>(parameters);
|
|
6854
|
+
}
|
|
6855
|
+
}
|
|
6856
|
+
|
|
6857
|
+
/**
|
|
6858
|
+
* Lists the limits of an account.
|
|
6859
|
+
* @example
|
|
6860
|
+
* ```js
|
|
6861
|
+
* // Before running the sample:
|
|
6862
|
+
* // - Enable the API at:
|
|
6863
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
6864
|
+
* // - Login into gcloud by running:
|
|
6865
|
+
* // ```sh
|
|
6866
|
+
* // $ gcloud auth application-default login
|
|
6867
|
+
* // ```
|
|
6868
|
+
* // - Install the npm module by running:
|
|
6869
|
+
* // ```sh
|
|
6870
|
+
* // $ npm install googleapis
|
|
6871
|
+
* // ```
|
|
6872
|
+
*
|
|
6873
|
+
* const {google} = require('googleapis');
|
|
6874
|
+
* const merchantapi = google.merchantapi('accounts_v1');
|
|
6875
|
+
*
|
|
6876
|
+
* async function main() {
|
|
6877
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6878
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6879
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
6880
|
+
* });
|
|
6881
|
+
*
|
|
6882
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6883
|
+
* const authClient = await auth.getClient();
|
|
6884
|
+
* google.options({auth: authClient});
|
|
6885
|
+
*
|
|
6886
|
+
* // Do the magic
|
|
6887
|
+
* const res = await merchantapi.accounts.limits.list({
|
|
6888
|
+
* // Required. A filter on the limit `type` is required, for example, `type = "products"`.
|
|
6889
|
+
* filter: 'placeholder-value',
|
|
6890
|
+
* // Optional. The maximum number of limits to return. The service may return fewer than this value. If unspecified, at most 100 limits will be returned. The maximum value is 100; values above 100 will be coerced to 100.
|
|
6891
|
+
* pageSize: 'placeholder-value',
|
|
6892
|
+
* // Optional. A page token, received from a previous `ListAccountLimits` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccountLimits` must match the call that provided the page token.
|
|
6893
|
+
* pageToken: 'placeholder-value',
|
|
6894
|
+
* // Required. The parent account. Format: `accounts/{account\}`
|
|
6895
|
+
* parent: 'accounts/my-account',
|
|
6896
|
+
* });
|
|
6897
|
+
* console.log(res.data);
|
|
6898
|
+
*
|
|
6899
|
+
* // Example response
|
|
6900
|
+
* // {
|
|
6901
|
+
* // "accountLimits": [],
|
|
6902
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
6903
|
+
* // }
|
|
6904
|
+
* }
|
|
6905
|
+
*
|
|
6906
|
+
* main().catch(e => {
|
|
6907
|
+
* console.error(e);
|
|
6908
|
+
* throw e;
|
|
6909
|
+
* });
|
|
6910
|
+
*
|
|
6911
|
+
* ```
|
|
6912
|
+
*
|
|
6913
|
+
* @param params - Parameters for request
|
|
6914
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
6915
|
+
* @param callback - Optional callback that handles the response.
|
|
6916
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6917
|
+
*/
|
|
6918
|
+
list(
|
|
6919
|
+
params: Params$Resource$Accounts$Limits$List,
|
|
6920
|
+
options: StreamMethodOptions
|
|
6921
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
6922
|
+
list(
|
|
6923
|
+
params?: Params$Resource$Accounts$Limits$List,
|
|
6924
|
+
options?: MethodOptions
|
|
6925
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListAccountLimitsResponse>>;
|
|
6926
|
+
list(
|
|
6927
|
+
params: Params$Resource$Accounts$Limits$List,
|
|
6928
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
6929
|
+
callback: BodyResponseCallback<Readable>
|
|
6930
|
+
): void;
|
|
6931
|
+
list(
|
|
6932
|
+
params: Params$Resource$Accounts$Limits$List,
|
|
6933
|
+
options:
|
|
6934
|
+
| MethodOptions
|
|
6935
|
+
| BodyResponseCallback<Schema$ListAccountLimitsResponse>,
|
|
6936
|
+
callback: BodyResponseCallback<Schema$ListAccountLimitsResponse>
|
|
6937
|
+
): void;
|
|
6938
|
+
list(
|
|
6939
|
+
params: Params$Resource$Accounts$Limits$List,
|
|
6940
|
+
callback: BodyResponseCallback<Schema$ListAccountLimitsResponse>
|
|
6941
|
+
): void;
|
|
6942
|
+
list(
|
|
6943
|
+
callback: BodyResponseCallback<Schema$ListAccountLimitsResponse>
|
|
6944
|
+
): void;
|
|
6945
|
+
list(
|
|
6946
|
+
paramsOrCallback?:
|
|
6947
|
+
| Params$Resource$Accounts$Limits$List
|
|
6948
|
+
| BodyResponseCallback<Schema$ListAccountLimitsResponse>
|
|
6949
|
+
| BodyResponseCallback<Readable>,
|
|
6950
|
+
optionsOrCallback?:
|
|
6951
|
+
| MethodOptions
|
|
6952
|
+
| StreamMethodOptions
|
|
6953
|
+
| BodyResponseCallback<Schema$ListAccountLimitsResponse>
|
|
6954
|
+
| BodyResponseCallback<Readable>,
|
|
6955
|
+
callback?:
|
|
6956
|
+
| BodyResponseCallback<Schema$ListAccountLimitsResponse>
|
|
6957
|
+
| BodyResponseCallback<Readable>
|
|
6958
|
+
):
|
|
6959
|
+
| void
|
|
6960
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListAccountLimitsResponse>>
|
|
6961
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
6962
|
+
let params = (paramsOrCallback ||
|
|
6963
|
+
{}) as Params$Resource$Accounts$Limits$List;
|
|
6964
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
6965
|
+
|
|
6966
|
+
if (typeof paramsOrCallback === 'function') {
|
|
6967
|
+
callback = paramsOrCallback;
|
|
6968
|
+
params = {} as Params$Resource$Accounts$Limits$List;
|
|
6969
|
+
options = {};
|
|
6970
|
+
}
|
|
6971
|
+
|
|
6972
|
+
if (typeof optionsOrCallback === 'function') {
|
|
6973
|
+
callback = optionsOrCallback;
|
|
6974
|
+
options = {};
|
|
6975
|
+
}
|
|
6976
|
+
|
|
6977
|
+
const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
|
|
6978
|
+
const parameters = {
|
|
6979
|
+
options: Object.assign(
|
|
6980
|
+
{
|
|
6981
|
+
url: (rootUrl + '/accounts/v1/{+parent}/limits').replace(
|
|
6982
|
+
/([^:]\/)\/+/g,
|
|
6983
|
+
'$1'
|
|
6984
|
+
),
|
|
6985
|
+
method: 'GET',
|
|
6986
|
+
apiVersion: '',
|
|
6987
|
+
},
|
|
6988
|
+
options
|
|
6989
|
+
),
|
|
6990
|
+
params,
|
|
6991
|
+
requiredParams: ['parent'],
|
|
6992
|
+
pathParams: ['parent'],
|
|
6993
|
+
context: this.context,
|
|
6994
|
+
};
|
|
6995
|
+
if (callback) {
|
|
6996
|
+
createAPIRequest<Schema$ListAccountLimitsResponse>(
|
|
6997
|
+
parameters,
|
|
6998
|
+
callback as BodyResponseCallback<unknown>
|
|
6999
|
+
);
|
|
7000
|
+
} else {
|
|
7001
|
+
return createAPIRequest<Schema$ListAccountLimitsResponse>(parameters);
|
|
7002
|
+
}
|
|
7003
|
+
}
|
|
7004
|
+
}
|
|
7005
|
+
|
|
7006
|
+
export interface Params$Resource$Accounts$Limits$Get
|
|
7007
|
+
extends StandardParameters {
|
|
7008
|
+
/**
|
|
7009
|
+
* Required. The name of the limit to retrieve. Format: `accounts/{account\}/limits/{limit\}` For example: `accounts/123/limits/products~ADS_NON_EEA`
|
|
7010
|
+
*/
|
|
7011
|
+
name?: string;
|
|
7012
|
+
}
|
|
7013
|
+
export interface Params$Resource$Accounts$Limits$List
|
|
7014
|
+
extends StandardParameters {
|
|
7015
|
+
/**
|
|
7016
|
+
* Required. A filter on the limit `type` is required, for example, `type = "products"`.
|
|
7017
|
+
*/
|
|
7018
|
+
filter?: string;
|
|
7019
|
+
/**
|
|
7020
|
+
* Optional. The maximum number of limits to return. The service may return fewer than this value. If unspecified, at most 100 limits will be returned. The maximum value is 100; values above 100 will be coerced to 100.
|
|
7021
|
+
*/
|
|
7022
|
+
pageSize?: number;
|
|
7023
|
+
/**
|
|
7024
|
+
* Optional. A page token, received from a previous `ListAccountLimits` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccountLimits` must match the call that provided the page token.
|
|
7025
|
+
*/
|
|
7026
|
+
pageToken?: string;
|
|
7027
|
+
/**
|
|
7028
|
+
* Required. The parent account. Format: `accounts/{account\}`
|
|
7029
|
+
*/
|
|
7030
|
+
parent?: string;
|
|
7031
|
+
}
|
|
7032
|
+
|
|
6672
7033
|
export class Resource$Accounts$Omnichannelsettings {
|
|
6673
7034
|
context: APIRequestContext;
|
|
6674
7035
|
lfpProviders: Resource$Accounts$Omnichannelsettings$Lfpproviders;
|
package/build/accounts_v1.d.ts
CHANGED
|
@@ -177,6 +177,19 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
177
177
|
*/
|
|
178
178
|
title?: string | null;
|
|
179
179
|
}
|
|
180
|
+
/**
|
|
181
|
+
* A limit of a certain type that is applied to an account.
|
|
182
|
+
*/
|
|
183
|
+
export interface Schema$AccountLimit {
|
|
184
|
+
/**
|
|
185
|
+
* Identifier. The limit part of the name will be a combination of the type and the scope. For example: `accounts/123/limits/products~ADS_NON_EEA` Format: `accounts/{account\}/limits/{limit\}`
|
|
186
|
+
*/
|
|
187
|
+
name?: string | null;
|
|
188
|
+
/**
|
|
189
|
+
* The limit for products.
|
|
190
|
+
*/
|
|
191
|
+
products?: Schema$ProductLimit;
|
|
192
|
+
}
|
|
180
193
|
/**
|
|
181
194
|
* `AccountManagement` payload.
|
|
182
195
|
*/
|
|
@@ -1088,6 +1101,19 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
1088
1101
|
*/
|
|
1089
1102
|
nextPageToken?: string | null;
|
|
1090
1103
|
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Response message for the `ListAccountLimits` method.
|
|
1106
|
+
*/
|
|
1107
|
+
export interface Schema$ListAccountLimitsResponse {
|
|
1108
|
+
/**
|
|
1109
|
+
* The limits for the given account.
|
|
1110
|
+
*/
|
|
1111
|
+
accountLimits?: Schema$AccountLimit[];
|
|
1112
|
+
/**
|
|
1113
|
+
* A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
|
|
1114
|
+
*/
|
|
1115
|
+
nextPageToken?: string | null;
|
|
1116
|
+
}
|
|
1091
1117
|
/**
|
|
1092
1118
|
* Response after trying to list account relationships.
|
|
1093
1119
|
*/
|
|
@@ -1547,6 +1573,19 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
1547
1573
|
*/
|
|
1548
1574
|
reportingContext?: string | null;
|
|
1549
1575
|
}
|
|
1576
|
+
/**
|
|
1577
|
+
* The limit for products.
|
|
1578
|
+
*/
|
|
1579
|
+
export interface Schema$ProductLimit {
|
|
1580
|
+
/**
|
|
1581
|
+
* Required. The maximum number of products that are allowed in the account in the given scope.
|
|
1582
|
+
*/
|
|
1583
|
+
limit?: string | null;
|
|
1584
|
+
/**
|
|
1585
|
+
* Required. The scope of the product limit.
|
|
1586
|
+
*/
|
|
1587
|
+
scope?: string | null;
|
|
1588
|
+
}
|
|
1550
1589
|
/**
|
|
1551
1590
|
* `ProductsManagement` payload.
|
|
1552
1591
|
*/
|
|
@@ -2201,6 +2240,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
2201
2240
|
gbpAccounts: Resource$Accounts$Gbpaccounts;
|
|
2202
2241
|
homepage: Resource$Accounts$Homepage;
|
|
2203
2242
|
issues: Resource$Accounts$Issues;
|
|
2243
|
+
limits: Resource$Accounts$Limits;
|
|
2204
2244
|
omnichannelSettings: Resource$Accounts$Omnichannelsettings;
|
|
2205
2245
|
onlineReturnPolicies: Resource$Accounts$Onlinereturnpolicies;
|
|
2206
2246
|
programs: Resource$Accounts$Programs;
|
|
@@ -4376,6 +4416,162 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
4376
4416
|
*/
|
|
4377
4417
|
timeZone?: string;
|
|
4378
4418
|
}
|
|
4419
|
+
export class Resource$Accounts$Limits {
|
|
4420
|
+
context: APIRequestContext;
|
|
4421
|
+
constructor(context: APIRequestContext);
|
|
4422
|
+
/**
|
|
4423
|
+
* Retrieves an account limit.
|
|
4424
|
+
* @example
|
|
4425
|
+
* ```js
|
|
4426
|
+
* // Before running the sample:
|
|
4427
|
+
* // - Enable the API at:
|
|
4428
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
4429
|
+
* // - Login into gcloud by running:
|
|
4430
|
+
* // ```sh
|
|
4431
|
+
* // $ gcloud auth application-default login
|
|
4432
|
+
* // ```
|
|
4433
|
+
* // - Install the npm module by running:
|
|
4434
|
+
* // ```sh
|
|
4435
|
+
* // $ npm install googleapis
|
|
4436
|
+
* // ```
|
|
4437
|
+
*
|
|
4438
|
+
* const {google} = require('googleapis');
|
|
4439
|
+
* const merchantapi = google.merchantapi('accounts_v1');
|
|
4440
|
+
*
|
|
4441
|
+
* async function main() {
|
|
4442
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4443
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4444
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
4445
|
+
* });
|
|
4446
|
+
*
|
|
4447
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4448
|
+
* const authClient = await auth.getClient();
|
|
4449
|
+
* google.options({auth: authClient});
|
|
4450
|
+
*
|
|
4451
|
+
* // Do the magic
|
|
4452
|
+
* const res = await merchantapi.accounts.limits.get({
|
|
4453
|
+
* // Required. The name of the limit to retrieve. Format: `accounts/{account\}/limits/{limit\}` For example: `accounts/123/limits/products~ADS_NON_EEA`
|
|
4454
|
+
* name: 'accounts/my-account/limits/my-limit',
|
|
4455
|
+
* });
|
|
4456
|
+
* console.log(res.data);
|
|
4457
|
+
*
|
|
4458
|
+
* // Example response
|
|
4459
|
+
* // {
|
|
4460
|
+
* // "name": "my_name",
|
|
4461
|
+
* // "products": {}
|
|
4462
|
+
* // }
|
|
4463
|
+
* }
|
|
4464
|
+
*
|
|
4465
|
+
* main().catch(e => {
|
|
4466
|
+
* console.error(e);
|
|
4467
|
+
* throw e;
|
|
4468
|
+
* });
|
|
4469
|
+
*
|
|
4470
|
+
* ```
|
|
4471
|
+
*
|
|
4472
|
+
* @param params - Parameters for request
|
|
4473
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
4474
|
+
* @param callback - Optional callback that handles the response.
|
|
4475
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
4476
|
+
*/
|
|
4477
|
+
get(params: Params$Resource$Accounts$Limits$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4478
|
+
get(params?: Params$Resource$Accounts$Limits$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$AccountLimit>>;
|
|
4479
|
+
get(params: Params$Resource$Accounts$Limits$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
4480
|
+
get(params: Params$Resource$Accounts$Limits$Get, options: MethodOptions | BodyResponseCallback<Schema$AccountLimit>, callback: BodyResponseCallback<Schema$AccountLimit>): void;
|
|
4481
|
+
get(params: Params$Resource$Accounts$Limits$Get, callback: BodyResponseCallback<Schema$AccountLimit>): void;
|
|
4482
|
+
get(callback: BodyResponseCallback<Schema$AccountLimit>): void;
|
|
4483
|
+
/**
|
|
4484
|
+
* Lists the limits of an account.
|
|
4485
|
+
* @example
|
|
4486
|
+
* ```js
|
|
4487
|
+
* // Before running the sample:
|
|
4488
|
+
* // - Enable the API at:
|
|
4489
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
4490
|
+
* // - Login into gcloud by running:
|
|
4491
|
+
* // ```sh
|
|
4492
|
+
* // $ gcloud auth application-default login
|
|
4493
|
+
* // ```
|
|
4494
|
+
* // - Install the npm module by running:
|
|
4495
|
+
* // ```sh
|
|
4496
|
+
* // $ npm install googleapis
|
|
4497
|
+
* // ```
|
|
4498
|
+
*
|
|
4499
|
+
* const {google} = require('googleapis');
|
|
4500
|
+
* const merchantapi = google.merchantapi('accounts_v1');
|
|
4501
|
+
*
|
|
4502
|
+
* async function main() {
|
|
4503
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4504
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4505
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
4506
|
+
* });
|
|
4507
|
+
*
|
|
4508
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4509
|
+
* const authClient = await auth.getClient();
|
|
4510
|
+
* google.options({auth: authClient});
|
|
4511
|
+
*
|
|
4512
|
+
* // Do the magic
|
|
4513
|
+
* const res = await merchantapi.accounts.limits.list({
|
|
4514
|
+
* // Required. A filter on the limit `type` is required, for example, `type = "products"`.
|
|
4515
|
+
* filter: 'placeholder-value',
|
|
4516
|
+
* // Optional. The maximum number of limits to return. The service may return fewer than this value. If unspecified, at most 100 limits will be returned. The maximum value is 100; values above 100 will be coerced to 100.
|
|
4517
|
+
* pageSize: 'placeholder-value',
|
|
4518
|
+
* // Optional. A page token, received from a previous `ListAccountLimits` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccountLimits` must match the call that provided the page token.
|
|
4519
|
+
* pageToken: 'placeholder-value',
|
|
4520
|
+
* // Required. The parent account. Format: `accounts/{account\}`
|
|
4521
|
+
* parent: 'accounts/my-account',
|
|
4522
|
+
* });
|
|
4523
|
+
* console.log(res.data);
|
|
4524
|
+
*
|
|
4525
|
+
* // Example response
|
|
4526
|
+
* // {
|
|
4527
|
+
* // "accountLimits": [],
|
|
4528
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
4529
|
+
* // }
|
|
4530
|
+
* }
|
|
4531
|
+
*
|
|
4532
|
+
* main().catch(e => {
|
|
4533
|
+
* console.error(e);
|
|
4534
|
+
* throw e;
|
|
4535
|
+
* });
|
|
4536
|
+
*
|
|
4537
|
+
* ```
|
|
4538
|
+
*
|
|
4539
|
+
* @param params - Parameters for request
|
|
4540
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
4541
|
+
* @param callback - Optional callback that handles the response.
|
|
4542
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
4543
|
+
*/
|
|
4544
|
+
list(params: Params$Resource$Accounts$Limits$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4545
|
+
list(params?: Params$Resource$Accounts$Limits$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListAccountLimitsResponse>>;
|
|
4546
|
+
list(params: Params$Resource$Accounts$Limits$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
4547
|
+
list(params: Params$Resource$Accounts$Limits$List, options: MethodOptions | BodyResponseCallback<Schema$ListAccountLimitsResponse>, callback: BodyResponseCallback<Schema$ListAccountLimitsResponse>): void;
|
|
4548
|
+
list(params: Params$Resource$Accounts$Limits$List, callback: BodyResponseCallback<Schema$ListAccountLimitsResponse>): void;
|
|
4549
|
+
list(callback: BodyResponseCallback<Schema$ListAccountLimitsResponse>): void;
|
|
4550
|
+
}
|
|
4551
|
+
export interface Params$Resource$Accounts$Limits$Get extends StandardParameters {
|
|
4552
|
+
/**
|
|
4553
|
+
* Required. The name of the limit to retrieve. Format: `accounts/{account\}/limits/{limit\}` For example: `accounts/123/limits/products~ADS_NON_EEA`
|
|
4554
|
+
*/
|
|
4555
|
+
name?: string;
|
|
4556
|
+
}
|
|
4557
|
+
export interface Params$Resource$Accounts$Limits$List extends StandardParameters {
|
|
4558
|
+
/**
|
|
4559
|
+
* Required. A filter on the limit `type` is required, for example, `type = "products"`.
|
|
4560
|
+
*/
|
|
4561
|
+
filter?: string;
|
|
4562
|
+
/**
|
|
4563
|
+
* Optional. The maximum number of limits to return. The service may return fewer than this value. If unspecified, at most 100 limits will be returned. The maximum value is 100; values above 100 will be coerced to 100.
|
|
4564
|
+
*/
|
|
4565
|
+
pageSize?: number;
|
|
4566
|
+
/**
|
|
4567
|
+
* Optional. A page token, received from a previous `ListAccountLimits` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccountLimits` must match the call that provided the page token.
|
|
4568
|
+
*/
|
|
4569
|
+
pageToken?: string;
|
|
4570
|
+
/**
|
|
4571
|
+
* Required. The parent account. Format: `accounts/{account\}`
|
|
4572
|
+
*/
|
|
4573
|
+
parent?: string;
|
|
4574
|
+
}
|
|
4379
4575
|
export class Resource$Accounts$Omnichannelsettings {
|
|
4380
4576
|
context: APIRequestContext;
|
|
4381
4577
|
lfpProviders: Resource$Accounts$Omnichannelsettings$Lfpproviders;
|