@sp-api-sdk/finances-transfers-api-2024-06-01 5.0.0 → 5.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/README.md +3 -4
- package/dist/index.cjs +383 -378
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +253 -277
- package/dist/index.d.ts +253 -277
- package/dist/index.js +357 -339
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
package/dist/index.cjs
CHANGED
|
@@ -1,411 +1,416 @@
|
|
|
1
|
-
"
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
49
|
+
field;
|
|
50
|
+
constructor(field, msg) {
|
|
51
|
+
super(msg);
|
|
52
|
+
this.field = field;
|
|
53
|
+
this.name = "RequiredError";
|
|
54
|
+
}
|
|
80
55
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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
|
-
|
|
126
|
-
|
|
92
|
+
const toPathString = function(url) {
|
|
93
|
+
return url.pathname + url.search + url.hash;
|
|
127
94
|
};
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
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 `initiatePayout` 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
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
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 `initiatePayout` 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
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
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
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
262
|
+
const GetPaymentMethodsPaymentMethodTypesEnum = {
|
|
263
|
+
BankAccount: "BANK_ACCOUNT",
|
|
264
|
+
Card: "CARD",
|
|
265
|
+
SellerWallet: "SELLER_WALLET"
|
|
278
266
|
};
|
|
279
|
-
|
|
280
|
-
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region src/api-model/configuration.ts
|
|
281
269
|
var Configuration = class {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
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
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
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
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
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
|
-
|
|
395
|
-
|
|
396
|
-
|
|
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
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
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
|