@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.
Files changed (187) hide show
  1. package/README.md +4 -4
  2. package/dist/index.cjs +550 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +2281 -0
  5. package/dist/index.d.ts +2281 -0
  6. package/dist/{types/api-model/api/finances-api.d.ts → index.js} +409 -158
  7. package/dist/index.js.map +1 -0
  8. package/package.json +23 -12
  9. package/dist/cjs/api-model/api/finances-api.js +0 -365
  10. package/dist/cjs/api-model/api.js +0 -30
  11. package/dist/cjs/api-model/base.js +0 -52
  12. package/dist/cjs/api-model/common.js +0 -123
  13. package/dist/cjs/api-model/configuration.js +0 -98
  14. package/dist/cjs/api-model/index.js +0 -32
  15. package/dist/cjs/api-model/models/adhoc-disbursement-event.js +0 -15
  16. package/dist/cjs/api-model/models/adjustment-event.js +0 -15
  17. package/dist/cjs/api-model/models/adjustment-item.js +0 -15
  18. package/dist/cjs/api-model/models/affordability-expense-event.js +0 -15
  19. package/dist/cjs/api-model/models/capacity-reservation-billing-event.js +0 -15
  20. package/dist/cjs/api-model/models/charge-component.js +0 -15
  21. package/dist/cjs/api-model/models/charge-instrument.js +0 -15
  22. package/dist/cjs/api-model/models/charge-refund-event.js +0 -15
  23. package/dist/cjs/api-model/models/charge-refund-transaction.js +0 -15
  24. package/dist/cjs/api-model/models/coupon-payment-event.js +0 -15
  25. package/dist/cjs/api-model/models/currency.js +0 -15
  26. package/dist/cjs/api-model/models/debt-recovery-event.js +0 -15
  27. package/dist/cjs/api-model/models/debt-recovery-item.js +0 -15
  28. package/dist/cjs/api-model/models/direct-payment.js +0 -15
  29. package/dist/cjs/api-model/models/ebtrefund-reimbursement-only-event.js +0 -15
  30. package/dist/cjs/api-model/models/failed-adhoc-disbursement-event.js +0 -15
  31. package/dist/cjs/api-model/models/fbaliquidation-event.js +0 -15
  32. package/dist/cjs/api-model/models/fee-component.js +0 -15
  33. package/dist/cjs/api-model/models/financial-event-group.js +0 -15
  34. package/dist/cjs/api-model/models/financial-events.js +0 -15
  35. package/dist/cjs/api-model/models/imaging-services-fee-event.js +0 -15
  36. package/dist/cjs/api-model/models/index.js +0 -67
  37. package/dist/cjs/api-model/models/list-financial-event-groups-payload.js +0 -15
  38. package/dist/cjs/api-model/models/list-financial-event-groups-response.js +0 -15
  39. package/dist/cjs/api-model/models/list-financial-events-payload.js +0 -15
  40. package/dist/cjs/api-model/models/list-financial-events-response.js +0 -15
  41. package/dist/cjs/api-model/models/loan-servicing-event.js +0 -15
  42. package/dist/cjs/api-model/models/model-error.js +0 -15
  43. package/dist/cjs/api-model/models/network-commingling-transaction-event.js +0 -15
  44. package/dist/cjs/api-model/models/pay-with-amazon-event.js +0 -15
  45. package/dist/cjs/api-model/models/product-ads-payment-event.js +0 -15
  46. package/dist/cjs/api-model/models/promotion.js +0 -15
  47. package/dist/cjs/api-model/models/removal-shipment-adjustment-event.js +0 -15
  48. package/dist/cjs/api-model/models/removal-shipment-event.js +0 -15
  49. package/dist/cjs/api-model/models/removal-shipment-item-adjustment.js +0 -15
  50. package/dist/cjs/api-model/models/removal-shipment-item.js +0 -15
  51. package/dist/cjs/api-model/models/rental-transaction-event.js +0 -15
  52. package/dist/cjs/api-model/models/retrocharge-event.js +0 -15
  53. package/dist/cjs/api-model/models/safetreimbursement-event.js +0 -15
  54. package/dist/cjs/api-model/models/safetreimbursement-item.js +0 -15
  55. package/dist/cjs/api-model/models/seller-deal-payment-event.js +0 -15
  56. package/dist/cjs/api-model/models/seller-review-enrollment-payment-event.js +0 -15
  57. package/dist/cjs/api-model/models/service-fee-event.js +0 -15
  58. package/dist/cjs/api-model/models/shipment-event.js +0 -15
  59. package/dist/cjs/api-model/models/shipment-item.js +0 -15
  60. package/dist/cjs/api-model/models/solution-provider-credit-event.js +0 -15
  61. package/dist/cjs/api-model/models/tax-withheld-component.js +0 -15
  62. package/dist/cjs/api-model/models/tax-withholding-event.js +0 -15
  63. package/dist/cjs/api-model/models/tax-withholding-period.js +0 -15
  64. package/dist/cjs/api-model/models/tdsreimbursement-event.js +0 -15
  65. package/dist/cjs/api-model/models/trial-shipment-event.js +0 -15
  66. package/dist/cjs/api-model/models/value-added-service-charge-event.js +0 -15
  67. package/dist/cjs/client.js +0 -42
  68. package/dist/cjs/index.js +0 -18
  69. package/dist/es/api-model/api/finances-api.js +0 -355
  70. package/dist/es/api-model/api.js +0 -14
  71. package/dist/es/api-model/base.js +0 -44
  72. package/dist/es/api-model/common.js +0 -110
  73. package/dist/es/api-model/configuration.js +0 -94
  74. package/dist/es/api-model/index.js +0 -16
  75. package/dist/es/api-model/models/adhoc-disbursement-event.js +0 -14
  76. package/dist/es/api-model/models/adjustment-event.js +0 -14
  77. package/dist/es/api-model/models/adjustment-item.js +0 -14
  78. package/dist/es/api-model/models/affordability-expense-event.js +0 -14
  79. package/dist/es/api-model/models/capacity-reservation-billing-event.js +0 -14
  80. package/dist/es/api-model/models/charge-component.js +0 -14
  81. package/dist/es/api-model/models/charge-instrument.js +0 -14
  82. package/dist/es/api-model/models/charge-refund-event.js +0 -14
  83. package/dist/es/api-model/models/charge-refund-transaction.js +0 -14
  84. package/dist/es/api-model/models/coupon-payment-event.js +0 -14
  85. package/dist/es/api-model/models/currency.js +0 -14
  86. package/dist/es/api-model/models/debt-recovery-event.js +0 -14
  87. package/dist/es/api-model/models/debt-recovery-item.js +0 -14
  88. package/dist/es/api-model/models/direct-payment.js +0 -14
  89. package/dist/es/api-model/models/ebtrefund-reimbursement-only-event.js +0 -14
  90. package/dist/es/api-model/models/failed-adhoc-disbursement-event.js +0 -14
  91. package/dist/es/api-model/models/fbaliquidation-event.js +0 -14
  92. package/dist/es/api-model/models/fee-component.js +0 -14
  93. package/dist/es/api-model/models/financial-event-group.js +0 -14
  94. package/dist/es/api-model/models/financial-events.js +0 -14
  95. package/dist/es/api-model/models/imaging-services-fee-event.js +0 -14
  96. package/dist/es/api-model/models/index.js +0 -51
  97. package/dist/es/api-model/models/list-financial-event-groups-payload.js +0 -14
  98. package/dist/es/api-model/models/list-financial-event-groups-response.js +0 -14
  99. package/dist/es/api-model/models/list-financial-events-payload.js +0 -14
  100. package/dist/es/api-model/models/list-financial-events-response.js +0 -14
  101. package/dist/es/api-model/models/loan-servicing-event.js +0 -14
  102. package/dist/es/api-model/models/model-error.js +0 -14
  103. package/dist/es/api-model/models/network-commingling-transaction-event.js +0 -14
  104. package/dist/es/api-model/models/pay-with-amazon-event.js +0 -14
  105. package/dist/es/api-model/models/product-ads-payment-event.js +0 -14
  106. package/dist/es/api-model/models/promotion.js +0 -14
  107. package/dist/es/api-model/models/removal-shipment-adjustment-event.js +0 -14
  108. package/dist/es/api-model/models/removal-shipment-event.js +0 -14
  109. package/dist/es/api-model/models/removal-shipment-item-adjustment.js +0 -14
  110. package/dist/es/api-model/models/removal-shipment-item.js +0 -14
  111. package/dist/es/api-model/models/rental-transaction-event.js +0 -14
  112. package/dist/es/api-model/models/retrocharge-event.js +0 -14
  113. package/dist/es/api-model/models/safetreimbursement-event.js +0 -14
  114. package/dist/es/api-model/models/safetreimbursement-item.js +0 -14
  115. package/dist/es/api-model/models/seller-deal-payment-event.js +0 -14
  116. package/dist/es/api-model/models/seller-review-enrollment-payment-event.js +0 -14
  117. package/dist/es/api-model/models/service-fee-event.js +0 -14
  118. package/dist/es/api-model/models/shipment-event.js +0 -14
  119. package/dist/es/api-model/models/shipment-item.js +0 -14
  120. package/dist/es/api-model/models/solution-provider-credit-event.js +0 -14
  121. package/dist/es/api-model/models/tax-withheld-component.js +0 -14
  122. package/dist/es/api-model/models/tax-withholding-event.js +0 -14
  123. package/dist/es/api-model/models/tax-withholding-period.js +0 -14
  124. package/dist/es/api-model/models/tdsreimbursement-event.js +0 -14
  125. package/dist/es/api-model/models/trial-shipment-event.js +0 -14
  126. package/dist/es/api-model/models/value-added-service-charge-event.js +0 -14
  127. package/dist/es/client.js +0 -38
  128. package/dist/es/index.js +0 -2
  129. package/dist/types/api-model/api.d.ts +0 -12
  130. package/dist/types/api-model/base.d.ts +0 -42
  131. package/dist/types/api-model/common.d.ts +0 -34
  132. package/dist/types/api-model/configuration.d.ts +0 -98
  133. package/dist/types/api-model/index.d.ts +0 -14
  134. package/dist/types/api-model/models/adhoc-disbursement-event.d.ts +0 -30
  135. package/dist/types/api-model/models/adjustment-event.d.ts +0 -35
  136. package/dist/types/api-model/models/adjustment-item.d.ts +0 -43
  137. package/dist/types/api-model/models/affordability-expense-event.d.ts +0 -38
  138. package/dist/types/api-model/models/capacity-reservation-billing-event.d.ts +0 -30
  139. package/dist/types/api-model/models/charge-component.d.ts +0 -22
  140. package/dist/types/api-model/models/charge-instrument.d.ts +0 -26
  141. package/dist/types/api-model/models/charge-refund-event.d.ts +0 -33
  142. package/dist/types/api-model/models/charge-refund-transaction.d.ts +0 -22
  143. package/dist/types/api-model/models/coupon-payment-event.d.ts +0 -42
  144. package/dist/types/api-model/models/currency.d.ts +0 -24
  145. package/dist/types/api-model/models/debt-recovery-event.d.ts +0 -33
  146. package/dist/types/api-model/models/debt-recovery-item.d.ts +0 -27
  147. package/dist/types/api-model/models/direct-payment.d.ts +0 -22
  148. package/dist/types/api-model/models/ebtrefund-reimbursement-only-event.d.ts +0 -26
  149. package/dist/types/api-model/models/failed-adhoc-disbursement-event.d.ts +0 -42
  150. package/dist/types/api-model/models/fbaliquidation-event.d.ts +0 -27
  151. package/dist/types/api-model/models/fee-component.d.ts +0 -22
  152. package/dist/types/api-model/models/financial-event-group.d.ts +0 -52
  153. package/dist/types/api-model/models/financial-events.d.ts +0 -181
  154. package/dist/types/api-model/models/imaging-services-fee-event.d.ts +0 -33
  155. package/dist/types/api-model/models/index.d.ts +0 -51
  156. package/dist/types/api-model/models/list-financial-event-groups-payload.d.ts +0 -25
  157. package/dist/types/api-model/models/list-financial-event-groups-response.d.ts +0 -22
  158. package/dist/types/api-model/models/list-financial-events-payload.d.ts +0 -22
  159. package/dist/types/api-model/models/list-financial-events-response.d.ts +0 -22
  160. package/dist/types/api-model/models/loan-servicing-event.d.ts +0 -22
  161. package/dist/types/api-model/models/model-error.d.ts +0 -28
  162. package/dist/types/api-model/models/network-commingling-transaction-event.d.ts +0 -43
  163. package/dist/types/api-model/models/pay-with-amazon-event.d.ts +0 -55
  164. package/dist/types/api-model/models/product-ads-payment-event.d.ts +0 -32
  165. package/dist/types/api-model/models/promotion.d.ts +0 -26
  166. package/dist/types/api-model/models/removal-shipment-adjustment-event.d.ts +0 -41
  167. package/dist/types/api-model/models/removal-shipment-event.d.ts +0 -41
  168. package/dist/types/api-model/models/removal-shipment-item-adjustment.d.ts +0 -36
  169. package/dist/types/api-model/models/removal-shipment-item.d.ts +0 -37
  170. package/dist/types/api-model/models/rental-transaction-event.d.ts +0 -54
  171. package/dist/types/api-model/models/retrocharge-event.d.ts +0 -40
  172. package/dist/types/api-model/models/safetreimbursement-event.d.ts +0 -35
  173. package/dist/types/api-model/models/safetreimbursement-item.d.ts +0 -29
  174. package/dist/types/api-model/models/seller-deal-payment-event.d.ts +0 -40
  175. package/dist/types/api-model/models/seller-review-enrollment-payment-event.d.ts +0 -34
  176. package/dist/types/api-model/models/service-fee-event.d.ts +0 -49
  177. package/dist/types/api-model/models/shipment-event.d.ts +0 -76
  178. package/dist/types/api-model/models/shipment-item.d.ts +0 -67
  179. package/dist/types/api-model/models/solution-provider-credit-event.d.ts +0 -54
  180. package/dist/types/api-model/models/tax-withheld-component.d.ts +0 -25
  181. package/dist/types/api-model/models/tax-withholding-event.d.ts +0 -25
  182. package/dist/types/api-model/models/tax-withholding-period.d.ts +0 -24
  183. package/dist/types/api-model/models/tdsreimbursement-event.d.ts +0 -26
  184. package/dist/types/api-model/models/trial-shipment-event.d.ts +0 -37
  185. package/dist/types/api-model/models/value-added-service-charge-event.d.ts +0 -30
  186. package/dist/types/client.d.ts +0 -6
  187. package/dist/types/index.d.ts +0 -3
