@sp-api-sdk/finances-api-v0 4.2.7 → 5.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/README.md +4 -4
- package/dist/index.cjs +550 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2281 -0
- package/dist/index.d.ts +2281 -0
- package/dist/{types/api-model/api/finances-api.d.ts → index.js} +409 -158
- package/dist/index.js.map +1 -0
- package/package.json +23 -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.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
|
@@ -1,24 +1,78 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
// src/client.ts
|
|
2
|
+
import { createAxiosInstance } from "@sp-api-sdk/common";
|
|
3
|
+
|
|
4
|
+
// src/api-model/api/finances-api.ts
|
|
5
|
+
import globalAxios2 from "axios";
|
|
6
|
+
|
|
7
|
+
// src/api-model/base.ts
|
|
8
|
+
import globalAxios from "axios";
|
|
9
|
+
var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
10
|
+
var BaseAPI = class {
|
|
11
|
+
constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
|
|
12
|
+
this.basePath = basePath;
|
|
13
|
+
this.axios = axios;
|
|
14
|
+
if (configuration) {
|
|
15
|
+
this.configuration = configuration;
|
|
16
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
basePath;
|
|
20
|
+
axios;
|
|
21
|
+
configuration;
|
|
22
|
+
};
|
|
23
|
+
var RequiredError = class extends Error {
|
|
24
|
+
constructor(field, msg) {
|
|
25
|
+
super(msg);
|
|
26
|
+
this.field = field;
|
|
27
|
+
this.name = "RequiredError";
|
|
28
|
+
}
|
|
29
|
+
field;
|
|
30
|
+
};
|
|
31
|
+
var operationServerMap = {};
|
|
32
|
+
|
|
33
|
+
// src/api-model/common.ts
|
|
34
|
+
var DUMMY_BASE_URL = "https://example.com";
|
|
35
|
+
var assertParamExists = function(functionName, paramName, paramValue) {
|
|
36
|
+
if (paramValue === null || paramValue === void 0) {
|
|
37
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
41
|
+
if (parameter == null) return;
|
|
42
|
+
if (typeof parameter === "object") {
|
|
43
|
+
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
44
|
+
parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
45
|
+
} else {
|
|
46
|
+
Object.keys(parameter).forEach(
|
|
47
|
+
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
} else {
|
|
51
|
+
if (urlSearchParams.has(key)) {
|
|
52
|
+
urlSearchParams.append(key, parameter);
|
|
53
|
+
} else {
|
|
54
|
+
urlSearchParams.set(key, parameter);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
var setSearchParams = function(url, ...objects) {
|
|
59
|
+
const searchParams = new URLSearchParams(url.search);
|
|
60
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
61
|
+
url.search = searchParams.toString();
|
|
62
|
+
};
|
|
63
|
+
var toPathString = function(url) {
|
|
64
|
+
return url.pathname + url.search + url.hash;
|
|
65
|
+
};
|
|
66
|
+
var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
|
|
67
|
+
return (axios = globalAxios3, basePath = BASE_PATH2) => {
|
|
68
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
69
|
+
return axios.request(axiosRequestArgs);
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// src/api-model/api/finances-api.ts
|
|
74
|
+
var FinancesApiAxiosParamCreator = function(configuration) {
|
|
75
|
+
return {
|
|
22
76
|
/**
|
|
23
77
|
* 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).
|
|
24
78
|
* @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`.
|
|
@@ -28,7 +82,37 @@ export declare const FinancesApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
28
82
|
* @param {*} [options] Override http request option.
|
|
29
83
|
* @throws {RequiredError}
|
|
30
84
|
*/
|
|
31
|
-
listFinancialEventGroups: (maxResultsPerPage
|
|
85
|
+
listFinancialEventGroups: async (maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options = {}) => {
|
|
86
|
+
const localVarPath = `/finances/v0/financialEventGroups`;
|
|
87
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
88
|
+
let baseOptions;
|
|
89
|
+
if (configuration) {
|
|
90
|
+
baseOptions = configuration.baseOptions;
|
|
91
|
+
}
|
|
92
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
93
|
+
const localVarHeaderParameter = {};
|
|
94
|
+
const localVarQueryParameter = {};
|
|
95
|
+
if (maxResultsPerPage !== void 0) {
|
|
96
|
+
localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
|
|
97
|
+
}
|
|
98
|
+
if (financialEventGroupStartedBefore !== void 0) {
|
|
99
|
+
localVarQueryParameter["FinancialEventGroupStartedBefore"] = financialEventGroupStartedBefore instanceof Date ? financialEventGroupStartedBefore.toISOString() : financialEventGroupStartedBefore;
|
|
100
|
+
}
|
|
101
|
+
if (financialEventGroupStartedAfter !== void 0) {
|
|
102
|
+
localVarQueryParameter["FinancialEventGroupStartedAfter"] = financialEventGroupStartedAfter instanceof Date ? financialEventGroupStartedAfter.toISOString() : financialEventGroupStartedAfter;
|
|
103
|
+
}
|
|
104
|
+
if (nextToken !== void 0) {
|
|
105
|
+
localVarQueryParameter["NextToken"] = nextToken;
|
|
106
|
+
}
|
|
107
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
108
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
109
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
110
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
111
|
+
return {
|
|
112
|
+
url: toPathString(localVarUrlObj),
|
|
113
|
+
options: localVarRequestOptions
|
|
114
|
+
};
|
|
115
|
+
},
|
|
32
116
|
/**
|
|
33
117
|
* 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).
|
|
34
118
|
* @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`.
|
|
@@ -38,7 +122,37 @@ export declare const FinancesApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
38
122
|
* @param {*} [options] Override http request option.
|
|
39
123
|
* @throws {RequiredError}
|
|
40
124
|
*/
|
|
41
|
-
listFinancialEvents: (maxResultsPerPage
|
|
125
|
+
listFinancialEvents: async (maxResultsPerPage, postedAfter, postedBefore, nextToken, options = {}) => {
|
|
126
|
+
const localVarPath = `/finances/v0/financialEvents`;
|
|
127
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
128
|
+
let baseOptions;
|
|
129
|
+
if (configuration) {
|
|
130
|
+
baseOptions = configuration.baseOptions;
|
|
131
|
+
}
|
|
132
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
133
|
+
const localVarHeaderParameter = {};
|
|
134
|
+
const localVarQueryParameter = {};
|
|
135
|
+
if (maxResultsPerPage !== void 0) {
|
|
136
|
+
localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
|
|
137
|
+
}
|
|
138
|
+
if (postedAfter !== void 0) {
|
|
139
|
+
localVarQueryParameter["PostedAfter"] = postedAfter instanceof Date ? postedAfter.toISOString() : postedAfter;
|
|
140
|
+
}
|
|
141
|
+
if (postedBefore !== void 0) {
|
|
142
|
+
localVarQueryParameter["PostedBefore"] = postedBefore instanceof Date ? postedBefore.toISOString() : postedBefore;
|
|
143
|
+
}
|
|
144
|
+
if (nextToken !== void 0) {
|
|
145
|
+
localVarQueryParameter["NextToken"] = nextToken;
|
|
146
|
+
}
|
|
147
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
148
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
149
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
150
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
151
|
+
return {
|
|
152
|
+
url: toPathString(localVarUrlObj),
|
|
153
|
+
options: localVarRequestOptions
|
|
154
|
+
};
|
|
155
|
+
},
|
|
42
156
|
/**
|
|
43
157
|
* 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).
|
|
44
158
|
* @param {string} eventGroupId The identifier of the financial event group to which the events belong.
|
|
@@ -49,7 +163,38 @@ export declare const FinancesApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
49
163
|
* @param {*} [options] Override http request option.
|
|
50
164
|
* @throws {RequiredError}
|
|
51
165
|
*/
|
|
52
|
-
listFinancialEventsByGroupId: (eventGroupId
|
|
166
|
+
listFinancialEventsByGroupId: async (eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options = {}) => {
|
|
167
|
+
assertParamExists("listFinancialEventsByGroupId", "eventGroupId", eventGroupId);
|
|
168
|
+
const localVarPath = `/finances/v0/financialEventGroups/{eventGroupId}/financialEvents`.replace("{eventGroupId}", encodeURIComponent(String(eventGroupId)));
|
|
169
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
170
|
+
let baseOptions;
|
|
171
|
+
if (configuration) {
|
|
172
|
+
baseOptions = configuration.baseOptions;
|
|
173
|
+
}
|
|
174
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
175
|
+
const localVarHeaderParameter = {};
|
|
176
|
+
const localVarQueryParameter = {};
|
|
177
|
+
if (maxResultsPerPage !== void 0) {
|
|
178
|
+
localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
|
|
179
|
+
}
|
|
180
|
+
if (postedAfter !== void 0) {
|
|
181
|
+
localVarQueryParameter["PostedAfter"] = postedAfter instanceof Date ? postedAfter.toISOString() : postedAfter;
|
|
182
|
+
}
|
|
183
|
+
if (postedBefore !== void 0) {
|
|
184
|
+
localVarQueryParameter["PostedBefore"] = postedBefore instanceof Date ? postedBefore.toISOString() : postedBefore;
|
|
185
|
+
}
|
|
186
|
+
if (nextToken !== void 0) {
|
|
187
|
+
localVarQueryParameter["NextToken"] = nextToken;
|
|
188
|
+
}
|
|
189
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
190
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
191
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
192
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
193
|
+
return {
|
|
194
|
+
url: toPathString(localVarUrlObj),
|
|
195
|
+
options: localVarRequestOptions
|
|
196
|
+
};
|
|
197
|
+
},
|
|
53
198
|
/**
|
|
54
199
|
* 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).
|
|
55
200
|
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
|
|
@@ -58,12 +203,37 @@ export declare const FinancesApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
58
203
|
* @param {*} [options] Override http request option.
|
|
59
204
|
* @throws {RequiredError}
|
|
60
205
|
*/
|
|
61
|
-
listFinancialEventsByOrderId: (orderId
|
|
206
|
+
listFinancialEventsByOrderId: async (orderId, maxResultsPerPage, nextToken, options = {}) => {
|
|
207
|
+
assertParamExists("listFinancialEventsByOrderId", "orderId", orderId);
|
|
208
|
+
const localVarPath = `/finances/v0/orders/{orderId}/financialEvents`.replace("{orderId}", encodeURIComponent(String(orderId)));
|
|
209
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
210
|
+
let baseOptions;
|
|
211
|
+
if (configuration) {
|
|
212
|
+
baseOptions = configuration.baseOptions;
|
|
213
|
+
}
|
|
214
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
215
|
+
const localVarHeaderParameter = {};
|
|
216
|
+
const localVarQueryParameter = {};
|
|
217
|
+
if (maxResultsPerPage !== void 0) {
|
|
218
|
+
localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
|
|
219
|
+
}
|
|
220
|
+
if (nextToken !== void 0) {
|
|
221
|
+
localVarQueryParameter["NextToken"] = nextToken;
|
|
222
|
+
}
|
|
223
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
224
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
225
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
226
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
227
|
+
return {
|
|
228
|
+
url: toPathString(localVarUrlObj),
|
|
229
|
+
options: localVarRequestOptions
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
};
|
|
62
233
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
export declare const FinancesApiFp: (configuration?: Configuration) => {
|
|
234
|
+
var FinancesApiFp = function(configuration) {
|
|
235
|
+
const localVarAxiosParamCreator = FinancesApiAxiosParamCreator(configuration);
|
|
236
|
+
return {
|
|
67
237
|
/**
|
|
68
238
|
* 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).
|
|
69
239
|
* @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`.
|
|
@@ -73,7 +243,12 @@ export declare const FinancesApiFp: (configuration?: Configuration) => {
|
|
|
73
243
|
* @param {*} [options] Override http request option.
|
|
74
244
|
* @throws {RequiredError}
|
|
75
245
|
*/
|
|
76
|
-
listFinancialEventGroups(maxResultsPerPage
|
|
246
|
+
async listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options) {
|
|
247
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options);
|
|
248
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
249
|
+
const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEventGroups"]?.[localVarOperationServerIndex]?.url;
|
|
250
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
251
|
+
},
|
|
77
252
|
/**
|
|
78
253
|
* 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).
|
|
79
254
|
* @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`.
|
|
@@ -83,7 +258,12 @@ export declare const FinancesApiFp: (configuration?: Configuration) => {
|
|
|
83
258
|
* @param {*} [options] Override http request option.
|
|
84
259
|
* @throws {RequiredError}
|
|
85
260
|
*/
|
|
86
|
-
listFinancialEvents(maxResultsPerPage
|
|
261
|
+
async listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options) {
|
|
262
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options);
|
|
263
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
264
|
+
const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEvents"]?.[localVarOperationServerIndex]?.url;
|
|
265
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
266
|
+
},
|
|
87
267
|
/**
|
|
88
268
|
* 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).
|
|
89
269
|
* @param {string} eventGroupId The identifier of the financial event group to which the events belong.
|
|
@@ -94,7 +274,12 @@ export declare const FinancesApiFp: (configuration?: Configuration) => {
|
|
|
94
274
|
* @param {*} [options] Override http request option.
|
|
95
275
|
* @throws {RequiredError}
|
|
96
276
|
*/
|
|
97
|
-
listFinancialEventsByGroupId(eventGroupId
|
|
277
|
+
async listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options) {
|
|
278
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options);
|
|
279
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
280
|
+
const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEventsByGroupId"]?.[localVarOperationServerIndex]?.url;
|
|
281
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
282
|
+
},
|
|
98
283
|
/**
|
|
99
284
|
* 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).
|
|
100
285
|
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
|
|
@@ -103,155 +288,221 @@ export declare const FinancesApiFp: (configuration?: Configuration) => {
|
|
|
103
288
|
* @param {*} [options] Override http request option.
|
|
104
289
|
* @throws {RequiredError}
|
|
105
290
|
*/
|
|
106
|
-
listFinancialEventsByOrderId(orderId
|
|
291
|
+
async listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options) {
|
|
292
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options);
|
|
293
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
294
|
+
const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEventsByOrderId"]?.[localVarOperationServerIndex]?.url;
|
|
295
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
296
|
+
}
|
|
297
|
+
};
|
|
107
298
|
};
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
export declare const FinancesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
299
|
+
var FinancesApiFactory = function(configuration, basePath, axios) {
|
|
300
|
+
const localVarFp = FinancesApiFp(configuration);
|
|
301
|
+
return {
|
|
112
302
|
/**
|
|
113
303
|
* 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).
|
|
114
304
|
* @param {FinancesApiListFinancialEventGroupsRequest} requestParameters Request parameters.
|
|
115
305
|
* @param {*} [options] Override http request option.
|
|
116
306
|
* @throws {RequiredError}
|
|
117
307
|
*/
|
|
118
|
-
listFinancialEventGroups(requestParameters
|
|
308
|
+
listFinancialEventGroups(requestParameters = {}, options) {
|
|
309
|
+
return localVarFp.listFinancialEventGroups(requestParameters.maxResultsPerPage, requestParameters.financialEventGroupStartedBefore, requestParameters.financialEventGroupStartedAfter, requestParameters.nextToken, options).then((request) => request(axios, basePath));
|
|
310
|
+
},
|
|
119
311
|
/**
|
|
120
312
|
* 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).
|
|
121
313
|
* @param {FinancesApiListFinancialEventsRequest} requestParameters Request parameters.
|
|
122
314
|
* @param {*} [options] Override http request option.
|
|
123
315
|
* @throws {RequiredError}
|
|
124
316
|
*/
|
|
125
|
-
listFinancialEvents(requestParameters
|
|
317
|
+
listFinancialEvents(requestParameters = {}, options) {
|
|
318
|
+
return localVarFp.listFinancialEvents(requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(axios, basePath));
|
|
319
|
+
},
|
|
126
320
|
/**
|
|
127
321
|
* 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).
|
|
128
322
|
* @param {FinancesApiListFinancialEventsByGroupIdRequest} requestParameters Request parameters.
|
|
129
323
|
* @param {*} [options] Override http request option.
|
|
130
324
|
* @throws {RequiredError}
|
|
131
325
|
*/
|
|
132
|
-
listFinancialEventsByGroupId(requestParameters
|
|
326
|
+
listFinancialEventsByGroupId(requestParameters, options) {
|
|
327
|
+
return localVarFp.listFinancialEventsByGroupId(requestParameters.eventGroupId, requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(axios, basePath));
|
|
328
|
+
},
|
|
133
329
|
/**
|
|
134
330
|
* 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).
|
|
135
331
|
* @param {FinancesApiListFinancialEventsByOrderIdRequest} requestParameters Request parameters.
|
|
136
332
|
* @param {*} [options] Override http request option.
|
|
137
333
|
* @throws {RequiredError}
|
|
138
334
|
*/
|
|
139
|
-
listFinancialEventsByOrderId(requestParameters
|
|
335
|
+
listFinancialEventsByOrderId(requestParameters, options) {
|
|
336
|
+
return localVarFp.listFinancialEventsByOrderId(requestParameters.orderId, requestParameters.maxResultsPerPage, requestParameters.nextToken, options).then((request) => request(axios, basePath));
|
|
337
|
+
}
|
|
338
|
+
};
|
|
140
339
|
};
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
340
|
+
var FinancesApi = class extends BaseAPI {
|
|
341
|
+
/**
|
|
342
|
+
* 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).
|
|
343
|
+
* @param {FinancesApiListFinancialEventGroupsRequest} requestParameters Request parameters.
|
|
344
|
+
* @param {*} [options] Override http request option.
|
|
345
|
+
* @throws {RequiredError}
|
|
346
|
+
*/
|
|
347
|
+
listFinancialEventGroups(requestParameters = {}, options) {
|
|
348
|
+
return FinancesApiFp(this.configuration).listFinancialEventGroups(requestParameters.maxResultsPerPage, requestParameters.financialEventGroupStartedBefore, requestParameters.financialEventGroupStartedAfter, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* 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).
|
|
352
|
+
* @param {FinancesApiListFinancialEventsRequest} requestParameters Request parameters.
|
|
353
|
+
* @param {*} [options] Override http request option.
|
|
354
|
+
* @throws {RequiredError}
|
|
355
|
+
*/
|
|
356
|
+
listFinancialEvents(requestParameters = {}, options) {
|
|
357
|
+
return FinancesApiFp(this.configuration).listFinancialEvents(requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* 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).
|
|
361
|
+
* @param {FinancesApiListFinancialEventsByGroupIdRequest} requestParameters Request parameters.
|
|
362
|
+
* @param {*} [options] Override http request option.
|
|
363
|
+
* @throws {RequiredError}
|
|
364
|
+
*/
|
|
365
|
+
listFinancialEventsByGroupId(requestParameters, options) {
|
|
366
|
+
return FinancesApiFp(this.configuration).listFinancialEventsByGroupId(requestParameters.eventGroupId, requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* 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).
|
|
370
|
+
* @param {FinancesApiListFinancialEventsByOrderIdRequest} requestParameters Request parameters.
|
|
371
|
+
* @param {*} [options] Override http request option.
|
|
372
|
+
* @throws {RequiredError}
|
|
373
|
+
*/
|
|
374
|
+
listFinancialEventsByOrderId(requestParameters, options) {
|
|
375
|
+
return FinancesApiFp(this.configuration).listFinancialEventsByOrderId(requestParameters.orderId, requestParameters.maxResultsPerPage, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
// src/api-model/configuration.ts
|
|
380
|
+
var Configuration = class {
|
|
381
|
+
/**
|
|
382
|
+
* parameter for apiKey security
|
|
383
|
+
* @param name security name
|
|
384
|
+
*/
|
|
385
|
+
apiKey;
|
|
386
|
+
/**
|
|
387
|
+
* parameter for basic security
|
|
388
|
+
*/
|
|
389
|
+
username;
|
|
390
|
+
/**
|
|
391
|
+
* parameter for basic security
|
|
392
|
+
*/
|
|
393
|
+
password;
|
|
394
|
+
/**
|
|
395
|
+
* parameter for oauth2 security
|
|
396
|
+
* @param name security name
|
|
397
|
+
* @param scopes oauth2 scope
|
|
398
|
+
*/
|
|
399
|
+
accessToken;
|
|
400
|
+
/**
|
|
401
|
+
* parameter for aws4 signature security
|
|
402
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
403
|
+
* @param {string} options.region - aws region
|
|
404
|
+
* @param {string} options.service - name of the service.
|
|
405
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
406
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
407
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
408
|
+
* @memberof Configuration
|
|
409
|
+
*/
|
|
410
|
+
awsv4;
|
|
411
|
+
/**
|
|
412
|
+
* override base path
|
|
413
|
+
*/
|
|
414
|
+
basePath;
|
|
415
|
+
/**
|
|
416
|
+
* override server index
|
|
417
|
+
*/
|
|
418
|
+
serverIndex;
|
|
419
|
+
/**
|
|
420
|
+
* base options for axios calls
|
|
421
|
+
*/
|
|
422
|
+
baseOptions;
|
|
423
|
+
/**
|
|
424
|
+
* The FormData constructor that will be used to create multipart form data
|
|
425
|
+
* requests. You can inject this here so that execution environments that
|
|
426
|
+
* do not support the FormData class can still run the generated client.
|
|
427
|
+
*
|
|
428
|
+
* @type {new () => FormData}
|
|
429
|
+
*/
|
|
430
|
+
formDataCtor;
|
|
431
|
+
constructor(param = {}) {
|
|
432
|
+
this.apiKey = param.apiKey;
|
|
433
|
+
this.username = param.username;
|
|
434
|
+
this.password = param.password;
|
|
435
|
+
this.accessToken = param.accessToken;
|
|
436
|
+
this.awsv4 = param.awsv4;
|
|
437
|
+
this.basePath = param.basePath;
|
|
438
|
+
this.serverIndex = param.serverIndex;
|
|
439
|
+
this.baseOptions = {
|
|
440
|
+
...param.baseOptions,
|
|
441
|
+
headers: {
|
|
442
|
+
...param.baseOptions?.headers
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
this.formDataCtor = param.formDataCtor;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Check if the given MIME is a JSON MIME.
|
|
449
|
+
* JSON MIME examples:
|
|
450
|
+
* application/json
|
|
451
|
+
* application/json; charset=UTF8
|
|
452
|
+
* APPLICATION/JSON
|
|
453
|
+
* application/vnd.company+json
|
|
454
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
455
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
456
|
+
*/
|
|
457
|
+
isJsonMime(mime) {
|
|
458
|
+
const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
459
|
+
return mime !== null && jsonMime.test(mime);
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
// src/client.ts
|
|
464
|
+
var clientRateLimits = [
|
|
465
|
+
{
|
|
466
|
+
method: "get",
|
|
467
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
468
|
+
urlRegex: new RegExp("^/finances/v0/financialEventGroups$"),
|
|
469
|
+
rate: 0.5,
|
|
470
|
+
burst: 30
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
method: "get",
|
|
474
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
475
|
+
urlRegex: new RegExp("^/finances/v0/financialEventGroups/[^/]*/financialEvents$"),
|
|
476
|
+
rate: 0.5,
|
|
477
|
+
burst: 30
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
method: "get",
|
|
481
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
482
|
+
urlRegex: new RegExp("^/finances/v0/orders/[^/]*/financialEvents$"),
|
|
483
|
+
rate: 0.5,
|
|
484
|
+
burst: 30
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
method: "get",
|
|
488
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
489
|
+
urlRegex: new RegExp("^/finances/v0/financialEvents$"),
|
|
490
|
+
rate: 0.5,
|
|
491
|
+
burst: 30
|
|
492
|
+
}
|
|
493
|
+
];
|
|
494
|
+
var FinancesApiClient = class extends FinancesApi {
|
|
495
|
+
constructor(configuration) {
|
|
496
|
+
const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
|
|
497
|
+
super(new Configuration(), endpoint, axios);
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
export {
|
|
501
|
+
FinancesApi,
|
|
502
|
+
FinancesApiAxiosParamCreator,
|
|
503
|
+
FinancesApiClient,
|
|
504
|
+
FinancesApiFactory,
|
|
505
|
+
FinancesApiFp,
|
|
506
|
+
clientRateLimits
|
|
507
|
+
};
|
|
508
|
+
//# sourceMappingURL=index.js.map
|