@sp-api-sdk/finances-api-v0 1.7.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 (165) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -0
  3. package/dist/cjs/index.js +6 -0
  4. package/dist/cjs/src/api-model/api/default-api.js +357 -0
  5. package/dist/cjs/src/api-model/api.js +17 -0
  6. package/dist/cjs/src/api-model/base.js +62 -0
  7. package/dist/cjs/src/api-model/common.js +137 -0
  8. package/dist/cjs/src/api-model/configuration.js +42 -0
  9. package/dist/cjs/src/api-model/index.js +19 -0
  10. package/dist/cjs/src/api-model/models/adjustment-event.js +15 -0
  11. package/dist/cjs/src/api-model/models/adjustment-item.js +15 -0
  12. package/dist/cjs/src/api-model/models/affordability-expense-event.js +15 -0
  13. package/dist/cjs/src/api-model/models/charge-component.js +15 -0
  14. package/dist/cjs/src/api-model/models/charge-instrument.js +15 -0
  15. package/dist/cjs/src/api-model/models/coupon-payment-event.js +15 -0
  16. package/dist/cjs/src/api-model/models/currency.js +15 -0
  17. package/dist/cjs/src/api-model/models/debt-recovery-event.js +15 -0
  18. package/dist/cjs/src/api-model/models/debt-recovery-item.js +15 -0
  19. package/dist/cjs/src/api-model/models/direct-payment.js +15 -0
  20. package/dist/cjs/src/api-model/models/fbaliquidation-event.js +15 -0
  21. package/dist/cjs/src/api-model/models/fee-component.js +15 -0
  22. package/dist/cjs/src/api-model/models/financial-event-group.js +15 -0
  23. package/dist/cjs/src/api-model/models/financial-events.js +15 -0
  24. package/dist/cjs/src/api-model/models/imaging-services-fee-event.js +15 -0
  25. package/dist/cjs/src/api-model/models/index.js +46 -0
  26. package/dist/cjs/src/api-model/models/list-financial-event-groups-payload.js +15 -0
  27. package/dist/cjs/src/api-model/models/list-financial-event-groups-response.js +15 -0
  28. package/dist/cjs/src/api-model/models/list-financial-events-payload.js +15 -0
  29. package/dist/cjs/src/api-model/models/list-financial-events-response.js +15 -0
  30. package/dist/cjs/src/api-model/models/loan-servicing-event.js +15 -0
  31. package/dist/cjs/src/api-model/models/model-error.js +15 -0
  32. package/dist/cjs/src/api-model/models/network-commingling-transaction-event.js +15 -0
  33. package/dist/cjs/src/api-model/models/pay-with-amazon-event.js +15 -0
  34. package/dist/cjs/src/api-model/models/product-ads-payment-event.js +15 -0
  35. package/dist/cjs/src/api-model/models/promotion.js +15 -0
  36. package/dist/cjs/src/api-model/models/removal-shipment-adjustment-event.js +15 -0
  37. package/dist/cjs/src/api-model/models/removal-shipment-event.js +15 -0
  38. package/dist/cjs/src/api-model/models/removal-shipment-item-adjustment.js +15 -0
  39. package/dist/cjs/src/api-model/models/removal-shipment-item.js +15 -0
  40. package/dist/cjs/src/api-model/models/rental-transaction-event.js +15 -0
  41. package/dist/cjs/src/api-model/models/retrocharge-event.js +15 -0
  42. package/dist/cjs/src/api-model/models/safetreimbursement-event.js +15 -0
  43. package/dist/cjs/src/api-model/models/safetreimbursement-item.js +15 -0
  44. package/dist/cjs/src/api-model/models/seller-deal-payment-event.js +15 -0
  45. package/dist/cjs/src/api-model/models/seller-review-enrollment-payment-event.js +15 -0
  46. package/dist/cjs/src/api-model/models/service-fee-event.js +15 -0
  47. package/dist/cjs/src/api-model/models/shipment-event.js +15 -0
  48. package/dist/cjs/src/api-model/models/shipment-item.js +15 -0
  49. package/dist/cjs/src/api-model/models/solution-provider-credit-event.js +15 -0
  50. package/dist/cjs/src/api-model/models/tax-withheld-component.js +15 -0
  51. package/dist/cjs/src/api-model/models/tax-withholding-event.js +15 -0
  52. package/dist/cjs/src/api-model/models/tax-withholding-period.js +15 -0
  53. package/dist/cjs/src/api-model/models/tdsreimbursement-event.js +15 -0
  54. package/dist/cjs/src/api-model/models/trial-shipment-event.js +15 -0
  55. package/dist/cjs/src/client.js +53 -0
  56. package/dist/cjs/src/error.js +10 -0
  57. package/dist/es/index.js +3 -0
  58. package/dist/es/src/api-model/api/default-api.js +349 -0
  59. package/dist/es/src/api-model/api.js +14 -0
  60. package/dist/es/src/api-model/base.js +56 -0
  61. package/dist/es/src/api-model/common.js +125 -0
  62. package/dist/es/src/api-model/configuration.js +38 -0
  63. package/dist/es/src/api-model/index.js +16 -0
  64. package/dist/es/src/api-model/models/adjustment-event.js +14 -0
  65. package/dist/es/src/api-model/models/adjustment-item.js +14 -0
  66. package/dist/es/src/api-model/models/affordability-expense-event.js +14 -0
  67. package/dist/es/src/api-model/models/charge-component.js +14 -0
  68. package/dist/es/src/api-model/models/charge-instrument.js +14 -0
  69. package/dist/es/src/api-model/models/coupon-payment-event.js +14 -0
  70. package/dist/es/src/api-model/models/currency.js +14 -0
  71. package/dist/es/src/api-model/models/debt-recovery-event.js +14 -0
  72. package/dist/es/src/api-model/models/debt-recovery-item.js +14 -0
  73. package/dist/es/src/api-model/models/direct-payment.js +14 -0
  74. package/dist/es/src/api-model/models/fbaliquidation-event.js +14 -0
  75. package/dist/es/src/api-model/models/fee-component.js +14 -0
  76. package/dist/es/src/api-model/models/financial-event-group.js +14 -0
  77. package/dist/es/src/api-model/models/financial-events.js +14 -0
  78. package/dist/es/src/api-model/models/imaging-services-fee-event.js +14 -0
  79. package/dist/es/src/api-model/models/index.js +43 -0
  80. package/dist/es/src/api-model/models/list-financial-event-groups-payload.js +14 -0
  81. package/dist/es/src/api-model/models/list-financial-event-groups-response.js +14 -0
  82. package/dist/es/src/api-model/models/list-financial-events-payload.js +14 -0
  83. package/dist/es/src/api-model/models/list-financial-events-response.js +14 -0
  84. package/dist/es/src/api-model/models/loan-servicing-event.js +14 -0
  85. package/dist/es/src/api-model/models/model-error.js +14 -0
  86. package/dist/es/src/api-model/models/network-commingling-transaction-event.js +14 -0
  87. package/dist/es/src/api-model/models/pay-with-amazon-event.js +14 -0
  88. package/dist/es/src/api-model/models/product-ads-payment-event.js +14 -0
  89. package/dist/es/src/api-model/models/promotion.js +14 -0
  90. package/dist/es/src/api-model/models/removal-shipment-adjustment-event.js +14 -0
  91. package/dist/es/src/api-model/models/removal-shipment-event.js +14 -0
  92. package/dist/es/src/api-model/models/removal-shipment-item-adjustment.js +14 -0
  93. package/dist/es/src/api-model/models/removal-shipment-item.js +14 -0
  94. package/dist/es/src/api-model/models/rental-transaction-event.js +14 -0
  95. package/dist/es/src/api-model/models/retrocharge-event.js +14 -0
  96. package/dist/es/src/api-model/models/safetreimbursement-event.js +14 -0
  97. package/dist/es/src/api-model/models/safetreimbursement-item.js +14 -0
  98. package/dist/es/src/api-model/models/seller-deal-payment-event.js +14 -0
  99. package/dist/es/src/api-model/models/seller-review-enrollment-payment-event.js +14 -0
  100. package/dist/es/src/api-model/models/service-fee-event.js +14 -0
  101. package/dist/es/src/api-model/models/shipment-event.js +14 -0
  102. package/dist/es/src/api-model/models/shipment-item.js +14 -0
  103. package/dist/es/src/api-model/models/solution-provider-credit-event.js +14 -0
  104. package/dist/es/src/api-model/models/tax-withheld-component.js +14 -0
  105. package/dist/es/src/api-model/models/tax-withholding-event.js +14 -0
  106. package/dist/es/src/api-model/models/tax-withholding-period.js +14 -0
  107. package/dist/es/src/api-model/models/tdsreimbursement-event.js +14 -0
  108. package/dist/es/src/api-model/models/trial-shipment-event.js +14 -0
  109. package/dist/es/src/client.js +49 -0
  110. package/dist/es/src/error.js +6 -0
  111. package/dist/types/index.d.ts +3 -0
  112. package/dist/types/src/api-model/api/default-api.d.ts +300 -0
  113. package/dist/types/src/api-model/api.d.ts +12 -0
  114. package/dist/types/src/api-model/base.d.ts +55 -0
  115. package/dist/types/src/api-model/common.d.ts +65 -0
  116. package/dist/types/src/api-model/configuration.d.ts +83 -0
  117. package/dist/types/src/api-model/index.d.ts +14 -0
  118. package/dist/types/src/api-model/models/adjustment-event.d.ts +44 -0
  119. package/dist/types/src/api-model/models/adjustment-item.d.ts +61 -0
  120. package/dist/types/src/api-model/models/affordability-expense-event.d.ts +73 -0
  121. package/dist/types/src/api-model/models/charge-component.d.ts +31 -0
  122. package/dist/types/src/api-model/models/charge-instrument.d.ts +37 -0
  123. package/dist/types/src/api-model/models/coupon-payment-event.d.ts +69 -0
  124. package/dist/types/src/api-model/models/currency.d.ts +30 -0
  125. package/dist/types/src/api-model/models/debt-recovery-event.d.ts +51 -0
  126. package/dist/types/src/api-model/models/debt-recovery-item.d.ts +43 -0
  127. package/dist/types/src/api-model/models/direct-payment.d.ts +31 -0
  128. package/dist/types/src/api-model/models/fbaliquidation-event.d.ts +43 -0
  129. package/dist/types/src/api-model/models/fee-component.d.ts +31 -0
  130. package/dist/types/src/api-model/models/financial-event-group.d.ts +85 -0
  131. package/dist/types/src/api-model/models/financial-events.d.ts +202 -0
  132. package/dist/types/src/api-model/models/imaging-services-fee-event.d.ts +43 -0
  133. package/dist/types/src/api-model/models/index.d.ts +43 -0
  134. package/dist/types/src/api-model/models/list-financial-event-groups-payload.d.ts +31 -0
  135. package/dist/types/src/api-model/models/list-financial-event-groups-response.d.ts +31 -0
  136. package/dist/types/src/api-model/models/list-financial-events-payload.d.ts +31 -0
  137. package/dist/types/src/api-model/models/list-financial-events-response.d.ts +31 -0
  138. package/dist/types/src/api-model/models/loan-servicing-event.d.ts +31 -0
  139. package/dist/types/src/api-model/models/model-error.d.ts +36 -0
  140. package/dist/types/src/api-model/models/network-commingling-transaction-event.d.ts +67 -0
  141. package/dist/types/src/api-model/models/pay-with-amazon-event.d.ts +80 -0
  142. package/dist/types/src/api-model/models/product-ads-payment-event.d.ts +55 -0
  143. package/dist/types/src/api-model/models/promotion.d.ts +37 -0
  144. package/dist/types/src/api-model/models/removal-shipment-adjustment-event.d.ts +55 -0
  145. package/dist/types/src/api-model/models/removal-shipment-event.d.ts +49 -0
  146. package/dist/types/src/api-model/models/removal-shipment-item-adjustment.d.ts +61 -0
  147. package/dist/types/src/api-model/models/removal-shipment-item.d.ts +67 -0
  148. package/dist/types/src/api-model/models/rental-transaction-event.d.ts +82 -0
  149. package/dist/types/src/api-model/models/retrocharge-event.d.ts +62 -0
  150. package/dist/types/src/api-model/models/safetreimbursement-event.d.ts +50 -0
  151. package/dist/types/src/api-model/models/safetreimbursement-item.d.ts +37 -0
  152. package/dist/types/src/api-model/models/seller-deal-payment-event.d.ts +67 -0
  153. package/dist/types/src/api-model/models/seller-review-enrollment-payment-event.d.ts +57 -0
  154. package/dist/types/src/api-model/models/service-fee-event.d.ts +61 -0
  155. package/dist/types/src/api-model/models/shipment-event.d.ts +100 -0
  156. package/dist/types/src/api-model/models/shipment-item.d.ts +101 -0
  157. package/dist/types/src/api-model/models/solution-provider-credit-event.d.ts +79 -0
  158. package/dist/types/src/api-model/models/tax-withheld-component.d.ts +31 -0
  159. package/dist/types/src/api-model/models/tax-withholding-event.d.ts +44 -0
  160. package/dist/types/src/api-model/models/tax-withholding-period.d.ts +30 -0
  161. package/dist/types/src/api-model/models/tdsreimbursement-event.d.ts +37 -0
  162. package/dist/types/src/api-model/models/trial-shipment-event.d.ts +49 -0
  163. package/dist/types/src/client.d.ts +13 -0
  164. package/dist/types/src/error.d.ts +3 -0
  165. package/package.json +53 -0
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Finances
6
+ * The Selling Partner API for Finances helps you obtain financial information 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 });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Finances
6
+ * The Selling Partner API for Finances helps you obtain financial information 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 });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Finances
6
+ * The Selling Partner API for Finances helps you obtain financial information 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 });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Finances
6
+ * The Selling Partner API for Finances helps you obtain financial information 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 });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Finances
6
+ * The Selling Partner API for Finances helps you obtain financial information 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 });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Finances
6
+ * The Selling Partner API for Finances helps you obtain financial information 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 });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Finances
6
+ * The Selling Partner API for Finances helps you obtain financial information 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 });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Finances
6
+ * The Selling Partner API for Finances helps you obtain financial information 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 });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Finances
6
+ * The Selling Partner API for Finances helps you obtain financial information 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 });
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FinancesApiClient = exports.RATE_LIMITS = void 0;
4
+ /* eslint-disable prefer-regex-literals */
5
+ const common_1 = require("@sp-api-sdk/common");
6
+ const api_model_1 = require("./api-model");
7
+ const error_1 = require("./error");
8
+ exports.RATE_LIMITS = [
9
+ {
10
+ method: 'get',
11
+ urlRegex: new RegExp('^/finances/v0/financialEventGroups$'),
12
+ rate: 0.5,
13
+ burst: 30,
14
+ },
15
+ {
16
+ method: 'get',
17
+ urlRegex: new RegExp('^/finances/v0/financialEventGroups/[^/]*/financialEvents$'),
18
+ rate: 0.5,
19
+ burst: 30,
20
+ },
21
+ {
22
+ method: 'get',
23
+ urlRegex: new RegExp('^/finances/v0/orders/[^/]*/financialEvents$'),
24
+ rate: 0.5,
25
+ burst: 30,
26
+ },
27
+ {
28
+ method: 'get',
29
+ urlRegex: new RegExp('^/finances/v0/financialEvents$'),
30
+ rate: 0.5,
31
+ burst: 30,
32
+ },
33
+ ];
34
+ class FinancesApiClient extends api_model_1.DefaultApi {
35
+ constructor(parameters) {
36
+ const region = common_1.awsRegionByCode[parameters.region] ?? parameters.region;
37
+ const { rateLimiting, ...clientParameters } = parameters;
38
+ const axiosParameters = { ...clientParameters, region };
39
+ if (rateLimiting?.retry) {
40
+ axiosParameters.rateLimits = exports.RATE_LIMITS;
41
+ axiosParameters.onRetry = rateLimiting.onRetry;
42
+ }
43
+ const axiosInstance = (0, common_1.createAxiosInstance)(axiosParameters);
44
+ const configuration = new api_model_1.Configuration();
45
+ const environment = parameters.sandbox ? 'sandbox' : 'production';
46
+ const endpoint = common_1.endpoints[environment][region];
47
+ if (!endpoint) {
48
+ throw new error_1.FinancesApiError(`Unknown region : ${region}`);
49
+ }
50
+ super(configuration, endpoint, axiosInstance);
51
+ }
52
+ }
53
+ exports.FinancesApiClient = FinancesApiClient;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FinancesApiError = void 0;
4
+ class FinancesApiError extends Error {
5
+ constructor(message) {
6
+ super(message);
7
+ this.name = 'FinancesApiError';
8
+ }
9
+ }
10
+ exports.FinancesApiError = FinancesApiError;
@@ -0,0 +1,3 @@
1
+ export * from './src/client';
2
+ export * from './src/error';
3
+ export * from './src/api-model/models';
@@ -0,0 +1,349 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Selling Partner API for Finances
5
+ * The Selling Partner API for Finances helps you obtain financial information relevant to a seller\'s business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range.
6
+ *
7
+ * The version of the OpenAPI document: v0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import globalAxios from 'axios';
15
+ // Some imports not used depending on template conditions
16
+ // @ts-ignore
17
+ import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common';
18
+ // @ts-ignore
19
+ import { BASE_PATH, BaseAPI } from '../base';
20
+ /**
21
+ * DefaultApi - axios parameter creator
22
+ * @export
23
+ */
24
+ export const DefaultApiAxiosParamCreator = function (configuration) {
25
+ return {
26
+ /**
27
+ * Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
28
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page.
29
+ * @param {string} [financialEventGroupStartedBefore] A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned.
30
+ * @param {string} [financialEventGroupStartedAfter] A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted.
31
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
32
+ * @param {*} [options] Override http request option.
33
+ * @throws {RequiredError}
34
+ */
35
+ listFinancialEventGroups: async (maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options = {}) => {
36
+ const localVarPath = `/finances/v0/financialEventGroups`;
37
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
38
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
39
+ let baseOptions;
40
+ if (configuration) {
41
+ baseOptions = configuration.baseOptions;
42
+ }
43
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
44
+ const localVarHeaderParameter = {};
45
+ const localVarQueryParameter = {};
46
+ if (maxResultsPerPage !== undefined) {
47
+ localVarQueryParameter['MaxResultsPerPage'] = maxResultsPerPage;
48
+ }
49
+ if (financialEventGroupStartedBefore !== undefined) {
50
+ localVarQueryParameter['FinancialEventGroupStartedBefore'] = (financialEventGroupStartedBefore instanceof Date) ?
51
+ financialEventGroupStartedBefore.toISOString() :
52
+ financialEventGroupStartedBefore;
53
+ }
54
+ if (financialEventGroupStartedAfter !== undefined) {
55
+ localVarQueryParameter['FinancialEventGroupStartedAfter'] = (financialEventGroupStartedAfter instanceof Date) ?
56
+ financialEventGroupStartedAfter.toISOString() :
57
+ financialEventGroupStartedAfter;
58
+ }
59
+ if (nextToken !== undefined) {
60
+ localVarQueryParameter['NextToken'] = nextToken;
61
+ }
62
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
63
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
64
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
65
+ return {
66
+ url: toPathString(localVarUrlObj),
67
+ options: localVarRequestOptions,
68
+ };
69
+ },
70
+ /**
71
+ * Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
72
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page.
73
+ * @param {string} [postedAfter] A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format.
74
+ * @param {string} [postedBefore] A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes.
75
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
76
+ * @param {*} [options] Override http request option.
77
+ * @throws {RequiredError}
78
+ */
79
+ listFinancialEvents: async (maxResultsPerPage, postedAfter, postedBefore, nextToken, options = {}) => {
80
+ const localVarPath = `/finances/v0/financialEvents`;
81
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
82
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
83
+ let baseOptions;
84
+ if (configuration) {
85
+ baseOptions = configuration.baseOptions;
86
+ }
87
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
88
+ const localVarHeaderParameter = {};
89
+ const localVarQueryParameter = {};
90
+ if (maxResultsPerPage !== undefined) {
91
+ localVarQueryParameter['MaxResultsPerPage'] = maxResultsPerPage;
92
+ }
93
+ if (postedAfter !== undefined) {
94
+ localVarQueryParameter['PostedAfter'] = (postedAfter instanceof Date) ?
95
+ postedAfter.toISOString() :
96
+ postedAfter;
97
+ }
98
+ if (postedBefore !== undefined) {
99
+ localVarQueryParameter['PostedBefore'] = (postedBefore instanceof Date) ?
100
+ postedBefore.toISOString() :
101
+ postedBefore;
102
+ }
103
+ if (nextToken !== undefined) {
104
+ localVarQueryParameter['NextToken'] = nextToken;
105
+ }
106
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
107
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
108
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
109
+ return {
110
+ url: toPathString(localVarUrlObj),
111
+ options: localVarRequestOptions,
112
+ };
113
+ },
114
+ /**
115
+ * Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
116
+ * @param {string} eventGroupId The identifier of the financial event group to which the events belong.
117
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page.
118
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
119
+ * @param {*} [options] Override http request option.
120
+ * @throws {RequiredError}
121
+ */
122
+ listFinancialEventsByGroupId: async (eventGroupId, maxResultsPerPage, nextToken, options = {}) => {
123
+ // verify required parameter 'eventGroupId' is not null or undefined
124
+ assertParamExists('listFinancialEventsByGroupId', 'eventGroupId', eventGroupId);
125
+ const localVarPath = `/finances/v0/financialEventGroups/{eventGroupId}/financialEvents`
126
+ .replace(`{${"eventGroupId"}}`, encodeURIComponent(String(eventGroupId)));
127
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
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 !== undefined) {
137
+ localVarQueryParameter['MaxResultsPerPage'] = maxResultsPerPage;
138
+ }
139
+ if (nextToken !== undefined) {
140
+ localVarQueryParameter['NextToken'] = nextToken;
141
+ }
142
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
143
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
144
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
145
+ return {
146
+ url: toPathString(localVarUrlObj),
147
+ options: localVarRequestOptions,
148
+ };
149
+ },
150
+ /**
151
+ * Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
152
+ * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
153
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page.
154
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
155
+ * @param {*} [options] Override http request option.
156
+ * @throws {RequiredError}
157
+ */
158
+ listFinancialEventsByOrderId: async (orderId, maxResultsPerPage, nextToken, options = {}) => {
159
+ // verify required parameter 'orderId' is not null or undefined
160
+ assertParamExists('listFinancialEventsByOrderId', 'orderId', orderId);
161
+ const localVarPath = `/finances/v0/orders/{orderId}/financialEvents`
162
+ .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
163
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
164
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
165
+ let baseOptions;
166
+ if (configuration) {
167
+ baseOptions = configuration.baseOptions;
168
+ }
169
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
170
+ const localVarHeaderParameter = {};
171
+ const localVarQueryParameter = {};
172
+ if (maxResultsPerPage !== undefined) {
173
+ localVarQueryParameter['MaxResultsPerPage'] = maxResultsPerPage;
174
+ }
175
+ if (nextToken !== undefined) {
176
+ localVarQueryParameter['NextToken'] = nextToken;
177
+ }
178
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
179
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
180
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
181
+ return {
182
+ url: toPathString(localVarUrlObj),
183
+ options: localVarRequestOptions,
184
+ };
185
+ },
186
+ };
187
+ };
188
+ /**
189
+ * DefaultApi - functional programming interface
190
+ * @export
191
+ */
192
+ export const DefaultApiFp = function (configuration) {
193
+ const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration);
194
+ return {
195
+ /**
196
+ * Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
197
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page.
198
+ * @param {string} [financialEventGroupStartedBefore] A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned.
199
+ * @param {string} [financialEventGroupStartedAfter] A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted.
200
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
201
+ * @param {*} [options] Override http request option.
202
+ * @throws {RequiredError}
203
+ */
204
+ async listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options) {
205
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options);
206
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
207
+ },
208
+ /**
209
+ * Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
210
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page.
211
+ * @param {string} [postedAfter] A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format.
212
+ * @param {string} [postedBefore] A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes.
213
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
214
+ * @param {*} [options] Override http request option.
215
+ * @throws {RequiredError}
216
+ */
217
+ async listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options) {
218
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options);
219
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
220
+ },
221
+ /**
222
+ * Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
223
+ * @param {string} eventGroupId The identifier of the financial event group to which the events belong.
224
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page.
225
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
226
+ * @param {*} [options] Override http request option.
227
+ * @throws {RequiredError}
228
+ */
229
+ async listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, nextToken, options) {
230
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, nextToken, options);
231
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
232
+ },
233
+ /**
234
+ * Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
235
+ * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
236
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page.
237
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
238
+ * @param {*} [options] Override http request option.
239
+ * @throws {RequiredError}
240
+ */
241
+ async listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options) {
242
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options);
243
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
244
+ },
245
+ };
246
+ };
247
+ /**
248
+ * DefaultApi - factory interface
249
+ * @export
250
+ */
251
+ export const DefaultApiFactory = function (configuration, basePath, axios) {
252
+ const localVarFp = DefaultApiFp(configuration);
253
+ return {
254
+ /**
255
+ * Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
256
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page.
257
+ * @param {string} [financialEventGroupStartedBefore] A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned.
258
+ * @param {string} [financialEventGroupStartedAfter] A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted.
259
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ */
263
+ listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options) {
264
+ return localVarFp.listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options).then((request) => request(axios, basePath));
265
+ },
266
+ /**
267
+ * Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
268
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page.
269
+ * @param {string} [postedAfter] A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format.
270
+ * @param {string} [postedBefore] A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes.
271
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
272
+ * @param {*} [options] Override http request option.
273
+ * @throws {RequiredError}
274
+ */
275
+ listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options) {
276
+ return localVarFp.listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options).then((request) => request(axios, basePath));
277
+ },
278
+ /**
279
+ * Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
280
+ * @param {string} eventGroupId The identifier of the financial event group to which the events belong.
281
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page.
282
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
283
+ * @param {*} [options] Override http request option.
284
+ * @throws {RequiredError}
285
+ */
286
+ listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, nextToken, options) {
287
+ return localVarFp.listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, nextToken, options).then((request) => request(axios, basePath));
288
+ },
289
+ /**
290
+ * Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
291
+ * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
292
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page.
293
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
294
+ * @param {*} [options] Override http request option.
295
+ * @throws {RequiredError}
296
+ */
297
+ listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options) {
298
+ return localVarFp.listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options).then((request) => request(axios, basePath));
299
+ },
300
+ };
301
+ };
302
+ /**
303
+ * DefaultApi - object-oriented interface
304
+ * @export
305
+ * @class DefaultApi
306
+ * @extends {BaseAPI}
307
+ */
308
+ export class DefaultApi extends BaseAPI {
309
+ /**
310
+ * Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
311
+ * @param {DefaultApiListFinancialEventGroupsRequest} requestParameters Request parameters.
312
+ * @param {*} [options] Override http request option.
313
+ * @throws {RequiredError}
314
+ * @memberof DefaultApi
315
+ */
316
+ listFinancialEventGroups(requestParameters = {}, options) {
317
+ return DefaultApiFp(this.configuration).listFinancialEventGroups(requestParameters.maxResultsPerPage, requestParameters.financialEventGroupStartedBefore, requestParameters.financialEventGroupStartedAfter, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
318
+ }
319
+ /**
320
+ * Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
321
+ * @param {DefaultApiListFinancialEventsRequest} requestParameters Request parameters.
322
+ * @param {*} [options] Override http request option.
323
+ * @throws {RequiredError}
324
+ * @memberof DefaultApi
325
+ */
326
+ listFinancialEvents(requestParameters = {}, options) {
327
+ return DefaultApiFp(this.configuration).listFinancialEvents(requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
328
+ }
329
+ /**
330
+ * Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
331
+ * @param {DefaultApiListFinancialEventsByGroupIdRequest} requestParameters Request parameters.
332
+ * @param {*} [options] Override http request option.
333
+ * @throws {RequiredError}
334
+ * @memberof DefaultApi
335
+ */
336
+ listFinancialEventsByGroupId(requestParameters, options) {
337
+ return DefaultApiFp(this.configuration).listFinancialEventsByGroupId(requestParameters.eventGroupId, requestParameters.maxResultsPerPage, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
338
+ }
339
+ /**
340
+ * Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
341
+ * @param {DefaultApiListFinancialEventsByOrderIdRequest} requestParameters Request parameters.
342
+ * @param {*} [options] Override http request option.
343
+ * @throws {RequiredError}
344
+ * @memberof DefaultApi
345
+ */
346
+ listFinancialEventsByOrderId(requestParameters, options) {
347
+ return DefaultApiFp(this.configuration).listFinancialEventsByOrderId(requestParameters.orderId, requestParameters.maxResultsPerPage, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
348
+ }
349
+ }