@sp-api-sdk/finances-transfers-api-2024-06-01 5.0.0 → 5.1.1

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/dist/index.cjs CHANGED
@@ -1,411 +1,416 @@
1
- "use strict";
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region \0rolldown/runtime.js
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __getProtoOf = Object.getPrototypeOf;
7
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
9
  var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
10
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
+ get: ((k) => from[k]).bind(null, key),
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ }
17
+ return to;
19
18
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/index.ts
31
- var index_exports = {};
32
- __export(index_exports, {
33
- AssignmentType: () => AssignmentType,
34
- FinancesTransfersApi: () => FinancesTransfersApi,
35
- FinancesTransfersApiAxiosParamCreator: () => FinancesTransfersApiAxiosParamCreator,
36
- FinancesTransfersApiClient: () => FinancesTransfersApiClient,
37
- FinancesTransfersApiFactory: () => FinancesTransfersApiFactory,
38
- FinancesTransfersApiFp: () => FinancesTransfersApiFp,
39
- GetPaymentMethodsPaymentMethodTypesEnum: () => GetPaymentMethodsPaymentMethodTypesEnum,
40
- PaymentMethodType: () => PaymentMethodType,
41
- clientRateLimits: () => clientRateLimits
42
- });
43
- module.exports = __toCommonJS(index_exports);
44
-
45
- // src/client.ts
46
- var import_common2 = require("@sp-api-sdk/common");
47
-
48
- // src/api-model/api/finances-transfers-api.ts
49
- var import_axios2 = __toESM(require("axios"), 1);
50
-
51
- // src/api-model/base.ts
52
- var import_axios = __toESM(require("axios"), 1);
53
- var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
54
- var COLLECTION_FORMATS = {
55
- csv: ",",
56
- ssv: " ",
57
- tsv: " ",
58
- pipes: "|"
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
20
+ value: mod,
21
+ enumerable: true
22
+ }) : target, mod));
23
+ //#endregion
24
+ let _sp_api_sdk_common = require("@sp-api-sdk/common");
25
+ let axios = require("axios");
26
+ axios = __toESM(axios, 1);
27
+ //#region src/api-model/base.ts
28
+ const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
29
+ const COLLECTION_FORMATS = {
30
+ csv: ",",
31
+ ssv: " ",
32
+ tsv: " ",
33
+ pipes: "|"
59
34
  };
60
35
  var BaseAPI = class {
61
- constructor(configuration, basePath = BASE_PATH, axios = import_axios.default) {
62
- this.basePath = basePath;
63
- this.axios = axios;
64
- if (configuration) {
65
- this.configuration = configuration;
66
- this.basePath = configuration.basePath ?? basePath;
67
- }
68
- }
69
- basePath;
70
- axios;
71
- configuration;
36
+ basePath;
37
+ axios;
38
+ configuration;
39
+ constructor(configuration, basePath = BASE_PATH, axios$4 = axios.default) {
40
+ this.basePath = basePath;
41
+ this.axios = axios$4;
42
+ if (configuration) {
43
+ this.configuration = configuration;
44
+ this.basePath = configuration.basePath ?? basePath;
45
+ }
46
+ }
72
47
  };
73
48
  var RequiredError = class extends Error {
74
- constructor(field, msg) {
75
- super(msg);
76
- this.field = field;
77
- this.name = "RequiredError";
78
- }
79
- field;
49
+ field;
50
+ constructor(field, msg) {
51
+ super(msg);
52
+ this.field = field;
53
+ this.name = "RequiredError";
54
+ }
80
55
  };
