@sp-api-sdk/finances-api-2024-06-19 2.1.2 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/cjs/api-model/api/finances-api.js +148 -0
  2. package/dist/cjs/api-model/api.js +1 -1
  3. package/dist/cjs/api-model/models/business-context.js +19 -0
  4. package/dist/cjs/api-model/models/index.js +2 -1
  5. package/dist/cjs/api-model/models/related-identifier.js +5 -2
  6. package/dist/cjs/client.js +1 -1
  7. package/dist/es/api-model/api/finances-api.js +138 -0
  8. package/dist/es/api-model/api.js +1 -1
  9. package/dist/es/api-model/models/business-context.js +16 -0
  10. package/dist/es/api-model/models/index.js +2 -1
  11. package/dist/es/api-model/models/related-identifier.js +5 -2
  12. package/dist/es/client.js +2 -2
  13. package/dist/types/api-model/api/finances-api.d.ts +116 -0
  14. package/dist/types/api-model/api.d.ts +1 -1
  15. package/dist/types/api-model/models/breakdown.d.ts +1 -1
  16. package/dist/types/api-model/models/business-context.d.ts +28 -0
  17. package/dist/types/api-model/models/context.d.ts +2 -1
  18. package/dist/types/api-model/models/deferred-context.d.ts +1 -7
  19. package/dist/types/api-model/models/index.d.ts +2 -1
  20. package/dist/types/api-model/models/item.d.ts +1 -1
  21. package/dist/types/api-model/models/list-transactions-response.d.ts +4 -4
  22. package/dist/types/api-model/models/marketplace-details.d.ts +1 -1
  23. package/dist/types/api-model/models/related-identifier.d.ts +4 -1
  24. package/dist/types/api-model/models/selling-partner-metadata.d.ts +1 -1
  25. package/dist/types/api-model/models/transaction.d.ts +2 -2
  26. package/dist/types/api-model/models/{list-transactions-response-payload.d.ts → transactions-payload.d.ts} +6 -6
  27. package/dist/types/client.d.ts +2 -2
  28. package/package.json +4 -4
  29. package/dist/cjs/api-model/api/default-api.js +0 -143
  30. package/dist/es/api-model/api/default-api.js +0 -133
  31. package/dist/types/api-model/api/default-api.d.ts +0 -108
  32. /package/dist/cjs/api-model/models/{list-transactions-response-payload.js → transactions-payload.js} +0 -0
  33. /package/dist/es/api-model/models/{list-transactions-response-payload.js → transactions-payload.js} +0 -0
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * The 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 or date range without having to wait until a statement period closes.
7
+ *
8
+ * The version of the OpenAPI document: 2024-06-19
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
+ * @export
29
+ */
30
+ const FinancesApiAxiosParamCreator = function (configuration) {
31
+ return {
32
+ /**
33
+ * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | 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 may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits).
34
+ * @param {string} postedAfter The response includes financial events posted on or after 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.
35
+ * @param {string} [postedBefore] A date used for selecting transactions 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 transactions are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes.
36
+ * @param {string} [marketplaceId] The identifier of the marketplace from which you want to retrieve transactions. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
37
+ * @param {string} [transactionStatus] The status of the transaction. **Possible values:** * `DEFERRED`: the transaction is currently deferred. * `RELEASED`: the transaction is currently released. * `DEFERRED_RELEASED`: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to `DEFERRED_RELEASED` when the transaction is released.
38
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
39
+ * @param {*} [options] Override http request option.
40
+ * @throws {RequiredError}
41
+ */
42
+ listTransactions: async (postedAfter, postedBefore, marketplaceId, transactionStatus, nextToken, options = {}) => {
43
+ // verify required parameter 'postedAfter' is not null or undefined
44
+ (0, common_1.assertParamExists)('listTransactions', 'postedAfter', postedAfter);
45
+ const localVarPath = `/finances/2024-06-19/transactions`;
46
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
47
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
48
+ let baseOptions;
49
+ if (configuration) {
50
+ baseOptions = configuration.baseOptions;
51
+ }
52
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
53
+ const localVarHeaderParameter = {};
54
+ const localVarQueryParameter = {};
55
+ if (postedAfter !== undefined) {
56
+ localVarQueryParameter['postedAfter'] = (postedAfter instanceof Date) ?
57
+ postedAfter.toISOString() :
58
+ postedAfter;
59
+ }
60
+ if (postedBefore !== undefined) {
61
+ localVarQueryParameter['postedBefore'] = (postedBefore instanceof Date) ?
62
+ postedBefore.toISOString() :
63
+ postedBefore;
64
+ }
65
+ if (marketplaceId !== undefined) {
66
+ localVarQueryParameter['marketplaceId'] = marketplaceId;
67
+ }
68
+ if (transactionStatus !== undefined) {
69
+ localVarQueryParameter['transactionStatus'] = transactionStatus;
70
+ }
71
+ if (nextToken !== undefined) {
72
+ localVarQueryParameter['nextToken'] = nextToken;
73
+ }
74
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
75
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
76
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
77
+ return {
78
+ url: (0, common_1.toPathString)(localVarUrlObj),
79
+ options: localVarRequestOptions,
80
+ };
81
+ },
82
+ };
83
+ };
84
+ exports.FinancesApiAxiosParamCreator = FinancesApiAxiosParamCreator;
85
+ /**
86
+ * FinancesApi - functional programming interface
87
+ * @export
88
+ */
89
+ const FinancesApiFp = function (configuration) {
90
+ const localVarAxiosParamCreator = (0, exports.FinancesApiAxiosParamCreator)(configuration);
91
+ return {
92
+ /**
93
+ * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | 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 may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits).
94
+ * @param {string} postedAfter The response includes financial events posted on or after 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.
95
+ * @param {string} [postedBefore] A date used for selecting transactions 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 transactions are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes.
96
+ * @param {string} [marketplaceId] The identifier of the marketplace from which you want to retrieve transactions. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
97
+ * @param {string} [transactionStatus] The status of the transaction. **Possible values:** * `DEFERRED`: the transaction is currently deferred. * `RELEASED`: the transaction is currently released. * `DEFERRED_RELEASED`: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to `DEFERRED_RELEASED` when the transaction is released.
98
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ */
102
+ async listTransactions(postedAfter, postedBefore, marketplaceId, transactionStatus, nextToken, options) {
103
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactions(postedAfter, postedBefore, marketplaceId, transactionStatus, nextToken, options);
104
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
105
+ const localVarOperationServerBasePath = base_1.operationServerMap['FinancesApi.listTransactions']?.[localVarOperationServerIndex]?.url;
106
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
107
+ },
108
+ };
109
+ };
110
+ exports.FinancesApiFp = FinancesApiFp;
111
+ /**
112
+ * FinancesApi - factory interface
113
+ * @export
114
+ */
115
+ const FinancesApiFactory = function (configuration, basePath, axios) {
116
+ const localVarFp = (0, exports.FinancesApiFp)(configuration);
117
+ return {
118
+ /**
119
+ * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | 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 may 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).
120
+ * @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
121
+ * @param {*} [options] Override http request option.
122
+ * @throws {RequiredError}
123
+ */
124
+ listTransactions(requestParameters, options) {
125
+ return localVarFp.listTransactions(requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.marketplaceId, requestParameters.transactionStatus, requestParameters.nextToken, options).then((request) => request(axios, basePath));
126
+ },
127
+ };
128
+ };
129
+ exports.FinancesApiFactory = FinancesApiFactory;
130
+ /**
131
+ * FinancesApi - object-oriented interface
132
+ * @export
133
+ * @class FinancesApi
134
+ * @extends {BaseAPI}
135
+ */
136
+ class FinancesApi extends base_1.BaseAPI {
137
+ /**
138
+ * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | 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 may 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).
139
+ * @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
140
+ * @param {*} [options] Override http request option.
141
+ * @throws {RequiredError}
142
+ * @memberof FinancesApi
143
+ */
144
+ listTransactions(requestParameters, options) {
145
+ return (0, exports.FinancesApiFp)(this.configuration).listTransactions(requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.marketplaceId, requestParameters.transactionStatus, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
146
+ }
147
+ }
148
+ exports.FinancesApi = FinancesApi;
@@ -27,4 +27,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
27
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
- __exportStar(require("./api/default-api"), exports);
30
+ __exportStar(require("./api/finances-api"), exports);
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * The 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 or date range without having to wait until a statement period closes.
7
+ *
8
+ * The version of the OpenAPI document: 2024-06-19
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.BusinessContextStoreNameEnum = void 0;
17
+ exports.BusinessContextStoreNameEnum = {
18
+ AmazonHaul: 'AMAZON_HAUL'
19
+ };
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./amazon-pay-context"), exports);
18
18
  __exportStar(require("./breakdown"), exports);
19
+ __exportStar(require("./business-context"), exports);
19
20
  __exportStar(require("./context"), exports);
20
21
  __exportStar(require("./context-all-of"), exports);
21
22
  __exportStar(require("./currency"), exports);
@@ -24,7 +25,6 @@ __exportStar(require("./error-list"), exports);
24
25
  __exportStar(require("./item"), exports);
25
26
  __exportStar(require("./item-related-identifier"), exports);
26
27
  __exportStar(require("./list-transactions-response"), exports);
27
- __exportStar(require("./list-transactions-response-payload"), exports);
28
28
  __exportStar(require("./marketplace-details"), exports);
29
29
  __exportStar(require("./model-error"), exports);
30
30
  __exportStar(require("./payments-context"), exports);
@@ -33,3 +33,4 @@ __exportStar(require("./related-identifier"), exports);
33
33
  __exportStar(require("./selling-partner-metadata"), exports);
34
34
  __exportStar(require("./time-range-context"), exports);
35
35
  __exportStar(require("./transaction"), exports);
36
+ __exportStar(require("./transactions-payload"), exports);
@@ -17,9 +17,12 @@ exports.RelatedIdentifierRelatedIdentifierNameEnum = void 0;
17
17
  exports.RelatedIdentifierRelatedIdentifierNameEnum = {
18
18
  OrderId: 'ORDER_ID',
19
19
  ShipmentId: 'SHIPMENT_ID',
20
- EventGroupId: 'EVENT_GROUP_ID',
20
+ FinancialEventGroupId: 'FINANCIAL_EVENT_GROUP_ID',
21
21
  RefundId: 'REFUND_ID',
22
22
  InvoiceId: 'INVOICE_ID',
23
23
  DisbursementId: 'DISBURSEMENT_ID',
24
- TransferId: 'TRANSFER_ID'
24
+ TransferId: 'TRANSFER_ID',
25
+ DeferredTransactionId: 'DEFERRED_TRANSACTION_ID',
26
+ ReleaseTransactionId: 'RELEASE_TRANSACTION_ID',
27
+ SettlementId: 'SETTLEMENT_ID'
25
28
  };
@@ -12,7 +12,7 @@ exports.clientRateLimits = [
12
12
  burst: 10,
13
13
  },
14
14
  ];