@@ -1,365 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Selling Partner API for Finances
6
- * The Selling Partner API for Finances provides financial information that is relevant to a seller\'s business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range.
7
- *
8
- * The version of the OpenAPI document: v0
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __importDefault = (this && this.__importDefault) || function (mod) {
16
- return (mod && mod.__esModule) ? mod : { "default": mod };
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.FinancesApi = exports.FinancesApiFactory = exports.FinancesApiFp = exports.FinancesApiAxiosParamCreator = void 0;
20
- const axios_1 = __importDefault(require("axios"));
21
- // Some imports not used depending on template conditions
22
- // @ts-ignore
23
- const common_1 = require("../common");
24
- // @ts-ignore
25
- const base_1 = require("../base");
26
- /**
27
- * FinancesApi - axios parameter creator
28
- */
29
- const FinancesApiAxiosParamCreator = function (configuration) {
30
- return {
31
- /**
32
- * 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).
33
- * @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`.
34
- * @param {string} [financialEventGroupStartedBefore] A date that selects financial event groups that opened before (but not at) a specified date and time, in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be after `FinancialEventGroupStartedAfter` and more than two minutes before the time of request. If `FinancialEventGroupStartedAfter` and `FinancialEventGroupStartedBefore` are more than 180 days apart, no financial event groups are returned.
35
- * @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.
36
- * @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
37
- * @param {*} [options] Override http request option.
38
- * @throws {RequiredError}
39
- */
40
- listFinancialEventGroups: async (maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options = {}) => {
41
- const localVarPath = `/finances/v0/financialEventGroups`;
42
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
43
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
44
- let baseOptions;
45
- if (configuration) {
46
- baseOptions = configuration.baseOptions;
47
- }
48
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
49
- const localVarHeaderParameter = {};
50
- const localVarQueryParameter = {};
51
- if (maxResultsPerPage !== undefined) {
52
- localVarQueryParameter['MaxResultsPerPage'] = maxResultsPerPage;
53
- }
54
- if (financialEventGroupStartedBefore !== undefined) {
55
- localVarQueryParameter['FinancialEventGroupStartedBefore'] = (financialEventGroupStartedBefore instanceof Date) ?
56
- financialEventGroupStartedBefore.toISOString() :
57
- financialEventGroupStartedBefore;
58
- }
59
- if (financialEventGroupStartedAfter !== undefined) {
60
- localVarQueryParameter['FinancialEventGroupStartedAfter'] = (financialEventGroupStartedAfter instanceof Date) ?
61
- financialEventGroupStartedAfter.toISOString() :
62
- financialEventGroupStartedAfter;
63
- }
64
- if (nextToken !== undefined) {
65
- localVarQueryParameter['NextToken'] = nextToken;
66
- }
67
- localVarHeaderParameter['Accept'] = 'application/json';
68
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
69
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
70
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
71
- return {
72
- url: (0, common_1.toPathString)(localVarUrlObj),
73
- options: localVarRequestOptions,
74
- };
75
- },
76
- /**
77
- * 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).
78
- * @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`.
79
- * @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.
80
- * @param {string} [postedBefore] The response includes financial events posted before (but not on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be later than `PostedAfter` and more than two minutes before the request was submitted. If `PostedAfter` and `PostedBefore` are more than 180 days apart, the response is empty. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
81
- * @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
82
- * @param {*} [options] Override http request option.
83
- * @throws {RequiredError}
84
- */
85
- listFinancialEvents: async (maxResultsPerPage, postedAfter, postedBefore, nextToken, options = {}) => {
86
- const localVarPath = `/finances/v0/financialEvents`;
87
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
88
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
89
- let baseOptions;
90
- if (configuration) {
91
- baseOptions = configuration.baseOptions;
92
- }
93
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
94
- const localVarHeaderParameter = {};
95
- const localVarQueryParameter = {};
96
- if (maxResultsPerPage !== undefined) {
97
- localVarQueryParameter['MaxResultsPerPage'] = maxResultsPerPage;
98
- }
99
- if (postedAfter !== undefined) {
100
- localVarQueryParameter['PostedAfter'] = (postedAfter instanceof Date) ?
101
- postedAfter.toISOString() :
102
- postedAfter;
103
- }
104
- if (postedBefore !== undefined) {
105
- localVarQueryParameter['PostedBefore'] = (postedBefore instanceof Date) ?
106
- postedBefore.toISOString() :
107
- postedBefore;
108
- }
109
- if (nextToken !== undefined) {
110
- localVarQueryParameter['NextToken'] = nextToken;
111
- }
112
- localVarHeaderParameter['Accept'] = 'application/json';
113
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
114
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
115
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
116
- return {
117
- url: (0, common_1.toPathString)(localVarUrlObj),
118
- options: localVarRequestOptions,
119
- };
120
- },
121
- /**
122
- * 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).
123
- * @param {string} eventGroupId The identifier of the financial event group to which the events belong.
124
- * @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`.
125
- * @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.
126
- * @param {string} [postedBefore] The response includes financial events posted before (but not on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be later than `PostedAfter` and more than two minutes before the request was submitted. If `PostedAfter` and `PostedBefore` are more than 180 days apart, the response is empty. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
127
- * @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
128
- * @param {*} [options] Override http request option.
129
- * @throws {RequiredError}
130
- */
131
- listFinancialEventsByGroupId: async (eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options = {}) => {
132
- // verify required parameter 'eventGroupId' is not null or undefined
133
- (0, common_1.assertParamExists)('listFinancialEventsByGroupId', 'eventGroupId', eventGroupId);
134
- const localVarPath = `/finances/v0/financialEventGroups/{eventGroupId}/financialEvents`
135
- .replace(`{${"eventGroupId"}}`, encodeURIComponent(String(eventGroupId)));
136
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
137
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
138
- let baseOptions;
139
- if (configuration) {
140
- baseOptions = configuration.baseOptions;
141
- }
142
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
143
- const localVarHeaderParameter = {};
144
- const localVarQueryParameter = {};
145
- if (maxResultsPerPage !== undefined) {
146
- localVarQueryParameter['MaxResultsPerPage'] = maxResultsPerPage;
147
- }
148
- if (postedAfter !== undefined) {
149
- localVarQueryParameter['PostedAfter'] = (postedAfter instanceof Date) ?
150
- postedAfter.toISOString() :
151
- postedAfter;
152
- }
153
- if (postedBefore !== undefined) {
154
- localVarQueryParameter['PostedBefore'] = (postedBefore instanceof Date) ?
155
- postedBefore.toISOString() :
156
- postedBefore;
157
- }
158
- if (nextToken !== undefined) {
159
- localVarQueryParameter['NextToken'] = nextToken;
160
- }
161
- localVarHeaderParameter['Accept'] = 'application/json';
162
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
163
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
164
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
165
- return {
166
- url: (0, common_1.toPathString)(localVarUrlObj),
167
- options: localVarRequestOptions,
168
- };
169
- },
170
- /**
171
- * 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).
172
- * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
173
- * @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`.
174
- * @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
175
- * @param {*} [options] Override http request option.
176
- * @throws {RequiredError}
177
- */
178
- listFinancialEventsByOrderId: async (orderId, maxResultsPerPage, nextToken, options = {}) => {
179
- // verify required parameter 'orderId' is not null or undefined
180
- (0, common_1.assertParamExists)('listFinancialEventsByOrderId', 'orderId', orderId);
181
- const localVarPath = `/finances/v0/orders/{orderId}/financialEvents`
182
- .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
183
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
184
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
185
- let baseOptions;
186
- if (configuration) {
187
- baseOptions = configuration.baseOptions;
188
- }
189
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
190
- const localVarHeaderParameter = {};
191
- const localVarQueryParameter = {};
192
- if (maxResultsPerPage !== undefined) {
193
- localVarQueryParameter['MaxResultsPerPage'] = maxResultsPerPage;
194
- }
195
- if (nextToken !== undefined) {
196
- localVarQueryParameter['NextToken'] = nextToken;
197
- }
198
- localVarHeaderParameter['Accept'] = 'application/json';
199
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
200
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
201
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
202
- return {
203
- url: (0, common_1.toPathString)(localVarUrlObj),
204
- options: localVarRequestOptions,
205
- };
206
- },
207
- };
208
- };
209
- exports.FinancesApiAxiosParamCreator = FinancesApiAxiosParamCreator;
210
- /**
211
- * FinancesApi - functional programming interface
212
- */
213
- const FinancesApiFp = function (configuration) {
214
- const localVarAxiosParamCreator = (0, exports.FinancesApiAxiosParamCreator)(configuration);
215
- return {
216
- /**
217
- * 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).
218
- * @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`.
219
- * @param {string} [financialEventGroupStartedBefore] A date that selects financial event groups that opened before (but not at) a specified date and time, in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be after `FinancialEventGroupStartedAfter` and more than two minutes before the time of request. If `FinancialEventGroupStartedAfter` and `FinancialEventGroupStartedBefore` are more than 180 days apart, no financial event groups are returned.
220
- * @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.
221
- * @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
222
- * @param {*} [options] Override http request option.
223
- * @throws {RequiredError}
224
- */
225
- async listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options) {
226
- const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options);
227
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
228
- const localVarOperationServerBasePath = base_1.operationServerMap['FinancesApi.listFinancialEventGroups']?.[localVarOperationServerIndex]?.url;
229
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
230
- },
231
- /**
232
- * 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).
233
- * @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`.
234
- * @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.
235
- * @param {string} [postedBefore] The response includes financial events posted before (but not on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be later than `PostedAfter` and more than two minutes before the request was submitted. If `PostedAfter` and `PostedBefore` are more than 180 days apart, the response is empty. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
236
- * @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
237
- * @param {*} [options] Override http request option.
238
- * @throws {RequiredError}
239
- */
240
- async listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options) {
241
- const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options);
242
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
243
- const localVarOperationServerBasePath = base_1.operationServerMap['FinancesApi.listFinancialEvents']?.[localVarOperationServerIndex]?.url;
244
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
245
- },
246
- /**
247
- * 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).
248
- * @param {string} eventGroupId The identifier of the financial event group to which the events belong.
249
- * @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`.
250
- * @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.
251
- * @param {string} [postedBefore] The response includes financial events posted before (but not on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be later than `PostedAfter` and more than two minutes before the request was submitted. If `PostedAfter` and `PostedBefore` are more than 180 days apart, the response is empty. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
252
- * @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
253
- * @param {*} [options] Override http request option.
254
- * @throws {RequiredError}
255
- */
256
- async listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options) {
257
- const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options);
258
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
259
- const localVarOperationServerBasePath = base_1.operationServerMap['FinancesApi.listFinancialEventsByGroupId']?.[localVarOperationServerIndex]?.url;
260
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
261
- },
262
- /**
263
- * 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).
264
- * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
265
- * @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`.
266
- * @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
267
- * @param {*} [options] Override http request option.
268
- * @throws {RequiredError}
269
- */
270
- async listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options) {
271
- const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options);
272
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
273
- const localVarOperationServerBasePath = base_1.operationServerMap['FinancesApi.listFinancialEventsByOrderId']?.[localVarOperationServerIndex]?.url;
274
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
275
- },
276
- };
277
- };
278
- exports.FinancesApiFp = FinancesApiFp;
279
- /**
280
- * FinancesApi - factory interface
281
- */
282
- const FinancesApiFactory = function (configuration, basePath, axios) {
283
- const localVarFp = (0, exports.FinancesApiFp)(configuration);
284
- return {
285
- /**
286
- * 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).
287
- * @param {FinancesApiListFinancialEventGroupsRequest} requestParameters Request parameters.
288
- * @param {*} [options] Override http request option.
289
- * @throws {RequiredError}
290
- */
291
- listFinancialEventGroups(requestParameters = {}, options) {
292
- return localVarFp.listFinancialEventGroups(requestParameters.maxResultsPerPage, requestParameters.financialEventGroupStartedBefore, requestParameters.financialEventGroupStartedAfter, requestParameters.nextToken, options).then((request) => request(axios, basePath));
293
- },
294
- /**
295
- * 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).
296
- * @param {FinancesApiListFinancialEventsRequest} requestParameters Request parameters.
297
- * @param {*} [options] Override http request option.
298
- * @throws {RequiredError}
299
- */
300
- listFinancialEvents(requestParameters = {}, options) {
301
- return localVarFp.listFinancialEvents(requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(axios, basePath));
302
- },
303
- /**
304
- * 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).
305
- * @param {FinancesApiListFinancialEventsByGroupIdRequest} requestParameters Request parameters.
306
- * @param {*} [options] Override http request option.
307
- * @throws {RequiredError}
308
- */
309
- listFinancialEventsByGroupId(requestParameters, options) {
310
- return localVarFp.listFinancialEventsByGroupId(requestParameters.eventGroupId, requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(axios, basePath));
311
- },
312
- /**
313
- * 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).
314
- * @param {FinancesApiListFinancialEventsByOrderIdRequest} requestParameters Request parameters.
315
- * @param {*} [options] Override http request option.
316
- * @throws {RequiredError}
317
- */
318
- listFinancialEventsByOrderId(requestParameters, options) {
319
- return localVarFp.listFinancialEventsByOrderId(requestParameters.orderId, requestParameters.maxResultsPerPage, requestParameters.nextToken, options).then((request) => request(axios, basePath));
320
- },
321
- };
322
- };
323
- exports.FinancesApiFactory = FinancesApiFactory;
324
- /**
325
- * FinancesApi - object-oriented interface
326
- */
327
- class FinancesApi extends base_1.BaseAPI {
328
- /**
329
- * 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).
330
- * @param {FinancesApiListFinancialEventGroupsRequest} requestParameters Request parameters.
331
- * @param {*} [options] Override http request option.
332
- * @throws {RequiredError}
333
- */
334
- listFinancialEventGroups(requestParameters = {}, options) {
335
- return (0, exports.FinancesApiFp)(this.configuration).listFinancialEventGroups(requestParameters.maxResultsPerPage, requestParameters.financialEventGroupStartedBefore, requestParameters.financialEventGroupStartedAfter, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
336
- }
337
- /**
338
- * 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).
339
- * @param {FinancesApiListFinancialEventsRequest} requestParameters Request parameters.
340
- * @param {*} [options] Override http request option.
341
- * @throws {RequiredError}
342
- */
343
- listFinancialEvents(requestParameters = {}, options) {
344
- return (0, exports.FinancesApiFp)(this.configuration).listFinancialEvents(requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
345
- }
346
- /**
347
- * 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).
348
- * @param {FinancesApiListFinancialEventsByGroupIdRequest} requestParameters Request parameters.
349
- * @param {*} [options] Override http request option.
350
- * @throws {RequiredError}
351
- */
352
- listFinancialEventsByGroupId(requestParameters, options) {
353
- return (0, exports.FinancesApiFp)(this.configuration).listFinancialEventsByGroupId(requestParameters.eventGroupId, requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
354
- }
355
- /**
356
- * 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).
357
- * @param {FinancesApiListFinancialEventsByOrderIdRequest} requestParameters Request parameters.
358
- * @param {*} [options] Override http request option.
359
- * @throws {RequiredError}
360
- */
361
- listFinancialEventsByOrderId(requestParameters, options) {
362
- return (0, exports.FinancesApiFp)(this.configuration).listFinancialEventsByOrderId(requestParameters.orderId, requestParameters.maxResultsPerPage, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
363
- }
364
- }
365
- exports.FinancesApi = FinancesApi;
@@ -1,30 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Selling Partner API for Finances
6
- * The Selling Partner API for Finances provides financial information that is relevant to a seller\'s business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range.
7
- *
8
- * The version of the OpenAPI document: v0
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- var desc = Object.getOwnPropertyDescriptor(m, k);
18
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
- desc = { enumerable: true, get: function() { return m[k]; } };
20
- }
21
- Object.defineProperty(o, k2, desc);
22
- }) : (function(o, m, k, k2) {
23
- if (k2 === undefined) k2 = k;
24
- o[k2] = m[k];
25
- }));
26
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
- };
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- __exportStar(require("./api/finances-api"), exports);
@@ -1,52 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Selling Partner API for Finances
6
- * The Selling Partner API for Finances provides financial information that is relevant to a seller\'s business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range.
7
- *
8
- * The version of the OpenAPI document: v0
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __importDefault = (this && this.__importDefault) || function (mod) {
16
- return (mod && mod.__esModule) ? mod : { "default": mod };
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
20
- const axios_1 = __importDefault(require("axios"));
21
- exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
22
- exports.COLLECTION_FORMATS = {
23
- csv: ",",
24
- ssv: " ",
25
- tsv: "\t",
26
- pipes: "|",
27
- };
28
- class BaseAPI {
29
- basePath;
30
- axios;
31
- configuration;
32
- constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
33
- this.basePath = basePath;
34
- this.axios = axios;
35
- if (configuration) {
36
- this.configuration = configuration;
37
- this.basePath = configuration.basePath ?? basePath;
38
- }
39
- }
40
- }
41
- exports.BaseAPI = BaseAPI;
42
- ;
43
- class RequiredError extends Error {
44
- field;
45
- constructor(field, msg) {
46
- super(msg);
47
- this.field = field;
48
- this.name = "RequiredError";
49
- }
50
- }
51
- exports.RequiredError = RequiredError;
52
- exports.operationServerMap = {};
@@ -1,123 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Selling Partner API for Finances
6
- * The Selling Partner API for Finances provides financial information that is relevant to a seller\'s business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range.
7
- *
8
- * The version of the OpenAPI document: v0
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.replaceWithSerializableTypeIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
17
- const base_1 = require("./base");
18
- exports.DUMMY_BASE_URL = 'https://example.com';
19
- /**
20
- *
21
- * @throws {RequiredError}
22
- */
23
- const assertParamExists = function (functionName, paramName, paramValue) {
24
- if (paramValue === null || paramValue === undefined) {
25
- throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
26
- }
27
- };
28
- exports.assertParamExists = assertParamExists;
29
- const setApiKeyToObject = async function (object, keyParamName, configuration) {
30
- if (configuration && configuration.apiKey) {
31
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
32
- ? await configuration.apiKey(keyParamName)
33
- : await configuration.apiKey;
34
- object[keyParamName] = localVarApiKeyValue;
35
- }
36
- };
37
- exports.setApiKeyToObject = setApiKeyToObject;
38
- const setBasicAuthToObject = function (object, configuration) {
39
- if (configuration && (configuration.username || configuration.password)) {
40
- object["auth"] = { username: configuration.username, password: configuration.password };
41
- }
42
- };
43
- exports.setBasicAuthToObject = setBasicAuthToObject;
44
- const setBearerAuthToObject = async function (object, configuration) {
45
- if (configuration && configuration.accessToken) {
46
- const accessToken = typeof configuration.accessToken === 'function'
47
- ? await configuration.accessToken()
48
- : await configuration.accessToken;
49
- object["Authorization"] = "Bearer " + accessToken;
50
- }
51
- };
52
- exports.setBearerAuthToObject = setBearerAuthToObject;
53
- const setOAuthToObject = async function (object, name, scopes, configuration) {
54
- if (configuration && configuration.accessToken) {
55
- const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
56
- ? await configuration.accessToken(name, scopes)
57
- : await configuration.accessToken;
58
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
59
- }
60
- };
61
- exports.setOAuthToObject = setOAuthToObject;
62
- function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
63
- if (parameter == null)
64
- return;
65
- if (typeof parameter === "object") {
66
- if (Array.isArray(parameter) || parameter instanceof Set) {
67
- parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
68
- }
69
- else {
70
- Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
71
- }
72
- }
73
- else {
74
- if (urlSearchParams.has(key)) {
75
- urlSearchParams.append(key, parameter);
76
- }
77
- else {
78
- urlSearchParams.set(key, parameter);
79
- }
80
- }
81
- }
82
- const setSearchParams = function (url, ...objects) {
83
- const searchParams = new URLSearchParams(url.search);
84
- setFlattenedQueryParams(searchParams, objects);
85
- url.search = searchParams.toString();
86
- };
87
- exports.setSearchParams = setSearchParams;
88
- /**
89
- * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
90
- * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
91
- * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
92
- */
93
- // @ts-ignore
94
- const replaceWithSerializableTypeIfNeeded = function (key, value) {
95
- if (value instanceof Set) {
96
- return Array.from(value);
97
- }
98
- else {
99
- return value;
100
- }
101
- };
102
- exports.replaceWithSerializableTypeIfNeeded = replaceWithSerializableTypeIfNeeded;
103
- const serializeDataIfNeeded = function (value, requestOptions, configuration) {
104
- const nonString = typeof value !== 'string';
105
- const needsSerialization = nonString && configuration && configuration.isJsonMime
106
- ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
107
- : nonString;
108
- return needsSerialization
109
- ? JSON.stringify(value !== undefined ? value : {}, exports.replaceWithSerializableTypeIfNeeded)
110
- : (value || "");
111
- };
112
- exports.serializeDataIfNeeded = serializeDataIfNeeded;
113
- const toPathString = function (url) {
114
- return url.pathname + url.search + url.hash;
115
- };
116
- exports.toPathString = toPathString;
117
- const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
118
- return (axios = globalAxios, basePath = BASE_PATH) => {
119
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
120
- return axios.request(axiosRequestArgs);
121
- };
122
- };
123
- exports.createRequestFunction = createRequestFunction;