@sp-api-sdk/finances-api-v0 5.0.0 → 5.1.1

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