15
- class FinancesApiClient extends api_model_1.DefaultApi {
15
+ class FinancesApiClient extends api_model_1.FinancesApi {
16
16
  constructor(configuration) {
17
17
  const { axios, endpoint } = (0, common_1.createAxiosInstance)(configuration, exports.clientRateLimits);
18
18
  super(new api_model_1.Configuration(), endpoint, axios);
@@ -0,0 +1,138 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * The 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 or date range without having to wait until a statement period closes.
6
+ *
7
+ * The version of the OpenAPI document: 2024-06-19
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, operationServerMap } from '../base';
20
+ /**
21
+ * FinancesApi - axios parameter creator
22
+ * @export
23
+ */
24
+ export const FinancesApiAxiosParamCreator = function (configuration) {
25
+ return {
26
+ /**
27
+ * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | 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 may 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).
28
+ * @param {string} postedAfter The response includes financial events posted on or after 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.
29
+ * @param {string} [postedBefore] A date used for selecting transactions 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 transactions are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes.
30
+ * @param {string} [marketplaceId] The identifier of the marketplace from which you want to retrieve transactions. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
31
+ * @param {string} [transactionStatus] The status of the transaction. **Possible values:** * `DEFERRED`: the transaction is currently deferred. * `RELEASED`: the transaction is currently released. * `DEFERRED_RELEASED`: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to `DEFERRED_RELEASED` when the transaction is released.
32
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
33
+ * @param {*} [options] Override http request option.
34
+ * @throws {RequiredError}
35
+ */
36
+ listTransactions: async (postedAfter, postedBefore, marketplaceId, transactionStatus, nextToken, options = {}) => {
37
+ // verify required parameter 'postedAfter' is not null or undefined
38
+ assertParamExists('listTransactions', 'postedAfter', postedAfter);
39
+ const localVarPath = `/finances/2024-06-19/transactions`;
40
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
41
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
42
+ let baseOptions;
43
+ if (configuration) {
44
+ baseOptions = configuration.baseOptions;
45
+ }
46
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
47
+ const localVarHeaderParameter = {};
48
+ const localVarQueryParameter = {};
49
+ if (postedAfter !== undefined) {
50
+ localVarQueryParameter['postedAfter'] = (postedAfter instanceof Date) ?
51
+ postedAfter.toISOString() :
52
+ postedAfter;
53
+ }
54
+ if (postedBefore !== undefined) {
55
+ localVarQueryParameter['postedBefore'] = (postedBefore instanceof Date) ?
56
+ postedBefore.toISOString() :
57
+ postedBefore;
58
+ }
59
+ if (marketplaceId !== undefined) {
60
+ localVarQueryParameter['marketplaceId'] = marketplaceId;
61
+ }
62
+ if (transactionStatus !== undefined) {
63
+ localVarQueryParameter['transactionStatus'] = transactionStatus;
64
+ }
65
+ if (nextToken !== undefined) {
66
+ localVarQueryParameter['nextToken'] = nextToken;
67
+ }
68
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
69
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
70
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
71
+ return {
72
+ url: toPathString(localVarUrlObj),
73
+ options: localVarRequestOptions,
74
+ };
75
+ },
76
+ };
77
+ };
78
+ /**
79
+ * FinancesApi - functional programming interface
80
+ * @export
81
+ */
82
+ export const FinancesApiFp = function (configuration) {
83
+ const localVarAxiosParamCreator = FinancesApiAxiosParamCreator(configuration);
84
+ return {
85
+ /**
86
+ * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | 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 may 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).
87
+ * @param {string} postedAfter The response includes financial events posted on or after 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.
88
+ * @param {string} [postedBefore] A date used for selecting transactions 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 transactions are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes.
89
+ * @param {string} [marketplaceId] The identifier of the marketplace from which you want to retrieve transactions. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
90
+ * @param {string} [transactionStatus] The status of the transaction. **Possible values:** * `DEFERRED`: the transaction is currently deferred. * `RELEASED`: the transaction is currently released. * `DEFERRED_RELEASED`: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to `DEFERRED_RELEASED` when the transaction is released.
91
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
92
+ * @param {*} [options] Override http request option.
93
+ * @throws {RequiredError}
94
+ */
95
+ async listTransactions(postedAfter, postedBefore, marketplaceId, transactionStatus, nextToken, options) {
96
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactions(postedAfter, postedBefore, marketplaceId, transactionStatus, nextToken, options);
97
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
98
+ const localVarOperationServerBasePath = operationServerMap['FinancesApi.listTransactions']?.[localVarOperationServerIndex]?.url;
99
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
100
+ },
101
+ };
102
+ };
103
+ /**
104
+ * FinancesApi - factory interface
105
+ * @export
106
+ */
107
+ export const FinancesApiFactory = function (configuration, basePath, axios) {
108
+ const localVarFp = FinancesApiFp(configuration);
109
+ return {
110
+ /**
111
+ * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | 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 may 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).
112
+ * @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
113
+ * @param {*} [options] Override http request option.
114
+ * @throws {RequiredError}
115
+ */
116
+ listTransactions(requestParameters, options) {
117
+ return localVarFp.listTransactions(requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.marketplaceId, requestParameters.transactionStatus, requestParameters.nextToken, options).then((request) => request(axios, basePath));
118
+ },
119
+ };
120
+ };
121
+ /**
122
+ * FinancesApi - object-oriented interface
123
+ * @export
124
+ * @class FinancesApi
125
+ * @extends {BaseAPI}
126
+ */
127
+ export class FinancesApi extends BaseAPI {
128
+ /**
129
+ * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | 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 may 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).
130
+ * @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
131
+ * @param {*} [options] Override http request option.
132
+ * @throws {RequiredError}
133
+ * @memberof FinancesApi
134
+ */
135
+ listTransactions(requestParameters, options) {
136
+ return FinancesApiFp(this.configuration).listTransactions(requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.marketplaceId, requestParameters.transactionStatus, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
137
+ }
138
+ }
@@ -11,4 +11,4 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- export * from './api/default-api';
14
+ export * from './api/finances-api';
@@ -0,0 +1,16 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * The 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 or date range without having to wait until a statement period closes.
6
+ *
7
+ * The version of the OpenAPI document: 2024-06-19
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
+ export const BusinessContextStoreNameEnum = {
15
+ AmazonHaul: 'AMAZON_HAUL'
16
+ };
@@ -1,5 +1,6 @@
1
1
  export * from './amazon-pay-context';
2
2
  export * from './breakdown';
3
+ export * from './business-context';
3
4
  export * from './context';
4
5
  export * from './context-all-of';
5
6
  export * from './currency';
@@ -8,7 +9,6 @@ export * from './error-list';
8
9
  export * from './item';
9
10
  export * from './item-related-identifier';
10
11
  export * from './list-transactions-response';
11
- export * from './list-transactions-response-payload';
12
12
  export * from './marketplace-details';
13
13
  export * from './model-error';
14
14
  export * from './payments-context';
@@ -17,3 +17,4 @@ export * from './related-identifier';
17
17
  export * from './selling-partner-metadata';
18
18
  export * from './time-range-context';
19
19
  export * from './transaction';
20
+ export * from './transactions-payload';
@@ -14,9 +14,12 @@
14
14
  export const RelatedIdentifierRelatedIdentifierNameEnum = {
15
15
  OrderId: 'ORDER_ID',
16
16
  ShipmentId: 'SHIPMENT_ID',
17
- EventGroupId: 'EVENT_GROUP_ID',
17
+ FinancialEventGroupId: 'FINANCIAL_EVENT_GROUP_ID',
18
18
  RefundId: 'REFUND_ID',
19
19
  InvoiceId: 'INVOICE_ID',
20
20
  DisbursementId: 'DISBURSEMENT_ID',
21
- TransferId: 'TRANSFER_ID'
21
+ TransferId: 'TRANSFER_ID',
22
+ DeferredTransactionId: 'DEFERRED_TRANSACTION_ID',
23
+ ReleaseTransactionId: 'RELEASE_TRANSACTION_ID',
24
+ SettlementId: 'SETTLEMENT_ID'
22
25
  };
package/dist/es/client.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createAxiosInstance } from '@sp-api-sdk/common';
2
- import { Configuration, DefaultApi } from './api-model';
2
+ import { Configuration, FinancesApi } from './api-model';
3
3
  export const clientRateLimits = [
4
4
  {
5
5
  method: 'get',
@@ -9,7 +9,7 @@ export const clientRateLimits = [
9
9
  burst: 10,
10
10
  },
11
11
  ];
12
- export class FinancesApiClient extends DefaultApi {
12
+ export class FinancesApiClient extends FinancesApi {
13
13
  constructor(configuration) {
14
14
  const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
15
15
  super(new Configuration(), endpoint, axios);
@@ -0,0 +1,116 @@
1
+ /**
2
+ * The Selling Partner API for Finances
3
+ * 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 or date range without having to wait until a statement period closes.
4
+ *
5
+ * The version of the OpenAPI document: 2024-06-19
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from '../configuration';
13
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ import globalAxios from 'axios';
15
+ import { type RequestArgs, BaseAPI } from '../base';
16
+ import type { ListTransactionsResponse } from '../models';
17
+ /**
18
+ * FinancesApi - axios parameter creator
19
+ * @export
20
+ */
21
+ export declare const FinancesApiAxiosParamCreator: (configuration?: Configuration) => {
22
+ /**
23
+ * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | 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 may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits).
24
+ * @param {string} postedAfter The response includes financial events posted on or after 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.
25
+ * @param {string} [postedBefore] A date used for selecting transactions 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 transactions are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes.
26
+ * @param {string} [marketplaceId] The identifier of the marketplace from which you want to retrieve transactions. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
27
+ * @param {string} [transactionStatus] The status of the transaction. **Possible values:** * `DEFERRED`: the transaction is currently deferred. * `RELEASED`: the transaction is currently released. * `DEFERRED_RELEASED`: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to `DEFERRED_RELEASED` when the transaction is released.
28
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
29
+ * @param {*} [options] Override http request option.
30
+ * @throws {RequiredError}
31
+ */
32
+ listTransactions: (postedAfter: string, postedBefore?: string, marketplaceId?: string, transactionStatus?: string, nextToken?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
33
+ };
34
+ /**
35
+ * FinancesApi - functional programming interface
36
+ * @export
37
+ */
38
+ export declare const FinancesApiFp: (configuration?: Configuration) => {
39
+ /**
40
+ * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | 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 may 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).
41
+ * @param {string} postedAfter The response includes financial events posted on or after 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.
42
+ * @param {string} [postedBefore] A date used for selecting transactions 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 transactions are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes.
43
+ * @param {string} [marketplaceId] The identifier of the marketplace from which you want to retrieve transactions. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
44
+ * @param {string} [transactionStatus] The status of the transaction. **Possible values:** * &#x60;DEFERRED&#x60;: the transaction is currently deferred. * &#x60;RELEASED&#x60;: the transaction is currently released. * &#x60;DEFERRED_RELEASED&#x60;: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to &#x60;DEFERRED_RELEASED&#x60; when the transaction is released.
45
+ * @param {string} [nextToken] A string token returned in the response of your previous request.
46
+ * @param {*} [options] Override http request option.
47
+ * @throws {RequiredError}
48
+ */
49
+ listTransactions(postedAfter: string, postedBefore?: string, marketplaceId?: string, transactionStatus?: string, nextToken?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListTransactionsResponse>>;
50
+ };
51
+ /**
52
+ * FinancesApi - factory interface
53
+ * @export
54
+ */
55
+ export declare const FinancesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
56
+ /**
57
+ * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | 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 may 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).
58
+ * @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
59
+ * @param {*} [options] Override http request option.
60
+ * @throws {RequiredError}
61
+ */
62
+ listTransactions(requestParameters: FinancesApiListTransactionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListTransactionsResponse>;
63
+ };
64
+ /**
65
+ * Request parameters for listTransactions operation in FinancesApi.
66
+ * @export
67
+ * @interface FinancesApiListTransactionsRequest
68
+ */
69
+ export interface FinancesApiListTransactionsRequest {
70
+ /**
71
+ * The response includes financial events posted on or after 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.
72
+ * @type {string}
73
+ * @memberof FinancesApiListTransactions
74
+ */
75
+ readonly postedAfter: string;
76
+ /**
77
+ * A date used for selecting transactions 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 transactions are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes.
78
+ * @type {string}
79
+ * @memberof FinancesApiListTransactions
80
+ */
81
+ readonly postedBefore?: string;
82
+ /**
83
+ * The identifier of the marketplace from which you want to retrieve transactions. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
84
+ * @type {string}
85
+ * @memberof FinancesApiListTransactions
86
+ */
87
+ readonly marketplaceId?: string;
88
+ /**
89
+ * The status of the transaction. **Possible values:** * &#x60;DEFERRED&#x60;: the transaction is currently deferred. * &#x60;RELEASED&#x60;: the transaction is currently released. * &#x60;DEFERRED_RELEASED&#x60;: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to &#x60;DEFERRED_RELEASED&#x60; when the transaction is released.
90
+ * @type {string}
91
+ * @memberof FinancesApiListTransactions
92
+ */
93
+ readonly transactionStatus?: string;
94
+ /**
95
+ * A string token returned in the response of your previous request.
96
+ * @type {string}
97
+ * @memberof FinancesApiListTransactions
98
+ */
99
+ readonly nextToken?: string;
100
+ }
101
+ /**
102
+ * FinancesApi - object-oriented interface
103
+ * @export
104
+ * @class FinancesApi
105
+ * @extends {BaseAPI}
106
+ */
107
+ export declare class FinancesApi extends BaseAPI {
108
+ /**
109
+ * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | 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 may 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).
110
+ * @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
111
+ * @param {*} [options] Override http request option.
112
+ * @throws {RequiredError}
113
+ * @memberof FinancesApi
114
+ */
115
+ listTransactions(requestParameters: FinancesApiListTransactionsRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<ListTransactionsResponse, any>>;
116
+ }
@@ -9,4 +9,4 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- export * from './api/default-api';
12
+ export * from './api/finances-api';
@@ -29,7 +29,7 @@ export interface Breakdown {
29
29
  */
30
30
  'breakdownAmount'?: Currency;
31
31
  /**
32
- * List of breakdowns which will provide the details on how the total amount is calculated for the financial transaction.
32
+ * A list of breakdowns that detail how the total amount is calculated for the transaction.
33
33
  * @type {Array<Breakdown>}
34
34
  * @memberof Breakdown
35
35
  */
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The Selling Partner API for Finances
3
+ * 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 or date range without having to wait until a statement period closes.
4
+ *
5
+ * The version of the OpenAPI document: 2024-06-19
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Information about the line of business associated with a transaction.
14
+ * @export
15
+ * @interface BusinessContext
16
+ */
17
+ export interface BusinessContext {
18
+ /**
19
+ * The store name associated with the transaction.
20
+ * @type {string}
21
+ * @memberof BusinessContext
22
+ */
23
+ 'storeName'?: BusinessContextStoreNameEnum;
24
+ }
25
+ export declare const BusinessContextStoreNameEnum: {
26
+ readonly AmazonHaul: "AMAZON_HAUL";
27
+ };
28
+ export type BusinessContextStoreNameEnum = typeof BusinessContextStoreNameEnum[keyof typeof BusinessContextStoreNameEnum];
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { AmazonPayContext } from './amazon-pay-context';
13
+ import type { BusinessContext } from './business-context';
13
14
  import type { ContextAllOf } from './context-all-of';
14
15
  import type { DeferredContext } from './deferred-context';
15
16
  import type { PaymentsContext } from './payments-context';
@@ -20,4 +21,4 @@ import type { TimeRangeContext } from './time-range-context';
20
21
  * Additional Information about the item.
21
22
  * @export
22
23
  */
23
- export type Context = AmazonPayContext & ContextAllOf & DeferredContext & PaymentsContext & ProductContext & TimeRangeContext;
24
+ export type Context = AmazonPayContext & BusinessContext & ContextAllOf & DeferredContext & PaymentsContext & ProductContext & TimeRangeContext;