81
- var operationServerMap = {};
82
-
83
- // src/api-model/common.ts
84
- var DUMMY_BASE_URL = "https://example.com";
85
- var assertParamExists = function(functionName, paramName, paramValue) {
86
- if (paramValue === null || paramValue === void 0) {
87
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
88
- }
56
+ const operationServerMap = {};
57
+ //#endregion
58
+ //#region src/api-model/common.ts
59
+ const DUMMY_BASE_URL = "https://example.com";
60
+ /**
61
+ *
62
+ * @throws {RequiredError}
63
+ */
64
+ const assertParamExists = function(functionName, paramName, paramValue) {
65
+ if (paramValue === null || paramValue === void 0) throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
89
66
  };
90
67
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
91
- if (parameter == null) return;
92
- if (typeof parameter === "object") {
93
- if (Array.isArray(parameter) || parameter instanceof Set) {
94
- parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
95
- } else {
96
- Object.keys(parameter).forEach(
97
- (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
98
- );
99
- }
100
- } else {
101
- if (urlSearchParams.has(key)) {
102
- urlSearchParams.append(key, parameter);
103
- } else {
104
- urlSearchParams.set(key, parameter);
105
- }
106
- }
68
+ if (parameter == null) return;
69
+ if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
70
+ else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`));
71
+ else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter);
72
+ else urlSearchParams.set(key, parameter);
107
73
  }
108
- var setSearchParams = function(url, ...objects) {
109
- const searchParams = new URLSearchParams(url.search);
110
- setFlattenedQueryParams(searchParams, objects);
111
- url.search = searchParams.toString();
74
+ const setSearchParams = function(url, ...objects) {
75
+ const searchParams = new URLSearchParams(url.search);
76
+ setFlattenedQueryParams(searchParams, objects);
77
+ url.search = searchParams.toString();
112
78
  };
113
- var replaceWithSerializableTypeIfNeeded = function(key, value) {
114
- if (value instanceof Set) {
115
- return Array.from(value);
116
- } else {
117
- return value;
118
- }
79
+ /**
80
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
81
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
82
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
83
+ */
84
+ const replaceWithSerializableTypeIfNeeded = function(key, value) {
85
+ if (value instanceof Set) return Array.from(value);
86
+ else return value;
119
87
  };
120
- var serializeDataIfNeeded = function(value, requestOptions, configuration) {
121
- const nonString = typeof value !== "string";
122
- const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
123
- return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || "";
88
+ const serializeDataIfNeeded = function(value, requestOptions, configuration) {
89
+ const nonString = typeof value !== "string";
90
+ return (nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString) ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || "";
124
91
  };
125
- var toPathString = function(url) {
126
- return url.pathname + url.search + url.hash;
92
+ const toPathString = function(url) {
93
+ return url.pathname + url.search + url.hash;
127
94
  };
128
- var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
129
- return (axios = globalAxios3, basePath = BASE_PATH2) => {
130
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
131
- return axios.request(axiosRequestArgs);
132
- };
95
+ const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) {
96
+ return (axios = globalAxios, basePath = BASE_PATH) => {
97
+ const axiosRequestArgs = {
98
+ ...axiosArgs.options,
99
+ url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url
100
+ };
101
+ return axios.request(axiosRequestArgs);
102
+ };
133
103
  };
134
-
135
- // src/api-model/api/finances-transfers-api.ts
136
- var FinancesTransfersApiAxiosParamCreator = function(configuration) {
137
- return {
138
- /**
139
- * Returns the list of payment methods for the seller, which can be filtered by method type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
140
- * @param {string} marketplaceId The identifier of the marketplace from which you want to retrieve payment methods. For the list of possible marketplace identifiers, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
141
- * @param {Set<GetPaymentMethodsPaymentMethodTypesEnum>} [paymentMethodTypes] A comma-separated list of the payment method types you want to include in the response.
142
- * @param {*} [options] Override http request option.
143
- * @throws {RequiredError}
144
- */
145
- getPaymentMethods: async (marketplaceId, paymentMethodTypes, options = {}) => {
146
- assertParamExists("getPaymentMethods", "marketplaceId", marketplaceId);
147
- const localVarPath = `/finances/transfers/2024-06-01/paymentMethods`;
148
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
149
- let baseOptions;
150
- if (configuration) {
151
- baseOptions = configuration.baseOptions;
152
- }
153
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
154
- const localVarHeaderParameter = {};
155
- const localVarQueryParameter = {};
156
- if (marketplaceId !== void 0) {
157
- localVarQueryParameter["marketplaceId"] = marketplaceId;
158
- }
159
- if (paymentMethodTypes) {
160
- localVarQueryParameter["paymentMethodTypes"] = Array.from(paymentMethodTypes).join(COLLECTION_FORMATS.csv);
161
- }
162
- localVarHeaderParameter["Accept"] = "application/json";
163
- setSearchParams(localVarUrlObj, localVarQueryParameter);
164
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
165
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
166
- return {
167
- url: toPathString(localVarUrlObj),
168
- options: localVarRequestOptions
169
- };
170
- },
171
- /**
172
- * Initiates an on-demand payout to the seller\'s default deposit method in Seller Central for the given `marketplaceId` and `accountType`, if eligible. You can only initiate one on-demand payout for each marketplace and account type within a 24-hour period. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.017 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
173
- * @param {InitiatePayoutRequest} body The request body for the &#x60;initiatePayout&#x60; operation.
174
- * @param {*} [options] Override http request option.
175
- * @throws {RequiredError}
176
- */
177
- initiatePayout: async (body, options = {}) => {
178
- assertParamExists("initiatePayout", "body", body);
179
- const localVarPath = `/finances/transfers/2024-06-01/payouts`;
180
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
181
- let baseOptions;
182
- if (configuration) {
183
- baseOptions = configuration.baseOptions;
184
- }
185
- const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
186
- const localVarHeaderParameter = {};
187
- const localVarQueryParameter = {};
188
- localVarHeaderParameter["Content-Type"] = "application/json";
189
- localVarHeaderParameter["Accept"] = "application/json";
190
- setSearchParams(localVarUrlObj, localVarQueryParameter);
191
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
192
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
193
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
194
- return {
195
- url: toPathString(localVarUrlObj),
196
- options: localVarRequestOptions
197
- };
198
- }
199
- };
104
+ //#endregion
105
+ //#region src/api-model/api/finances-transfers-api.ts
106
+ /**
107
+ * FinancesTransfersApi - axios parameter creator
108
+ */
109
+ const FinancesTransfersApiAxiosParamCreator = function(configuration) {
110
+ return {
111
+ /**
112
+ * Returns the list of payment methods for the seller, which can be filtered by method type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
113
+ * @param {string} marketplaceId The identifier of the marketplace from which you want to retrieve payment methods. For the list of possible marketplace identifiers, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
114
+ * @param {Set<GetPaymentMethodsPaymentMethodTypesEnum>} [paymentMethodTypes] A comma-separated list of the payment method types you want to include in the response.
115
+ * @param {*} [options] Override http request option.
116
+ * @throws {RequiredError}
117
+ */
118
+ getPaymentMethods: async (marketplaceId, paymentMethodTypes, options = {}) => {
119
+ assertParamExists("getPaymentMethods", "marketplaceId", marketplaceId);
120
+ const localVarUrlObj = new URL(`/finances/transfers/2024-06-01/paymentMethods`, DUMMY_BASE_URL);
121
+ let baseOptions;
122
+ if (configuration) baseOptions = configuration.baseOptions;
123
+ const localVarRequestOptions = {
124
+ method: "GET",
125
+ ...baseOptions,
126
+ ...options
127
+ };
128
+ const localVarHeaderParameter = {};
129
+ const localVarQueryParameter = {};
130
+ if (marketplaceId !== void 0) localVarQueryParameter["marketplaceId"] = marketplaceId;
131
+ if (paymentMethodTypes) localVarQueryParameter["paymentMethodTypes"] = Array.from(paymentMethodTypes).join(COLLECTION_FORMATS.csv);
132
+ localVarHeaderParameter["Accept"] = "application/json";
133
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
134
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
135
+ localVarRequestOptions.headers = {
136
+ ...localVarHeaderParameter,
137
+ ...headersFromBaseOptions,
138
+ ...options.headers
139
+ };
140
+ return {
141
+ url: toPathString(localVarUrlObj),
142
+ options: localVarRequestOptions
143
+ };
144
+ },
145
+ /**
146
+ * Initiates an on-demand payout to the seller\'s default deposit method in Seller Central for the given `marketplaceId` and `accountType`, if eligible. You can only initiate one on-demand payout for each marketplace and account type within a 24-hour period. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.017 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
147
+ * @param {InitiatePayoutRequest} body The request body for the &#x60;initiatePayout&#x60; operation.
148
+ * @param {*} [options] Override http request option.
149
+ * @throws {RequiredError}
150
+ */
151
+ initiatePayout: async (body, options = {}) => {
152
+ assertParamExists("initiatePayout", "body", body);
153
+ const localVarUrlObj = new URL(`/finances/transfers/2024-06-01/payouts`, DUMMY_BASE_URL);
154
+ let baseOptions;
155
+ if (configuration) baseOptions = configuration.baseOptions;
156
+ const localVarRequestOptions = {
157
+ method: "POST",
158
+ ...baseOptions,
159
+ ...options
160
+ };
161
+ const localVarHeaderParameter = {};
162
+ const localVarQueryParameter = {};
163
+ localVarHeaderParameter["Content-Type"] = "application/json";
164
+ localVarHeaderParameter["Accept"] = "application/json";
165
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
166
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
167
+ localVarRequestOptions.headers = {
168
+ ...localVarHeaderParameter,
169
+ ...headersFromBaseOptions,
170
+ ...options.headers
171
+ };
172
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
173
+ return {
174
+ url: toPathString(localVarUrlObj),
175
+ options: localVarRequestOptions
176
+ };
177
+ }
178
+ };
200
179
  };
201
- var FinancesTransfersApiFp = function(configuration) {
202
- const localVarAxiosParamCreator = FinancesTransfersApiAxiosParamCreator(configuration);
203
- return {
204
- /**
205
- * Returns the list of payment methods for the seller, which can be filtered by method type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
206
- * @param {string} marketplaceId The identifier of the marketplace from which you want to retrieve payment methods. For the list of possible marketplace identifiers, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
207
- * @param {Set<GetPaymentMethodsPaymentMethodTypesEnum>} [paymentMethodTypes] A comma-separated list of the payment method types you want to include in the response.
208
- * @param {*} [options] Override http request option.
209
- * @throws {RequiredError}
210
- */
211
- async getPaymentMethods(marketplaceId, paymentMethodTypes, options) {
212
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPaymentMethods(marketplaceId, paymentMethodTypes, options);
213
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
214
- const localVarOperationServerBasePath = operationServerMap["FinancesTransfersApi.getPaymentMethods"]?.[localVarOperationServerIndex]?.url;
215
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
216
- },
217
- /**
218
- * Initiates an on-demand payout to the seller\'s default deposit method in Seller Central for the given `marketplaceId` and `accountType`, if eligible. You can only initiate one on-demand payout for each marketplace and account type within a 24-hour period. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.017 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
219
- * @param {InitiatePayoutRequest} body The request body for the &#x60;initiatePayout&#x60; operation.
220
- * @param {*} [options] Override http request option.
221
- * @throws {RequiredError}
222
- */
223
- async initiatePayout(body, options) {
224
- const localVarAxiosArgs = await localVarAxiosParamCreator.initiatePayout(body, options);
225
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
226
- const localVarOperationServerBasePath = operationServerMap["FinancesTransfersApi.initiatePayout"]?.[localVarOperationServerIndex]?.url;
227
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
228
- }
229
- };
180
+ /**
181
+ * FinancesTransfersApi - functional programming interface
182
+ */
183
+ const FinancesTransfersApiFp = function(configuration) {
184
+ const localVarAxiosParamCreator = FinancesTransfersApiAxiosParamCreator(configuration);
185
+ return {
186
+ /**
187
+ * Returns the list of payment methods for the seller, which can be filtered by method type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
188
+ * @param {string} marketplaceId The identifier of the marketplace from which you want to retrieve payment methods. For the list of possible marketplace identifiers, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
189
+ * @param {Set<GetPaymentMethodsPaymentMethodTypesEnum>} [paymentMethodTypes] A comma-separated list of the payment method types you want to include in the response.
190
+ * @param {*} [options] Override http request option.
191
+ * @throws {RequiredError}
192
+ */
193
+ async getPaymentMethods(marketplaceId, paymentMethodTypes, options) {
194
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPaymentMethods(marketplaceId, paymentMethodTypes, options);
195
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
196
+ const localVarOperationServerBasePath = operationServerMap["FinancesTransfersApi.getPaymentMethods"]?.[localVarOperationServerIndex]?.url;
197
+ return (axios$1, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$1, localVarOperationServerBasePath || basePath);
198
+ },
199
+ /**
200
+ * Initiates an on-demand payout to the seller\'s default deposit method in Seller Central for the given `marketplaceId` and `accountType`, if eligible. You can only initiate one on-demand payout for each marketplace and account type within a 24-hour period. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.017 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
201
+ * @param {InitiatePayoutRequest} body The request body for the &#x60;initiatePayout&#x60; operation.
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ async initiatePayout(body, options) {
206
+ const localVarAxiosArgs = await localVarAxiosParamCreator.initiatePayout(body, options);
207
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
208
+ const localVarOperationServerBasePath = operationServerMap["FinancesTransfersApi.initiatePayout"]?.[localVarOperationServerIndex]?.url;
209
+ return (axios$2, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$2, localVarOperationServerBasePath || basePath);
210
+ }
211
+ };
230
212
  };
231
- var FinancesTransfersApiFactory = function(configuration, basePath, axios) {
232
- const localVarFp = FinancesTransfersApiFp(configuration);
233
- return {
234
- /**
235
- * Returns the list of payment methods for the seller, which can be filtered by method type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
236
- * @param {FinancesTransfersApiGetPaymentMethodsRequest} requestParameters Request parameters.
237
- * @param {*} [options] Override http request option.
238
- * @throws {RequiredError}
239
- */
240
- getPaymentMethods(requestParameters, options) {
241
- return localVarFp.getPaymentMethods(requestParameters.marketplaceId, requestParameters.paymentMethodTypes, options).then((request) => request(axios, basePath));
242
- },
243
- /**
244
- * Initiates an on-demand payout to the seller\'s default deposit method in Seller Central for the given `marketplaceId` and `accountType`, if eligible. You can only initiate one on-demand payout for each marketplace and account type within a 24-hour period. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.017 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
245
- * @param {FinancesTransfersApiInitiatePayoutRequest} requestParameters Request parameters.
246
- * @param {*} [options] Override http request option.
247
- * @throws {RequiredError}
248
- */
249
- initiatePayout(requestParameters, options) {
250
- return localVarFp.initiatePayout(requestParameters.body, options).then((request) => request(axios, basePath));
251
- }
252
- };
213
+ /**
214
+ * FinancesTransfersApi - factory interface
215
+ */
216
+ const FinancesTransfersApiFactory = function(configuration, basePath, axios$3) {
217
+ const localVarFp = FinancesTransfersApiFp(configuration);
218
+ return {
219
+ /**
220
+ * Returns the list of payment methods for the seller, which can be filtered by method type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
221
+ * @param {FinancesTransfersApiGetPaymentMethodsRequest} requestParameters Request parameters.
222
+ * @param {*} [options] Override http request option.
223
+ * @throws {RequiredError}
224
+ */
225
+ getPaymentMethods(requestParameters, options) {
226
+ return localVarFp.getPaymentMethods(requestParameters.marketplaceId, requestParameters.paymentMethodTypes, options).then((request) => request(axios$3, basePath));
227
+ },
228
+ /**
229
+ * Initiates an on-demand payout to the seller\'s default deposit method in Seller Central for the given `marketplaceId` and `accountType`, if eligible. You can only initiate one on-demand payout for each marketplace and account type within a 24-hour period. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.017 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
230
+ * @param {FinancesTransfersApiInitiatePayoutRequest} requestParameters Request parameters.
231
+ * @param {*} [options] Override http request option.
232
+ * @throws {RequiredError}
233
+ */
234
+ initiatePayout(requestParameters, options) {
235
+ return localVarFp.initiatePayout(requestParameters.body, options).then((request) => request(axios$3, basePath));
236
+ }
237
+ };
253
238
  };
239
+ /**
240
+ * FinancesTransfersApi - object-oriented interface
241
+ */
254
242
  var FinancesTransfersApi = class extends BaseAPI {
255
- /**
256
- * Returns the list of payment methods for the seller, which can be filtered by method type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
257
- * @param {FinancesTransfersApiGetPaymentMethodsRequest} requestParameters Request parameters.
258
- * @param {*} [options] Override http request option.
259
- * @throws {RequiredError}
260
- */
261
- getPaymentMethods(requestParameters, options) {
262
- return FinancesTransfersApiFp(this.configuration).getPaymentMethods(requestParameters.marketplaceId, requestParameters.paymentMethodTypes, options).then((request) => request(this.axios, this.basePath));
263
- }
264
- /**
265
- * Initiates an on-demand payout to the seller\'s default deposit method in Seller Central for the given `marketplaceId` and `accountType`, if eligible. You can only initiate one on-demand payout for each marketplace and account type within a 24-hour period. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.017 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
266
- * @param {FinancesTransfersApiInitiatePayoutRequest} requestParameters Request parameters.
267
- * @param {*} [options] Override http request option.
268
- * @throws {RequiredError}
269
- */
270
- initiatePayout(requestParameters, options) {
271
- return FinancesTransfersApiFp(this.configuration).initiatePayout(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
272
- }
243
+ /**
244
+ * Returns the list of payment methods for the seller, which can be filtered by method type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
245
+ * @param {FinancesTransfersApiGetPaymentMethodsRequest} requestParameters Request parameters.
246
+ * @param {*} [options] Override http request option.
247
+ * @throws {RequiredError}
248
+ */
249
+ getPaymentMethods(requestParameters, options) {
250
+ return FinancesTransfersApiFp(this.configuration).getPaymentMethods(requestParameters.marketplaceId, requestParameters.paymentMethodTypes, options).then((request) => request(this.axios, this.basePath));
251
+ }
252
+ /**
253
+ * Initiates an on-demand payout to the seller\'s default deposit method in Seller Central for the given `marketplaceId` and `accountType`, if eligible. You can only initiate one on-demand payout for each marketplace and account type within a 24-hour period. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.017 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
254
+ * @param {FinancesTransfersApiInitiatePayoutRequest} requestParameters Request parameters.
255
+ * @param {*} [options] Override http request option.
256
+ * @throws {RequiredError}
257
+ */
258
+ initiatePayout(requestParameters, options) {
259
+ return FinancesTransfersApiFp(this.configuration).initiatePayout(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
260
+ }
273
261
  };
274
- var GetPaymentMethodsPaymentMethodTypesEnum = {
275
- BankAccount: "BANK_ACCOUNT",
276
- Card: "CARD",
277
- SellerWallet: "SELLER_WALLET"
262
+ const GetPaymentMethodsPaymentMethodTypesEnum = {
263
+ BankAccount: "BANK_ACCOUNT",
264
+ Card: "CARD",
265
+ SellerWallet: "SELLER_WALLET"
278
266
  };
279
-
280
- // src/api-model/configuration.ts
267
+ //#endregion
268
+ //#region src/api-model/configuration.ts
281
269
  var Configuration = class {
282
- /**
283
- * parameter for apiKey security
284
- * @param name security name
285
- */
286
- apiKey;
287
- /**
288
- * parameter for basic security
289
- */
290
- username;
291
- /**
292
- * parameter for basic security
293
- */
294
- password;
295
- /**
296
- * parameter for oauth2 security
297
- * @param name security name
298
- * @param scopes oauth2 scope
299
- */
300
- accessToken;
301
- /**
302
- * parameter for aws4 signature security
303
- * @param {Object} AWS4Signature - AWS4 Signature security
304
- * @param {string} options.region - aws region
305
- * @param {string} options.service - name of the service.
306
- * @param {string} credentials.accessKeyId - aws access key id
307
- * @param {string} credentials.secretAccessKey - aws access key
308
- * @param {string} credentials.sessionToken - aws session token
309
- * @memberof Configuration
310
- */
311
- awsv4;
312
- /**
313
- * override base path
314
- */
315
- basePath;
316
- /**
317
- * override server index
318
- */
319
- serverIndex;
320
- /**
321
- * base options for axios calls
322
- */
323
- baseOptions;
324
- /**
325
- * The FormData constructor that will be used to create multipart form data
326
- * requests. You can inject this here so that execution environments that
327
- * do not support the FormData class can still run the generated client.
328
- *
329
- * @type {new () => FormData}
330
- */
331
- formDataCtor;
332
- constructor(param = {}) {
333
- this.apiKey = param.apiKey;
334
- this.username = param.username;
335
- this.password = param.password;
336
- this.accessToken = param.accessToken;
337
- this.awsv4 = param.awsv4;
338
- this.basePath = param.basePath;
339
- this.serverIndex = param.serverIndex;
340
- this.baseOptions = {
341
- ...param.baseOptions,
342
- headers: {
343
- ...param.baseOptions?.headers
344
- }
345
- };
346
- this.formDataCtor = param.formDataCtor;
347
- }
348
- /**
349
- * Check if the given MIME is a JSON MIME.
350
- * JSON MIME examples:
351
- * application/json
352
- * application/json; charset=UTF8
353
- * APPLICATION/JSON
354
- * application/vnd.company+json
355
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
356
- * @return True if the given MIME is JSON, false otherwise.
357
- */
358
- isJsonMime(mime) {
359
- const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
360
- return mime !== null && jsonMime.test(mime);
361
- }
362
- };
363
-
364
- // src/api-model/models/assignment-type.ts
365
- var AssignmentType = {
366
- DefaultDepositMethod: "DEFAULT_DEPOSIT_METHOD"
270
+ /**
271
+ * parameter for apiKey security
272
+ * @param name security name
273
+ */
274
+ apiKey;
275
+ /**
276
+ * parameter for basic security
277
+ */
278
+ username;
279
+ /**
280
+ * parameter for basic security
281
+ */
282
+ password;
283
+ /**
284
+ * parameter for oauth2 security
285
+ * @param name security name
286
+ * @param scopes oauth2 scope
287
+ */
288
+ accessToken;
289
+ /**
290
+ * parameter for aws4 signature security
291
+ * @param {Object} AWS4Signature - AWS4 Signature security
292
+ * @param {string} options.region - aws region
293
+ * @param {string} options.service - name of the service.
294
+ * @param {string} credentials.accessKeyId - aws access key id
295
+ * @param {string} credentials.secretAccessKey - aws access key
296
+ * @param {string} credentials.sessionToken - aws session token
297
+ * @memberof Configuration
298
+ */
299
+ awsv4;
300
+ /**
301
+ * override base path
302
+ */
303
+ basePath;
304
+ /**
305
+ * override server index
306
+ */
307
+ serverIndex;
308
+ /**
309
+ * base options for axios calls
310
+ */
311
+ baseOptions;
312
+ /**
313
+ * The FormData constructor that will be used to create multipart form data
314
+ * requests. You can inject this here so that execution environments that
315
+ * do not support the FormData class can still run the generated client.
316
+ *
317
+ * @type {new () => FormData}
318
+ */
319
+ formDataCtor;
320
+ constructor(param = {}) {
321
+ this.apiKey = param.apiKey;
322
+ this.username = param.username;
323
+ this.password = param.password;
324
+ this.accessToken = param.accessToken;
325
+ this.awsv4 = param.awsv4;
326
+ this.basePath = param.basePath;
327
+ this.serverIndex = param.serverIndex;
328
+ this.baseOptions = {
329
+ ...param.baseOptions,
330
+ headers: { ...param.baseOptions?.headers }
331
+ };
332
+ this.formDataCtor = param.formDataCtor;
333
+ }
334
+ /**
335
+ * Check if the given MIME is a JSON MIME.
336
+ * JSON MIME examples:
337
+ * application/json
338
+ * application/json; charset=UTF8
339
+ * APPLICATION/JSON
340
+ * application/vnd.company+json
341
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
342
+ * @return True if the given MIME is JSON, false otherwise.
343
+ */
344
+ isJsonMime(mime) {
345
+ return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
346
+ }
367
347
  };
368
-
369
- // src/api-model/models/payment-method-type.ts
370
- var PaymentMethodType = {
371
- BankAccount: "BANK_ACCOUNT",
372
- Card: "CARD",
373
- SellerWallet: "SELLER_WALLET"
348
+ //#endregion
349
+ //#region src/api-model/models/assignment-type.ts
350
+ /**
351
+ * The Selling Partner API for Transfers.
352
+ * The Selling Partner API for Transfers enables selling partners to retrieve payment methods and initiate payouts for their seller accounts. This API supports the following marketplaces: DE, FR, IT, ES, SE, NL, PL, and BE.
353
+ *
354
+ * The version of the OpenAPI document: 2024-06-01
355
+ *
356
+ *
357
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
358
+ * https://openapi-generator.tech
359
+ * Do not edit the class manually.
360
+ */
361
+ /**
362
+ * The default payment method type.
363
+ */
364
+ const AssignmentType = { DefaultDepositMethod: "DEFAULT_DEPOSIT_METHOD" };
365
+ //#endregion
366
+ //#region src/api-model/models/payment-method-type.ts
367
+ /**
368
+ * The Selling Partner API for Transfers.
369
+ * The Selling Partner API for Transfers enables selling partners to retrieve payment methods and initiate payouts for their seller accounts. This API supports the following marketplaces: DE, FR, IT, ES, SE, NL, PL, and BE.
370
+ *
371
+ * The version of the OpenAPI document: 2024-06-01
372
+ *
373
+ *
374
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
375
+ * https://openapi-generator.tech
376
+ * Do not edit the class manually.
377
+ */
378
+ /**
379
+ * The type of payment method.
380
+ */
381
+ const PaymentMethodType = {
382
+ BankAccount: "BANK_ACCOUNT",
383
+ Card: "CARD",
384
+ SellerWallet: "SELLER_WALLET"
374
385
  };
375
-
376
- // src/client.ts
377
- var clientRateLimits = [
378
- {
379
- method: "post",
380
- // eslint-disable-next-line prefer-regex-literals
381
- urlRegex: new RegExp("^/finances/transfers/2024-06-01/payouts$"),
382
- rate: 0.017,
383
- burst: 2
384
- },
385
- {
386
- method: "get",
387
- // eslint-disable-next-line prefer-regex-literals
388
- urlRegex: new RegExp("^/finances/transfers/2024-06-01/paymentMethods$"),
389
- rate: 0.5,
390
- burst: 30
391
- }
392
- ];
386
+ //#endregion
387
+ //#region src/client.ts
388
+ const clientRateLimits = [{
389
+ method: "post",
390
+ urlRegex: /^\/finances\/transfers\/2024\u{2D}06\u{2D}01\/payouts$/v,
391
+ rate: .017,
392
+ burst: 2
393
+ }, {
394
+ method: "get",
395
+ urlRegex: /^\/finances\/transfers\/2024\u{2D}06\u{2D}01\/paymentMethods$/v,
396
+ rate: .5,
397
+ burst: 30
398
+ }];
393
399
  var FinancesTransfersApiClient = class extends FinancesTransfersApi {
394
- constructor(configuration) {
395
- const { axios, endpoint } = (0, import_common2.createAxiosInstance)(configuration, clientRateLimits);
396
- super(new Configuration(), endpoint, axios);
397
- }
400
+ constructor(configuration) {
401
+ const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
402
+ super(new Configuration(), endpoint, axios);
403
+ }
398
404
  };
399
- // Annotate the CommonJS export names for ESM import in node:
400
- 0 && (module.exports = {
401
- AssignmentType,
402
- FinancesTransfersApi,
403
- FinancesTransfersApiAxiosParamCreator,
404
- FinancesTransfersApiClient,
405
- FinancesTransfersApiFactory,
406
- FinancesTransfersApiFp,
407
- GetPaymentMethodsPaymentMethodTypesEnum,
408
- PaymentMethodType,
409
- clientRateLimits
410
- });
405
+ //#endregion
406
+ exports.AssignmentType = AssignmentType;
407
+ exports.FinancesTransfersApi = FinancesTransfersApi;
408
+ exports.FinancesTransfersApiAxiosParamCreator = FinancesTransfersApiAxiosParamCreator;
409
+ exports.FinancesTransfersApiClient = FinancesTransfersApiClient;
410
+ exports.FinancesTransfersApiFactory = FinancesTransfersApiFactory;
411
+ exports.FinancesTransfersApiFp = FinancesTransfersApiFp;
412
+ exports.GetPaymentMethodsPaymentMethodTypesEnum = GetPaymentMethodsPaymentMethodTypesEnum;
413
+ exports.PaymentMethodType = PaymentMethodType;
414
+ exports.clientRateLimits = clientRateLimits;
415
+
411
416
  //# sourceMappingURL=index.cjs.map