@sp-api-sdk/finances-transfers-api-2024-06-01 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +97 -0
- package/dist/cjs/api-model/api/default-api.js +197 -0
- package/dist/cjs/api-model/api.js +30 -0
- package/dist/cjs/api-model/base.js +71 -0
- package/dist/cjs/api-model/common.js +145 -0
- package/dist/cjs/api-model/configuration.js +99 -0
- package/dist/cjs/api-model/index.js +32 -0
- package/dist/cjs/api-model/models/assignment-type.js +24 -0
- package/dist/cjs/api-model/models/error-list.js +15 -0
- package/dist/cjs/api-model/models/expiry-date.js +15 -0
- package/dist/cjs/api-model/models/get-payment-methods-response.js +15 -0
- package/dist/cjs/api-model/models/index.js +25 -0
- package/dist/cjs/api-model/models/initiate-payout-request.js +15 -0
- package/dist/cjs/api-model/models/initiate-payout-response.js +15 -0
- package/dist/cjs/api-model/models/model-error.js +15 -0
- package/dist/cjs/api-model/models/payment-method-details.js +15 -0
- package/dist/cjs/api-model/models/payment-method-type.js +26 -0
- package/dist/cjs/client.js +28 -0
- package/dist/cjs/index.js +19 -0
- package/dist/es/api-model/api/default-api.js +187 -0
- package/dist/es/api-model/api.js +14 -0
- package/dist/es/api-model/base.js +63 -0
- package/dist/es/api-model/common.js +133 -0
- package/dist/es/api-model/configuration.js +95 -0
- package/dist/es/api-model/index.js +16 -0
- package/dist/es/api-model/models/assignment-type.js +21 -0
- package/dist/es/api-model/models/error-list.js +14 -0
- package/dist/es/api-model/models/expiry-date.js +14 -0
- package/dist/es/api-model/models/get-payment-methods-response.js +14 -0
- package/dist/es/api-model/models/index.js +9 -0
- package/dist/es/api-model/models/initiate-payout-request.js +14 -0
- package/dist/es/api-model/models/initiate-payout-response.js +14 -0
- package/dist/es/api-model/models/model-error.js +14 -0
- package/dist/es/api-model/models/payment-method-details.js +14 -0
- package/dist/es/api-model/models/payment-method-type.js +23 -0
- package/dist/es/client.js +24 -0
- package/dist/es/index.js +3 -0
- package/dist/types/api-model/api/default-api.d.ts +145 -0
- package/dist/types/api-model/api.d.ts +12 -0
- package/dist/types/api-model/base.d.ts +66 -0
- package/dist/types/api-model/common.d.ts +65 -0
- package/dist/types/api-model/configuration.d.ts +91 -0
- package/dist/types/api-model/index.d.ts +14 -0
- package/dist/types/api-model/models/assignment-type.d.ts +20 -0
- package/dist/types/api-model/models/error-list.d.ts +24 -0
- package/dist/types/api-model/models/expiry-date.d.ts +30 -0
- package/dist/types/api-model/models/get-payment-methods-response.d.ts +25 -0
- package/dist/types/api-model/models/index.d.ts +9 -0
- package/dist/types/api-model/models/initiate-payout-request.d.ts +30 -0
- package/dist/types/api-model/models/initiate-payout-response.d.ts +24 -0
- package/dist/types/api-model/models/model-error.d.ts +36 -0
- package/dist/types/api-model/models/payment-method-details.d.ts +63 -0
- package/dist/types/api-model/models/payment-method-type.d.ts +22 -0
- package/dist/types/client.d.ts +6 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +44 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Transfers.
|
|
6
|
+
* 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.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2024-06-01
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
27
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
__exportStar(require("./api"), exports);
|
|
31
|
+
__exportStar(require("./configuration"), exports);
|
|
32
|
+
__exportStar(require("./models"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Transfers.
|
|
6
|
+
* 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.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2024-06-01
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.AssignmentType = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* The default payment method type.
|
|
19
|
+
* @export
|
|
20
|
+
* @enum {string}
|
|
21
|
+
*/
|
|
22
|
+
exports.AssignmentType = {
|
|
23
|
+
DefaultDepositMethod: 'DEFAULT_DEPOSIT_METHOD'
|
|
24
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Transfers.
|
|
6
|
+
* 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.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2024-06-01
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Transfers.
|
|
6
|
+
* 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.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2024-06-01
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Transfers.
|
|
6
|
+
* 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.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2024-06-01
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./assignment-type"), exports);
|
|
18
|
+
__exportStar(require("./error-list"), exports);
|
|
19
|
+
__exportStar(require("./expiry-date"), exports);
|
|
20
|
+
__exportStar(require("./get-payment-methods-response"), exports);
|
|
21
|
+
__exportStar(require("./initiate-payout-request"), exports);
|
|
22
|
+
__exportStar(require("./initiate-payout-response"), exports);
|
|
23
|
+
__exportStar(require("./model-error"), exports);
|
|
24
|
+
__exportStar(require("./payment-method-details"), exports);
|
|
25
|
+
__exportStar(require("./payment-method-type"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Transfers.
|
|
6
|
+
* 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.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2024-06-01
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Transfers.
|
|
6
|
+
* 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.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2024-06-01
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Transfers.
|
|
6
|
+
* 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.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2024-06-01
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Transfers.
|
|
6
|
+
* 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.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2024-06-01
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Transfers.
|
|
6
|
+
* 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.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2024-06-01
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PaymentMethodType = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* The type of payment method.
|
|
19
|
+
* @export
|
|
20
|
+
* @enum {string}
|
|
21
|
+
*/
|
|
22
|
+
exports.PaymentMethodType = {
|
|
23
|
+
BankAccount: 'BANK_ACCOUNT',
|
|
24
|
+
Card: 'CARD',
|
|
25
|
+
SellerWallet: 'SELLER_WALLET'
|
|
26
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FinancesTransfersApiClient = exports.clientRateLimits = void 0;
|
|
4
|
+
const common_1 = require("@sp-api-sdk/common");
|
|
5
|
+
const api_model_1 = require("./api-model");
|
|
6
|
+
exports.clientRateLimits = [
|
|
7
|
+
{
|
|
8
|
+
method: 'post',
|
|
9
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
10
|
+
urlRegex: new RegExp('^/finances/transfers/2024-06-01/payouts$'),
|
|
11
|
+
rate: 0.017,
|
|
12
|
+
burst: 2,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
method: 'get',
|
|
16
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
17
|
+
urlRegex: new RegExp('^/finances/transfers/2024-06-01/paymentMethods$'),
|
|
18
|
+
rate: 0.5,
|
|
19
|
+
burst: 30,
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
class FinancesTransfersApiClient extends api_model_1.DefaultApi {
|
|
23
|
+
constructor(configuration) {
|
|
24
|
+
const { axios, endpoint } = (0, common_1.createAxiosInstance)(configuration, exports.clientRateLimits);
|
|
25
|
+
super(new api_model_1.Configuration(), endpoint, axios);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.FinancesTransfersApiClient = FinancesTransfersApiClient;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client"), exports);
|
|
18
|
+
__exportStar(require("./api-model/api"), exports);
|
|
19
|
+
__exportStar(require("./api-model/models"), exports);
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Transfers.
|
|
5
|
+
* 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.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024-06-01
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import globalAxios from 'axios';
|
|
15
|
+
// Some imports not used depending on template conditions
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from '../base';
|
|
20
|
+
/**
|
|
21
|
+
* DefaultApi - axios parameter creator
|
|
22
|
+
* @export
|
|
23
|
+
*/
|
|
24
|
+
export const DefaultApiAxiosParamCreator = function (configuration) {
|
|
25
|
+
return {
|
|
26
|
+
/**
|
|
27
|
+
* 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).
|
|
28
|
+
* @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).
|
|
29
|
+
* @param {Set<GetPaymentMethodsPaymentMethodTypesEnum>} [paymentMethodTypes] A comma-separated list of the payment method types you want to include in the response.
|
|
30
|
+
* @param {*} [options] Override http request option.
|
|
31
|
+
* @throws {RequiredError}
|
|
32
|
+
*/
|
|
33
|
+
getPaymentMethods: async (marketplaceId, paymentMethodTypes, options = {}) => {
|
|
34
|
+
// verify required parameter 'marketplaceId' is not null or undefined
|
|
35
|
+
assertParamExists('getPaymentMethods', 'marketplaceId', marketplaceId);
|
|
36
|
+
const localVarPath = `/finances/transfers/2024-06-01/paymentMethods`;
|
|
37
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
38
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
39
|
+
let baseOptions;
|
|
40
|
+
if (configuration) {
|
|
41
|
+
baseOptions = configuration.baseOptions;
|
|
42
|
+
}
|
|
43
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
44
|
+
const localVarHeaderParameter = {};
|
|
45
|
+
const localVarQueryParameter = {};
|
|
46
|
+
if (marketplaceId !== undefined) {
|
|
47
|
+
localVarQueryParameter['marketplaceId'] = marketplaceId;
|
|
48
|
+
}
|
|
49
|
+
if (paymentMethodTypes) {
|
|
50
|
+
localVarQueryParameter['paymentMethodTypes'] = Array.from(paymentMethodTypes).join(COLLECTION_FORMATS.csv);
|
|
51
|
+
}
|
|
52
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
53
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
54
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
55
|
+
return {
|
|
56
|
+
url: toPathString(localVarUrlObj),
|
|
57
|
+
options: localVarRequestOptions,
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* 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).
|
|
62
|
+
* @param {InitiatePayoutRequest} body The request body for the `initiatePayout` operation.
|
|
63
|
+
* @param {*} [options] Override http request option.
|
|
64
|
+
* @throws {RequiredError}
|
|
65
|
+
*/
|
|
66
|
+
initiatePayout: async (body, options = {}) => {
|
|
67
|
+
// verify required parameter 'body' is not null or undefined
|
|
68
|
+
assertParamExists('initiatePayout', 'body', body);
|
|
69
|
+
const localVarPath = `/finances/transfers/2024-06-01/payouts`;
|
|
70
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
71
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
72
|
+
let baseOptions;
|
|
73
|
+
if (configuration) {
|
|
74
|
+
baseOptions = configuration.baseOptions;
|
|
75
|
+
}
|
|
76
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
77
|
+
const localVarHeaderParameter = {};
|
|
78
|
+
const localVarQueryParameter = {};
|
|
79
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
80
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
81
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
82
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
83
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
84
|
+
return {
|
|
85
|
+
url: toPathString(localVarUrlObj),
|
|
86
|
+
options: localVarRequestOptions,
|
|
87
|
+
};
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* DefaultApi - functional programming interface
|
|
93
|
+
* @export
|
|
94
|
+
*/
|
|
95
|
+
export const DefaultApiFp = function (configuration) {
|
|
96
|
+
const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration);
|
|
97
|
+
return {
|
|
98
|
+
/**
|
|
99
|
+
* 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).
|
|
100
|
+
* @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).
|
|
101
|
+
* @param {Set<GetPaymentMethodsPaymentMethodTypesEnum>} [paymentMethodTypes] A comma-separated list of the payment method types you want to include in the response.
|
|
102
|
+
* @param {*} [options] Override http request option.
|
|
103
|
+
* @throws {RequiredError}
|
|
104
|
+
*/
|
|
105
|
+
async getPaymentMethods(marketplaceId, paymentMethodTypes, options) {
|
|
106
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPaymentMethods(marketplaceId, paymentMethodTypes, options);
|
|
107
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
108
|
+
const localVarOperationServerBasePath = operationServerMap['DefaultApi.getPaymentMethods']?.[localVarOperationServerIndex]?.url;
|
|
109
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
110
|
+
},
|
|
111
|
+
/**
|
|
112
|
+
* 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).
|
|
113
|
+
* @param {InitiatePayoutRequest} body The request body for the `initiatePayout` operation.
|
|
114
|
+
* @param {*} [options] Override http request option.
|
|
115
|
+
* @throws {RequiredError}
|
|
116
|
+
*/
|
|
117
|
+
async initiatePayout(body, options) {
|
|
118
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.initiatePayout(body, options);
|
|
119
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
120
|
+
const localVarOperationServerBasePath = operationServerMap['DefaultApi.initiatePayout']?.[localVarOperationServerIndex]?.url;
|
|
121
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* DefaultApi - factory interface
|
|
127
|
+
* @export
|
|
128
|
+
*/
|
|
129
|
+
export const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
130
|
+
const localVarFp = DefaultApiFp(configuration);
|
|
131
|
+
return {
|
|
132
|
+
/**
|
|
133
|
+
* 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).
|
|
134
|
+
* @param {DefaultApiGetPaymentMethodsRequest} requestParameters Request parameters.
|
|
135
|
+
* @param {*} [options] Override http request option.
|
|
136
|
+
* @throws {RequiredError}
|
|
137
|
+
*/
|
|
138
|
+
getPaymentMethods(requestParameters, options) {
|
|
139
|
+
return localVarFp.getPaymentMethods(requestParameters.marketplaceId, requestParameters.paymentMethodTypes, options).then((request) => request(axios, basePath));
|
|
140
|
+
},
|
|
141
|
+
/**
|
|
142
|
+
* 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).
|
|
143
|
+
* @param {DefaultApiInitiatePayoutRequest} requestParameters Request parameters.
|
|
144
|
+
* @param {*} [options] Override http request option.
|
|
145
|
+
* @throws {RequiredError}
|
|
146
|
+
*/
|
|
147
|
+
initiatePayout(requestParameters, options) {
|
|
148
|
+
return localVarFp.initiatePayout(requestParameters.body, options).then((request) => request(axios, basePath));
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* DefaultApi - object-oriented interface
|
|
154
|
+
* @export
|
|
155
|
+
* @class DefaultApi
|
|
156
|
+
* @extends {BaseAPI}
|
|
157
|
+
*/
|
|
158
|
+
export class DefaultApi extends BaseAPI {
|
|
159
|
+
/**
|
|
160
|
+
* 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).
|
|
161
|
+
* @param {DefaultApiGetPaymentMethodsRequest} requestParameters Request parameters.
|
|
162
|
+
* @param {*} [options] Override http request option.
|
|
163
|
+
* @throws {RequiredError}
|
|
164
|
+
* @memberof DefaultApi
|
|
165
|
+
*/
|
|
166
|
+
getPaymentMethods(requestParameters, options) {
|
|
167
|
+
return DefaultApiFp(this.configuration).getPaymentMethods(requestParameters.marketplaceId, requestParameters.paymentMethodTypes, options).then((request) => request(this.axios, this.basePath));
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* 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).
|
|
171
|
+
* @param {DefaultApiInitiatePayoutRequest} requestParameters Request parameters.
|
|
172
|
+
* @param {*} [options] Override http request option.
|
|
173
|
+
* @throws {RequiredError}
|
|
174
|
+
* @memberof DefaultApi
|
|
175
|
+
*/
|
|
176
|
+
initiatePayout(requestParameters, options) {
|
|
177
|
+
return DefaultApiFp(this.configuration).initiatePayout(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* @export
|
|
182
|
+
*/
|
|
183
|
+
export const GetPaymentMethodsPaymentMethodTypesEnum = {
|
|
184
|
+
BankAccount: 'BANK_ACCOUNT',
|
|
185
|
+
Card: 'CARD',
|
|
186
|
+
SellerWallet: 'SELLER_WALLET'
|
|
187
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Transfers.
|
|
5
|
+
* 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.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024-06-01
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export * from './api/default-api';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Transfers.
|
|
5
|
+
* 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.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024-06-01
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import globalAxios from 'axios';
|
|
15
|
+
export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const COLLECTION_FORMATS = {
|
|
21
|
+
csv: ",",
|
|
22
|
+
ssv: " ",
|
|
23
|
+
tsv: "\t",
|
|
24
|
+
pipes: "|",
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
* @class BaseAPI
|
|
30
|
+
*/
|
|
31
|
+
export class BaseAPI {
|
|
32
|
+
basePath;
|
|
33
|
+
axios;
|
|
34
|
+
configuration;
|
|
35
|
+
constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
|
|
36
|
+
this.basePath = basePath;
|
|
37
|
+
this.axios = axios;
|
|
38
|
+
if (configuration) {
|
|
39
|
+
this.configuration = configuration;
|
|
40
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @class RequiredError
|
|
49
|
+
* @extends {Error}
|
|
50
|
+
*/
|
|
51
|
+
export class RequiredError extends Error {
|
|
52
|
+
field;
|
|
53
|
+
constructor(field, msg) {
|
|
54
|
+
super(msg);
|
|
55
|
+
this.field = field;
|
|
56
|
+
this.name = "RequiredError";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @export
|
|
62
|
+
*/
|
|
63
|
+
export const operationServerMap = {};
|