@sp-api-sdk/finances-api-v0 4.2.8 → 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 +8 -9
- package/dist/index.cjs +520 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1747 -0
- package/dist/index.d.ts +1747 -0
- package/dist/index.js +491 -0
- package/dist/index.js.map +1 -0
- package/package.json +26 -12
- package/dist/cjs/api-model/api/finances-api.js +0 -365
- package/dist/cjs/api-model/api.js +0 -30
- package/dist/cjs/api-model/base.js +0 -52
- package/dist/cjs/api-model/common.js +0 -123
- package/dist/cjs/api-model/configuration.js +0 -98
- package/dist/cjs/api-model/index.js +0 -32
- package/dist/cjs/api-model/models/adhoc-disbursement-event.js +0 -15
- package/dist/cjs/api-model/models/adjustment-event.js +0 -15
- package/dist/cjs/api-model/models/adjustment-item.js +0 -15
- package/dist/cjs/api-model/models/affordability-expense-event.js +0 -15
- package/dist/cjs/api-model/models/capacity-reservation-billing-event.js +0 -15
- package/dist/cjs/api-model/models/charge-component.js +0 -15
- package/dist/cjs/api-model/models/charge-instrument.js +0 -15
- package/dist/cjs/api-model/models/charge-refund-event.js +0 -15
- package/dist/cjs/api-model/models/charge-refund-transaction.js +0 -15
- package/dist/cjs/api-model/models/coupon-payment-event.js +0 -15
- package/dist/cjs/api-model/models/currency.js +0 -15
- package/dist/cjs/api-model/models/debt-recovery-event.js +0 -15
- package/dist/cjs/api-model/models/debt-recovery-item.js +0 -15
- package/dist/cjs/api-model/models/direct-payment.js +0 -15
- package/dist/cjs/api-model/models/ebtrefund-reimbursement-only-event.js +0 -15
- package/dist/cjs/api-model/models/failed-adhoc-disbursement-event.js +0 -15
- package/dist/cjs/api-model/models/fbaliquidation-event.js +0 -15
- package/dist/cjs/api-model/models/fee-component.js +0 -15
- package/dist/cjs/api-model/models/financial-event-group.js +0 -15
- package/dist/cjs/api-model/models/financial-events.js +0 -15
- package/dist/cjs/api-model/models/imaging-services-fee-event.js +0 -15
- package/dist/cjs/api-model/models/index.js +0 -67
- package/dist/cjs/api-model/models/list-financial-event-groups-payload.js +0 -15
- package/dist/cjs/api-model/models/list-financial-event-groups-response.js +0 -15
- package/dist/cjs/api-model/models/list-financial-events-payload.js +0 -15
- package/dist/cjs/api-model/models/list-financial-events-response.js +0 -15
- package/dist/cjs/api-model/models/loan-servicing-event.js +0 -15
- package/dist/cjs/api-model/models/model-error.js +0 -15
- package/dist/cjs/api-model/models/network-commingling-transaction-event.js +0 -15
- package/dist/cjs/api-model/models/pay-with-amazon-event.js +0 -15
- package/dist/cjs/api-model/models/product-ads-payment-event.js +0 -15
- package/dist/cjs/api-model/models/promotion.js +0 -15
- package/dist/cjs/api-model/models/removal-shipment-adjustment-event.js +0 -15
- package/dist/cjs/api-model/models/removal-shipment-event.js +0 -15
- package/dist/cjs/api-model/models/removal-shipment-item-adjustment.js +0 -15
- package/dist/cjs/api-model/models/removal-shipment-item.js +0 -15
- package/dist/cjs/api-model/models/rental-transaction-event.js +0 -15
- package/dist/cjs/api-model/models/retrocharge-event.js +0 -15
- package/dist/cjs/api-model/models/safetreimbursement-event.js +0 -15
- package/dist/cjs/api-model/models/safetreimbursement-item.js +0 -15
- package/dist/cjs/api-model/models/seller-deal-payment-event.js +0 -15
- package/dist/cjs/api-model/models/seller-review-enrollment-payment-event.js +0 -15
- package/dist/cjs/api-model/models/service-fee-event.js +0 -15
- package/dist/cjs/api-model/models/shipment-event.js +0 -15
- package/dist/cjs/api-model/models/shipment-item.js +0 -15
- package/dist/cjs/api-model/models/solution-provider-credit-event.js +0 -15
- package/dist/cjs/api-model/models/tax-withheld-component.js +0 -15
- package/dist/cjs/api-model/models/tax-withholding-event.js +0 -15
- package/dist/cjs/api-model/models/tax-withholding-period.js +0 -15
- package/dist/cjs/api-model/models/tdsreimbursement-event.js +0 -15
- package/dist/cjs/api-model/models/trial-shipment-event.js +0 -15
- package/dist/cjs/api-model/models/value-added-service-charge-event.js +0 -15
- package/dist/cjs/client.js +0 -42
- package/dist/cjs/index.js +0 -18
- package/dist/es/api-model/api/finances-api.js +0 -355
- package/dist/es/api-model/api.js +0 -14
- package/dist/es/api-model/base.js +0 -44
- package/dist/es/api-model/common.js +0 -110
- package/dist/es/api-model/configuration.js +0 -94
- package/dist/es/api-model/index.js +0 -16
- package/dist/es/api-model/models/adhoc-disbursement-event.js +0 -14
- package/dist/es/api-model/models/adjustment-event.js +0 -14
- package/dist/es/api-model/models/adjustment-item.js +0 -14
- package/dist/es/api-model/models/affordability-expense-event.js +0 -14
- package/dist/es/api-model/models/capacity-reservation-billing-event.js +0 -14
- package/dist/es/api-model/models/charge-component.js +0 -14
- package/dist/es/api-model/models/charge-instrument.js +0 -14
- package/dist/es/api-model/models/charge-refund-event.js +0 -14
- package/dist/es/api-model/models/charge-refund-transaction.js +0 -14
- package/dist/es/api-model/models/coupon-payment-event.js +0 -14
- package/dist/es/api-model/models/currency.js +0 -14
- package/dist/es/api-model/models/debt-recovery-event.js +0 -14
- package/dist/es/api-model/models/debt-recovery-item.js +0 -14
- package/dist/es/api-model/models/direct-payment.js +0 -14
- package/dist/es/api-model/models/ebtrefund-reimbursement-only-event.js +0 -14
- package/dist/es/api-model/models/failed-adhoc-disbursement-event.js +0 -14
- package/dist/es/api-model/models/fbaliquidation-event.js +0 -14
- package/dist/es/api-model/models/fee-component.js +0 -14
- package/dist/es/api-model/models/financial-event-group.js +0 -14
- package/dist/es/api-model/models/financial-events.js +0 -14
- package/dist/es/api-model/models/imaging-services-fee-event.js +0 -14
- package/dist/es/api-model/models/index.js +0 -51
- package/dist/es/api-model/models/list-financial-event-groups-payload.js +0 -14
- package/dist/es/api-model/models/list-financial-event-groups-response.js +0 -14
- package/dist/es/api-model/models/list-financial-events-payload.js +0 -14
- package/dist/es/api-model/models/list-financial-events-response.js +0 -14
- package/dist/es/api-model/models/loan-servicing-event.js +0 -14
- package/dist/es/api-model/models/model-error.js +0 -14
- package/dist/es/api-model/models/network-commingling-transaction-event.js +0 -14
- package/dist/es/api-model/models/pay-with-amazon-event.js +0 -14
- package/dist/es/api-model/models/product-ads-payment-event.js +0 -14
- package/dist/es/api-model/models/promotion.js +0 -14
- package/dist/es/api-model/models/removal-shipment-adjustment-event.js +0 -14
- package/dist/es/api-model/models/removal-shipment-event.js +0 -14
- package/dist/es/api-model/models/removal-shipment-item-adjustment.js +0 -14
- package/dist/es/api-model/models/removal-shipment-item.js +0 -14
- package/dist/es/api-model/models/rental-transaction-event.js +0 -14
- package/dist/es/api-model/models/retrocharge-event.js +0 -14
- package/dist/es/api-model/models/safetreimbursement-event.js +0 -14
- package/dist/es/api-model/models/safetreimbursement-item.js +0 -14
- package/dist/es/api-model/models/seller-deal-payment-event.js +0 -14
- package/dist/es/api-model/models/seller-review-enrollment-payment-event.js +0 -14
- package/dist/es/api-model/models/service-fee-event.js +0 -14
- package/dist/es/api-model/models/shipment-event.js +0 -14
- package/dist/es/api-model/models/shipment-item.js +0 -14
- package/dist/es/api-model/models/solution-provider-credit-event.js +0 -14
- package/dist/es/api-model/models/tax-withheld-component.js +0 -14
- package/dist/es/api-model/models/tax-withholding-event.js +0 -14
- package/dist/es/api-model/models/tax-withholding-period.js +0 -14
- package/dist/es/api-model/models/tdsreimbursement-event.js +0 -14
- package/dist/es/api-model/models/trial-shipment-event.js +0 -14
- package/dist/es/api-model/models/value-added-service-charge-event.js +0 -14
- package/dist/es/client.js +0 -38
- package/dist/es/index.js +0 -2
- package/dist/types/api-model/api/finances-api.d.ts +0 -257
- package/dist/types/api-model/api.d.ts +0 -12
- package/dist/types/api-model/base.d.ts +0 -42
- package/dist/types/api-model/common.d.ts +0 -34
- package/dist/types/api-model/configuration.d.ts +0 -98
- package/dist/types/api-model/index.d.ts +0 -14
- package/dist/types/api-model/models/adhoc-disbursement-event.d.ts +0 -30
- package/dist/types/api-model/models/adjustment-event.d.ts +0 -35
- package/dist/types/api-model/models/adjustment-item.d.ts +0 -43
- package/dist/types/api-model/models/affordability-expense-event.d.ts +0 -38
- package/dist/types/api-model/models/capacity-reservation-billing-event.d.ts +0 -30
- package/dist/types/api-model/models/charge-component.d.ts +0 -22
- package/dist/types/api-model/models/charge-instrument.d.ts +0 -26
- package/dist/types/api-model/models/charge-refund-event.d.ts +0 -33
- package/dist/types/api-model/models/charge-refund-transaction.d.ts +0 -22
- package/dist/types/api-model/models/coupon-payment-event.d.ts +0 -42
- package/dist/types/api-model/models/currency.d.ts +0 -24
- package/dist/types/api-model/models/debt-recovery-event.d.ts +0 -33
- package/dist/types/api-model/models/debt-recovery-item.d.ts +0 -27
- package/dist/types/api-model/models/direct-payment.d.ts +0 -22
- package/dist/types/api-model/models/ebtrefund-reimbursement-only-event.d.ts +0 -26
- package/dist/types/api-model/models/failed-adhoc-disbursement-event.d.ts +0 -42
- package/dist/types/api-model/models/fbaliquidation-event.d.ts +0 -27
- package/dist/types/api-model/models/fee-component.d.ts +0 -22
- package/dist/types/api-model/models/financial-event-group.d.ts +0 -52
- package/dist/types/api-model/models/financial-events.d.ts +0 -181
- package/dist/types/api-model/models/imaging-services-fee-event.d.ts +0 -33
- package/dist/types/api-model/models/index.d.ts +0 -51
- package/dist/types/api-model/models/list-financial-event-groups-payload.d.ts +0 -25
- package/dist/types/api-model/models/list-financial-event-groups-response.d.ts +0 -22
- package/dist/types/api-model/models/list-financial-events-payload.d.ts +0 -22
- package/dist/types/api-model/models/list-financial-events-response.d.ts +0 -22
- package/dist/types/api-model/models/loan-servicing-event.d.ts +0 -22
- package/dist/types/api-model/models/model-error.d.ts +0 -28
- package/dist/types/api-model/models/network-commingling-transaction-event.d.ts +0 -43
- package/dist/types/api-model/models/pay-with-amazon-event.d.ts +0 -55
- package/dist/types/api-model/models/product-ads-payment-event.d.ts +0 -32
- package/dist/types/api-model/models/promotion.d.ts +0 -26
- package/dist/types/api-model/models/removal-shipment-adjustment-event.d.ts +0 -41
- package/dist/types/api-model/models/removal-shipment-event.d.ts +0 -41
- package/dist/types/api-model/models/removal-shipment-item-adjustment.d.ts +0 -36
- package/dist/types/api-model/models/removal-shipment-item.d.ts +0 -37
- package/dist/types/api-model/models/rental-transaction-event.d.ts +0 -54
- package/dist/types/api-model/models/retrocharge-event.d.ts +0 -40
- package/dist/types/api-model/models/safetreimbursement-event.d.ts +0 -35
- package/dist/types/api-model/models/safetreimbursement-item.d.ts +0 -29
- package/dist/types/api-model/models/seller-deal-payment-event.d.ts +0 -40
- package/dist/types/api-model/models/seller-review-enrollment-payment-event.d.ts +0 -34
- package/dist/types/api-model/models/service-fee-event.d.ts +0 -49
- package/dist/types/api-model/models/shipment-event.d.ts +0 -76
- package/dist/types/api-model/models/shipment-item.d.ts +0 -67
- package/dist/types/api-model/models/solution-provider-credit-event.d.ts +0 -54
- package/dist/types/api-model/models/tax-withheld-component.d.ts +0 -25
- package/dist/types/api-model/models/tax-withholding-event.d.ts +0 -25
- package/dist/types/api-model/models/tax-withholding-period.d.ts +0 -24
- package/dist/types/api-model/models/tdsreimbursement-event.d.ts +0 -26
- package/dist/types/api-model/models/trial-shipment-event.d.ts +0 -37
- package/dist/types/api-model/models/value-added-service-charge-event.d.ts +0 -30
- package/dist/types/client.d.ts +0 -6
- package/dist/types/index.d.ts +0 -3
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@sp-api-sdk/finances-api-v0`
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@sp-api-sdk/finances-api-v0)
|
|
4
4
|
[](https://github.com/xojs/xo)
|
|
5
5
|
|
|
6
|
-
The Selling Partner API for Finances provides financial information that is relevant to a seller's business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range.
|
|
6
|
+
The Selling Partner API for Finances provides financial information that is relevant to a seller's business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range.
|
|
7
7
|
|
|
8
8
|
[<img src="https://files.bizon.solutions/images/logo/bizon-horizontal.png" alt="Bizon" width="250"/>](https://www.bizon.solutions?utm_source=github&utm_medium=readme&utm_campaign=selling-partner-api-sdk)
|
|
9
9
|
|
|
@@ -25,10 +25,10 @@ npm install @sp-api-sdk/finances-api-v0
|
|
|
25
25
|
import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
|
|
26
26
|
import {FinancesApiClient} from '@sp-api-sdk/finances-api-v0'
|
|
27
27
|
|
|
28
|
+
// `clientId` and `clientSecret` default to the `LWA_CLIENT_ID` and
|
|
29
|
+
// `LWA_CLIENT_SECRET` environment variables.
|
|
28
30
|
const auth = new SellingPartnerApiAuth({
|
|
29
|
-
|
|
30
|
-
clientSecret: process.env.LWA_CLIENT_SECRET,
|
|
31
|
-
refreshToken: 'Atzr|…',
|
|
31
|
+
refreshToken: await getRefreshTokenForSeller(sellerId),
|
|
32
32
|
})
|
|
33
33
|
|
|
34
34
|
const client = new FinancesApiClient({
|
|
@@ -67,10 +67,10 @@ const client = new FinancesApiClient({
|
|
|
67
67
|
region: 'eu',
|
|
68
68
|
logging: {
|
|
69
69
|
request: {
|
|
70
|
-
logger: console.debug
|
|
70
|
+
logger: console.debug,
|
|
71
71
|
},
|
|
72
72
|
response: {
|
|
73
|
-
logger: console.debug
|
|
73
|
+
logger: console.debug,
|
|
74
74
|
},
|
|
75
75
|
error: true,
|
|
76
76
|
},
|
|
@@ -81,14 +81,13 @@ Specifying `true` will use the default options, specifying an object will allow
|
|
|
81
81
|
This uses [axios-logger](https://github.com/hg-pyun/axios-logger) under the hood.
|
|
82
82
|
By default, if enabled, the `request` and `response` loggers will use `console.info` and the `error` logger will use `console.error`.
|
|
83
83
|
|
|
84
|
-
|
|
85
84
|
## License
|
|
86
85
|
|
|
87
86
|
MIT
|
|
88
87
|
|
|
89
88
|
## Miscellaneous
|
|
90
89
|
|
|
91
|
-
```
|
|
90
|
+
```text
|
|
92
91
|
╚⊙ ⊙╝
|
|
93
92
|
╚═(███)═╝
|
|
94
93
|
╚═(███)═╝
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,520 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
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;
|
|
18
|
+
};
|
|
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
|
+
var BaseAPI = class {
|
|
30
|
+
basePath;
|
|
31
|
+
axios;
|
|
32
|
+
configuration;
|
|
33
|
+
constructor(configuration, basePath = BASE_PATH, axios$6 = axios.default) {
|
|
34
|
+
this.basePath = basePath;
|
|
35
|
+
this.axios = axios$6;
|
|
36
|
+
if (configuration) {
|
|
37
|
+
this.configuration = configuration;
|
|
38
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var RequiredError = class extends Error {
|
|
43
|
+
field;
|
|
44
|
+
constructor(field, msg) {
|
|
45
|
+
super(msg);
|
|
46
|
+
this.field = field;
|
|
47
|
+
this.name = "RequiredError";
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const operationServerMap = {};
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/api-model/common.ts
|
|
53
|
+
const DUMMY_BASE_URL = "https://example.com";
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @throws {RequiredError}
|
|
57
|
+
*/
|
|
58
|
+
const assertParamExists = function(functionName, paramName, paramValue) {
|
|
59
|
+
if (paramValue === null || paramValue === void 0) throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
60
|
+
};
|
|
61
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
62
|
+
if (parameter == null) return;
|
|
63
|
+
if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
64
|
+
else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`));
|
|
65
|
+
else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter);
|
|
66
|
+
else urlSearchParams.set(key, parameter);
|
|
67
|
+
}
|
|
68
|
+
const setSearchParams = function(url, ...objects) {
|
|
69
|
+
const searchParams = new URLSearchParams(url.search);
|
|
70
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
71
|
+
url.search = searchParams.toString();
|
|
72
|
+
};
|
|
73
|
+
const toPathString = function(url) {
|
|
74
|
+
return url.pathname + url.search + url.hash;
|
|
75
|
+
};
|
|
76
|
+
const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
77
|
+
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
78
|
+
const axiosRequestArgs = {
|
|
79
|
+
...axiosArgs.options,
|
|
80
|
+
url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url
|
|
81
|
+
};
|
|
82
|
+
return axios.request(axiosRequestArgs);
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/api-model/api/finances-api.ts
|
|
87
|
+
/**
|
|
88
|
+
* FinancesApi - axios parameter creator
|
|
89
|
+
*/
|
|
90
|
+
const FinancesApiAxiosParamCreator = function(configuration) {
|
|
91
|
+
return {
|
|
92
|
+
/**
|
|
93
|
+
* Returns financial event groups for a given date range. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
94
|
+
* @param {number} [maxResultsPerPage] The maximum number of results per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
|
|
95
|
+
* @param {string} [financialEventGroupStartedBefore] A date that selects financial event groups that opened before (but not at) a specified date and time, in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be after `FinancialEventGroupStartedAfter` and more than two minutes before the time of request. If `FinancialEventGroupStartedAfter` and `FinancialEventGroupStartedBefore` are more than 180 days apart, no financial event groups are returned.
|
|
96
|
+
* @param {string} [financialEventGroupStartedAfter] A date that selects financial event groups that opened after (or at) a specified date and time, in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be more than two minutes before you submit the request.
|
|
97
|
+
* @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
98
|
+
* @param {*} [options] Override http request option.
|
|
99
|
+
* @throws {RequiredError}
|
|
100
|
+
*/
|
|
101
|
+
listFinancialEventGroups: async (maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options = {}) => {
|
|
102
|
+
const localVarUrlObj = new URL(`/finances/v0/financialEventGroups`, DUMMY_BASE_URL);
|
|
103
|
+
let baseOptions;
|
|
104
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
105
|
+
const localVarRequestOptions = {
|
|
106
|
+
method: "GET",
|
|
107
|
+
...baseOptions,
|
|
108
|
+
...options
|
|
109
|
+
};
|
|
110
|
+
const localVarHeaderParameter = {};
|
|
111
|
+
const localVarQueryParameter = {};
|
|
112
|
+
if (maxResultsPerPage !== void 0) localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
|
|
113
|
+
if (financialEventGroupStartedBefore !== void 0) localVarQueryParameter["FinancialEventGroupStartedBefore"] = financialEventGroupStartedBefore instanceof Date ? financialEventGroupStartedBefore.toISOString() : financialEventGroupStartedBefore;
|
|
114
|
+
if (financialEventGroupStartedAfter !== void 0) localVarQueryParameter["FinancialEventGroupStartedAfter"] = financialEventGroupStartedAfter instanceof Date ? financialEventGroupStartedAfter.toISOString() : financialEventGroupStartedAfter;
|
|
115
|
+
if (nextToken !== void 0) localVarQueryParameter["NextToken"] = nextToken;
|
|
116
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
117
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
118
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
119
|
+
localVarRequestOptions.headers = {
|
|
120
|
+
...localVarHeaderParameter,
|
|
121
|
+
...headersFromBaseOptions,
|
|
122
|
+
...options.headers
|
|
123
|
+
};
|
|
124
|
+
return {
|
|
125
|
+
url: toPathString(localVarUrlObj),
|
|
126
|
+
options: localVarRequestOptions
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
/**
|
|
130
|
+
* Returns financial events for the specified data range. Orders from the last 48 hours might not be included in financial events. **Note:** in `ListFinancialEvents`, deferred events don\'t show up in responses until they are released. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
131
|
+
* @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
|
|
132
|
+
* @param {string} [postedAfter] The response includes financial events posted after (or on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be more than two minutes before the time of the request.
|
|
133
|
+
* @param {string} [postedBefore] The response includes financial events posted before (but not on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be later than `PostedAfter` and more than two minutes before the request was submitted. If `PostedAfter` and `PostedBefore` are more than 180 days apart, the response is empty. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
|
|
134
|
+
* @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
135
|
+
* @param {*} [options] Override http request option.
|
|
136
|
+
* @throws {RequiredError}
|
|
137
|
+
*/
|
|
138
|
+
listFinancialEvents: async (maxResultsPerPage, postedAfter, postedBefore, nextToken, options = {}) => {
|
|
139
|
+
const localVarUrlObj = new URL(`/finances/v0/financialEvents`, DUMMY_BASE_URL);
|
|
140
|
+
let baseOptions;
|
|
141
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
142
|
+
const localVarRequestOptions = {
|
|
143
|
+
method: "GET",
|
|
144
|
+
...baseOptions,
|
|
145
|
+
...options
|
|
146
|
+
};
|
|
147
|
+
const localVarHeaderParameter = {};
|
|
148
|
+
const localVarQueryParameter = {};
|
|
149
|
+
if (maxResultsPerPage !== void 0) localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
|
|
150
|
+
if (postedAfter !== void 0) localVarQueryParameter["PostedAfter"] = postedAfter instanceof Date ? postedAfter.toISOString() : postedAfter;
|
|
151
|
+
if (postedBefore !== void 0) localVarQueryParameter["PostedBefore"] = postedBefore instanceof Date ? postedBefore.toISOString() : postedBefore;
|
|
152
|
+
if (nextToken !== void 0) localVarQueryParameter["NextToken"] = nextToken;
|
|
153
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
154
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
155
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
156
|
+
localVarRequestOptions.headers = {
|
|
157
|
+
...localVarHeaderParameter,
|
|
158
|
+
...headersFromBaseOptions,
|
|
159
|
+
...options.headers
|
|
160
|
+
};
|
|
161
|
+
return {
|
|
162
|
+
url: toPathString(localVarUrlObj),
|
|
163
|
+
options: localVarRequestOptions
|
|
164
|
+
};
|
|
165
|
+
},
|
|
166
|
+
/**
|
|
167
|
+
* Returns all financial events for the specified financial event group. Orders from the last 48 hours might not be included in financial events. **Note:** This operation only retrieves a group\'s data for the past two years. A request for data spanning more than two years produces an empty response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
168
|
+
* @param {string} eventGroupId The identifier of the financial event group to which the events belong.
|
|
169
|
+
* @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
|
|
170
|
+
* @param {string} [postedAfter] The response includes financial events posted after (or on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be more than two minutes before the time of the request.
|
|
171
|
+
* @param {string} [postedBefore] The response includes financial events posted before (but not on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be later than `PostedAfter` and more than two minutes before the request was submitted. If `PostedAfter` and `PostedBefore` are more than 180 days apart, the response is empty. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
|
|
172
|
+
* @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
173
|
+
* @param {*} [options] Override http request option.
|
|
174
|
+
* @throws {RequiredError}
|
|
175
|
+
*/
|
|
176
|
+
listFinancialEventsByGroupId: async (eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options = {}) => {
|
|
177
|
+
assertParamExists("listFinancialEventsByGroupId", "eventGroupId", eventGroupId);
|
|
178
|
+
const localVarPath = `/finances/v0/financialEventGroups/{eventGroupId}/financialEvents`.replace("{eventGroupId}", encodeURIComponent(String(eventGroupId)));
|
|
179
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
180
|
+
let baseOptions;
|
|
181
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
182
|
+
const localVarRequestOptions = {
|
|
183
|
+
method: "GET",
|
|
184
|
+
...baseOptions,
|
|
185
|
+
...options
|
|
186
|
+
};
|
|
187
|
+
const localVarHeaderParameter = {};
|
|
188
|
+
const localVarQueryParameter = {};
|
|
189
|
+
if (maxResultsPerPage !== void 0) localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
|
|
190
|
+
if (postedAfter !== void 0) localVarQueryParameter["PostedAfter"] = postedAfter instanceof Date ? postedAfter.toISOString() : postedAfter;
|
|
191
|
+
if (postedBefore !== void 0) localVarQueryParameter["PostedBefore"] = postedBefore instanceof Date ? postedBefore.toISOString() : postedBefore;
|
|
192
|
+
if (nextToken !== void 0) localVarQueryParameter["NextToken"] = nextToken;
|
|
193
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
194
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
195
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
196
|
+
localVarRequestOptions.headers = {
|
|
197
|
+
...localVarHeaderParameter,
|
|
198
|
+
...headersFromBaseOptions,
|
|
199
|
+
...options.headers
|
|
200
|
+
};
|
|
201
|
+
return {
|
|
202
|
+
url: toPathString(localVarUrlObj),
|
|
203
|
+
options: localVarRequestOptions
|
|
204
|
+
};
|
|
205
|
+
},
|
|
206
|
+
/**
|
|
207
|
+
* Returns all financial events for the specified order. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
208
|
+
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
|
|
209
|
+
* @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
|
|
210
|
+
* @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
211
|
+
* @param {*} [options] Override http request option.
|
|
212
|
+
* @throws {RequiredError}
|
|
213
|
+
*/
|
|
214
|
+
listFinancialEventsByOrderId: async (orderId, maxResultsPerPage, nextToken, options = {}) => {
|
|
215
|
+
assertParamExists("listFinancialEventsByOrderId", "orderId", orderId);
|
|
216
|
+
const localVarPath = `/finances/v0/orders/{orderId}/financialEvents`.replace("{orderId}", encodeURIComponent(String(orderId)));
|
|
217
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
218
|
+
let baseOptions;
|
|
219
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
220
|
+
const localVarRequestOptions = {
|
|
221
|
+
method: "GET",
|
|
222
|
+
...baseOptions,
|
|
223
|
+
...options
|
|
224
|
+
};
|
|
225
|
+
const localVarHeaderParameter = {};
|
|
226
|
+
const localVarQueryParameter = {};
|
|
227
|
+
if (maxResultsPerPage !== void 0) localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
|
|
228
|
+
if (nextToken !== void 0) localVarQueryParameter["NextToken"] = nextToken;
|
|
229
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
230
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
231
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
232
|
+
localVarRequestOptions.headers = {
|
|
233
|
+
...localVarHeaderParameter,
|
|
234
|
+
...headersFromBaseOptions,
|
|
235
|
+
...options.headers
|
|
236
|
+
};
|
|
237
|
+
return {
|
|
238
|
+
url: toPathString(localVarUrlObj),
|
|
239
|
+
options: localVarRequestOptions
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* FinancesApi - functional programming interface
|
|
246
|
+
*/
|
|
247
|
+
const FinancesApiFp = function(configuration) {
|
|
248
|
+
const localVarAxiosParamCreator = FinancesApiAxiosParamCreator(configuration);
|
|
249
|
+
return {
|
|
250
|
+
/**
|
|
251
|
+
* Returns financial event groups for a given date range. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
252
|
+
* @param {number} [maxResultsPerPage] The maximum number of results per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
|
|
253
|
+
* @param {string} [financialEventGroupStartedBefore] A date that selects financial event groups that opened before (but not at) a specified date and time, in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be after `FinancialEventGroupStartedAfter` and more than two minutes before the time of request. If `FinancialEventGroupStartedAfter` and `FinancialEventGroupStartedBefore` are more than 180 days apart, no financial event groups are returned.
|
|
254
|
+
* @param {string} [financialEventGroupStartedAfter] A date that selects financial event groups that opened after (or at) a specified date and time, in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be more than two minutes before you submit the request.
|
|
255
|
+
* @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
256
|
+
* @param {*} [options] Override http request option.
|
|
257
|
+
* @throws {RequiredError}
|
|
258
|
+
*/
|
|
259
|
+
async listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options) {
|
|
260
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options);
|
|
261
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
262
|
+
const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEventGroups"]?.[localVarOperationServerIndex]?.url;
|
|
263
|
+
return (axios$1, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$1, localVarOperationServerBasePath || basePath);
|
|
264
|
+
},
|
|
265
|
+
/**
|
|
266
|
+
* Returns financial events for the specified data range. Orders from the last 48 hours might not be included in financial events. **Note:** in `ListFinancialEvents`, deferred events don\'t show up in responses until they are released. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
267
|
+
* @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
|
|
268
|
+
* @param {string} [postedAfter] The response includes financial events posted after (or on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be more than two minutes before the time of the request.
|
|
269
|
+
* @param {string} [postedBefore] The response includes financial events posted before (but not on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be later than `PostedAfter` and more than two minutes before the request was submitted. If `PostedAfter` and `PostedBefore` are more than 180 days apart, the response is empty. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
|
|
270
|
+
* @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
271
|
+
* @param {*} [options] Override http request option.
|
|
272
|
+
* @throws {RequiredError}
|
|
273
|
+
*/
|
|
274
|
+
async listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options) {
|
|
275
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options);
|
|
276
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
277
|
+
const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEvents"]?.[localVarOperationServerIndex]?.url;
|
|
278
|
+
return (axios$2, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$2, localVarOperationServerBasePath || basePath);
|
|
279
|
+
},
|
|
280
|
+
/**
|
|
281
|
+
* Returns all financial events for the specified financial event group. Orders from the last 48 hours might not be included in financial events. **Note:** This operation only retrieves a group\'s data for the past two years. A request for data spanning more than two years produces an empty response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
282
|
+
* @param {string} eventGroupId The identifier of the financial event group to which the events belong.
|
|
283
|
+
* @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
|
|
284
|
+
* @param {string} [postedAfter] The response includes financial events posted after (or on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be more than two minutes before the time of the request.
|
|
285
|
+
* @param {string} [postedBefore] The response includes financial events posted before (but not on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be later than `PostedAfter` and more than two minutes before the request was submitted. If `PostedAfter` and `PostedBefore` are more than 180 days apart, the response is empty. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
|
|
286
|
+
* @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
287
|
+
* @param {*} [options] Override http request option.
|
|
288
|
+
* @throws {RequiredError}
|
|
289
|
+
*/
|
|
290
|
+
async listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options) {
|
|
291
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options);
|
|
292
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
293
|
+
const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEventsByGroupId"]?.[localVarOperationServerIndex]?.url;
|
|
294
|
+
return (axios$3, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$3, localVarOperationServerBasePath || basePath);
|
|
295
|
+
},
|
|
296
|
+
/**
|
|
297
|
+
* Returns all financial events for the specified order. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
298
|
+
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
|
|
299
|
+
* @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
|
|
300
|
+
* @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
301
|
+
* @param {*} [options] Override http request option.
|
|
302
|
+
* @throws {RequiredError}
|
|
303
|
+
*/
|
|
304
|
+
async listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options) {
|
|
305
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options);
|
|
306
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
307
|
+
const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEventsByOrderId"]?.[localVarOperationServerIndex]?.url;
|
|
308
|
+
return (axios$4, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$4, localVarOperationServerBasePath || basePath);
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
/**
|
|
313
|
+
* FinancesApi - factory interface
|
|
314
|
+
*/
|
|
315
|
+
const FinancesApiFactory = function(configuration, basePath, axios$5) {
|
|
316
|
+
const localVarFp = FinancesApiFp(configuration);
|
|
317
|
+
return {
|
|
318
|
+
/**
|
|
319
|
+
* Returns financial event groups for a given date range. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
320
|
+
* @param {FinancesApiListFinancialEventGroupsRequest} requestParameters Request parameters.
|
|
321
|
+
* @param {*} [options] Override http request option.
|
|
322
|
+
* @throws {RequiredError}
|
|
323
|
+
*/
|
|
324
|
+
listFinancialEventGroups(requestParameters = {}, options) {
|
|
325
|
+
return localVarFp.listFinancialEventGroups(requestParameters.maxResultsPerPage, requestParameters.financialEventGroupStartedBefore, requestParameters.financialEventGroupStartedAfter, requestParameters.nextToken, options).then((request) => request(axios$5, basePath));
|
|
326
|
+
},
|
|
327
|
+
/**
|
|
328
|
+
* Returns financial events for the specified data range. Orders from the last 48 hours might not be included in financial events. **Note:** in `ListFinancialEvents`, deferred events don\'t show up in responses until they are released. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
329
|
+
* @param {FinancesApiListFinancialEventsRequest} requestParameters Request parameters.
|
|
330
|
+
* @param {*} [options] Override http request option.
|
|
331
|
+
* @throws {RequiredError}
|
|
332
|
+
*/
|
|
333
|
+
listFinancialEvents(requestParameters = {}, options) {
|
|
334
|
+
return localVarFp.listFinancialEvents(requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(axios$5, basePath));
|
|
335
|
+
},
|
|
336
|
+
/**
|
|
337
|
+
* Returns all financial events for the specified financial event group. Orders from the last 48 hours might not be included in financial events. **Note:** This operation only retrieves a group\'s data for the past two years. A request for data spanning more than two years produces an empty response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
338
|
+
* @param {FinancesApiListFinancialEventsByGroupIdRequest} requestParameters Request parameters.
|
|
339
|
+
* @param {*} [options] Override http request option.
|
|
340
|
+
* @throws {RequiredError}
|
|
341
|
+
*/
|
|
342
|
+
listFinancialEventsByGroupId(requestParameters, options) {
|
|
343
|
+
return localVarFp.listFinancialEventsByGroupId(requestParameters.eventGroupId, requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(axios$5, basePath));
|
|
344
|
+
},
|
|
345
|
+
/**
|
|
346
|
+
* Returns all financial events for the specified order. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
347
|
+
* @param {FinancesApiListFinancialEventsByOrderIdRequest} requestParameters Request parameters.
|
|
348
|
+
* @param {*} [options] Override http request option.
|
|
349
|
+
* @throws {RequiredError}
|
|
350
|
+
*/
|
|
351
|
+
listFinancialEventsByOrderId(requestParameters, options) {
|
|
352
|
+
return localVarFp.listFinancialEventsByOrderId(requestParameters.orderId, requestParameters.maxResultsPerPage, requestParameters.nextToken, options).then((request) => request(axios$5, basePath));
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
/**
|
|
357
|
+
* FinancesApi - object-oriented interface
|
|
358
|
+
*/
|
|
359
|
+
var FinancesApi = class extends BaseAPI {
|
|
360
|
+
/**
|
|
361
|
+
* Returns financial event groups for a given date range. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
362
|
+
* @param {FinancesApiListFinancialEventGroupsRequest} requestParameters Request parameters.
|
|
363
|
+
* @param {*} [options] Override http request option.
|
|
364
|
+
* @throws {RequiredError}
|
|
365
|
+
*/
|
|
366
|
+
listFinancialEventGroups(requestParameters = {}, options) {
|
|
367
|
+
return FinancesApiFp(this.configuration).listFinancialEventGroups(requestParameters.maxResultsPerPage, requestParameters.financialEventGroupStartedBefore, requestParameters.financialEventGroupStartedAfter, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Returns financial events for the specified data range. Orders from the last 48 hours might not be included in financial events. **Note:** in `ListFinancialEvents`, deferred events don\'t show up in responses until they are released. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
371
|
+
* @param {FinancesApiListFinancialEventsRequest} requestParameters Request parameters.
|
|
372
|
+
* @param {*} [options] Override http request option.
|
|
373
|
+
* @throws {RequiredError}
|
|
374
|
+
*/
|
|
375
|
+
listFinancialEvents(requestParameters = {}, options) {
|
|
376
|
+
return FinancesApiFp(this.configuration).listFinancialEvents(requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Returns all financial events for the specified financial event group. Orders from the last 48 hours might not be included in financial events. **Note:** This operation only retrieves a group\'s data for the past two years. A request for data spanning more than two years produces an empty response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
380
|
+
* @param {FinancesApiListFinancialEventsByGroupIdRequest} requestParameters Request parameters.
|
|
381
|
+
* @param {*} [options] Override http request option.
|
|
382
|
+
* @throws {RequiredError}
|
|
383
|
+
*/
|
|
384
|
+
listFinancialEventsByGroupId(requestParameters, options) {
|
|
385
|
+
return FinancesApiFp(this.configuration).listFinancialEventsByGroupId(requestParameters.eventGroupId, requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Returns all financial events for the specified order. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can 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).
|
|
389
|
+
* @param {FinancesApiListFinancialEventsByOrderIdRequest} requestParameters Request parameters.
|
|
390
|
+
* @param {*} [options] Override http request option.
|
|
391
|
+
* @throws {RequiredError}
|
|
392
|
+
*/
|
|
393
|
+
listFinancialEventsByOrderId(requestParameters, options) {
|
|
394
|
+
return FinancesApiFp(this.configuration).listFinancialEventsByOrderId(requestParameters.orderId, requestParameters.maxResultsPerPage, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
//#endregion
|
|
398
|
+
//#region src/api-model/configuration.ts
|
|
399
|
+
var Configuration = class {
|
|
400
|
+
/**
|
|
401
|
+
* parameter for apiKey security
|
|
402
|
+
* @param name security name
|
|
403
|
+
*/
|
|
404
|
+
apiKey;
|
|
405
|
+
/**
|
|
406
|
+
* parameter for basic security
|
|
407
|
+
*/
|
|
408
|
+
username;
|
|
409
|
+
/**
|
|
410
|
+
* parameter for basic security
|
|
411
|
+
*/
|
|
412
|
+
password;
|
|
413
|
+
/**
|
|
414
|
+
* parameter for oauth2 security
|
|
415
|
+
* @param name security name
|
|
416
|
+
* @param scopes oauth2 scope
|
|
417
|
+
*/
|
|
418
|
+
accessToken;
|
|
419
|
+
/**
|
|
420
|
+
* parameter for aws4 signature security
|
|
421
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
422
|
+
* @param {string} options.region - aws region
|
|
423
|
+
* @param {string} options.service - name of the service.
|
|
424
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
425
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
426
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
427
|
+
* @memberof Configuration
|
|
428
|
+
*/
|
|
429
|
+
awsv4;
|
|
430
|
+
/**
|
|
431
|
+
* override base path
|
|
432
|
+
*/
|
|
433
|
+
basePath;
|
|
434
|
+
/**
|
|
435
|
+
* override server index
|
|
436
|
+
*/
|
|
437
|
+
serverIndex;
|
|
438
|
+
/**
|
|
439
|
+
* base options for axios calls
|
|
440
|
+
*/
|
|
441
|
+
baseOptions;
|
|
442
|
+
/**
|
|
443
|
+
* The FormData constructor that will be used to create multipart form data
|
|
444
|
+
* requests. You can inject this here so that execution environments that
|
|
445
|
+
* do not support the FormData class can still run the generated client.
|
|
446
|
+
*
|
|
447
|
+
* @type {new () => FormData}
|
|
448
|
+
*/
|
|
449
|
+
formDataCtor;
|
|
450
|
+
constructor(param = {}) {
|
|
451
|
+
this.apiKey = param.apiKey;
|
|
452
|
+
this.username = param.username;
|
|
453
|
+
this.password = param.password;
|
|
454
|
+
this.accessToken = param.accessToken;
|
|
455
|
+
this.awsv4 = param.awsv4;
|
|
456
|
+
this.basePath = param.basePath;
|
|
457
|
+
this.serverIndex = param.serverIndex;
|
|
458
|
+
this.baseOptions = {
|
|
459
|
+
...param.baseOptions,
|
|
460
|
+
headers: { ...param.baseOptions?.headers }
|
|
461
|
+
};
|
|
462
|
+
this.formDataCtor = param.formDataCtor;
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Check if the given MIME is a JSON MIME.
|
|
466
|
+
* JSON MIME examples:
|
|
467
|
+
* application/json
|
|
468
|
+
* application/json; charset=UTF8
|
|
469
|
+
* APPLICATION/JSON
|
|
470
|
+
* application/vnd.company+json
|
|
471
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
472
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
473
|
+
*/
|
|
474
|
+
isJsonMime(mime) {
|
|
475
|
+
return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
//#endregion
|
|
479
|
+
//#region src/client.ts
|
|
480
|
+
const clientRateLimits = [
|
|
481
|
+
{
|
|
482
|
+
method: "get",
|
|
483
|
+
urlRegex: /^\/finances\/v0\/financialEventGroups$/v,
|
|
484
|
+
rate: .5,
|
|
485
|
+
burst: 30
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
method: "get",
|
|
489
|
+
urlRegex: /^\/finances\/v0\/financialEventGroups\/[^\/]*\/financialEvents$/v,
|
|
490
|
+
rate: .5,
|
|
491
|
+
burst: 30
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
method: "get",
|
|
495
|
+
urlRegex: /^\/finances\/v0\/orders\/[^\/]*\/financialEvents$/v,
|
|
496
|
+
rate: .5,
|
|
497
|
+
burst: 30
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
method: "get",
|
|
501
|
+
urlRegex: /^\/finances\/v0\/financialEvents$/v,
|
|
502
|
+
rate: .5,
|
|
503
|
+
burst: 30
|
|
504
|
+
}
|
|
505
|
+
];
|
|
506
|
+
var FinancesApiClient = class extends FinancesApi {
|
|
507
|
+
constructor(configuration) {
|
|
508
|
+
const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
|
|
509
|
+
super(new Configuration(), endpoint, axios);
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
//#endregion
|
|
513
|
+
exports.FinancesApi = FinancesApi;
|
|
514
|
+
exports.FinancesApiAxiosParamCreator = FinancesApiAxiosParamCreator;
|
|
515
|
+
exports.FinancesApiClient = FinancesApiClient;
|
|
516
|
+
exports.FinancesApiFactory = FinancesApiFactory;
|
|
517
|
+
exports.FinancesApiFp = FinancesApiFp;
|
|
518
|
+
exports.clientRateLimits = clientRateLimits;
|
|
519
|
+
|
|
520
|
+
//# sourceMappingURL=index.cjs.map
|