@sp-api-sdk/invoices-api-2024-06-19 2.0.17 → 2.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.
- package/dist/cjs/api-model/api/invoices-api.js +237 -0
- package/dist/cjs/api-model/models/carrier-details-context.js +15 -0
- package/dist/cjs/api-model/models/government-invoice-creation-status.js +24 -0
- package/dist/cjs/api-model/models/government-invoice-request.js +15 -0
- package/dist/cjs/api-model/models/government-invoice-status-response.js +15 -0
- package/dist/cjs/api-model/models/govt-invoice-document-response.js +15 -0
- package/dist/cjs/api-model/models/index.js +7 -0
- package/dist/cjs/api-model/models/invoice-document.js +15 -0
- package/dist/cjs/api-model/models/invoice-error.js +15 -0
- package/dist/cjs/client.js +21 -0
- package/dist/es/api-model/api/invoices-api.js +237 -0
- package/dist/es/api-model/models/carrier-details-context.js +14 -0
- package/dist/es/api-model/models/government-invoice-creation-status.js +21 -0
- package/dist/es/api-model/models/government-invoice-request.js +14 -0
- package/dist/es/api-model/models/government-invoice-status-response.js +14 -0
- package/dist/es/api-model/models/govt-invoice-document-response.js +14 -0
- package/dist/es/api-model/models/index.js +7 -0
- package/dist/es/api-model/models/invoice-document.js +14 -0
- package/dist/es/api-model/models/invoice-error.js +14 -0
- package/dist/es/client.js +21 -0
- package/dist/types/api-model/api/invoices-api.d.ts +168 -0
- package/dist/types/api-model/models/carrier-details-context.d.ts +48 -0
- package/dist/types/api-model/models/government-invoice-creation-status.d.ts +20 -0
- package/dist/types/api-model/models/government-invoice-request.d.ts +41 -0
- package/dist/types/api-model/models/government-invoice-status-response.d.ts +27 -0
- package/dist/types/api-model/models/govt-invoice-document-response.d.ts +18 -0
- package/dist/types/api-model/models/index.d.ts +7 -0
- package/dist/types/api-model/models/invoice-document.d.ts +20 -0
- package/dist/types/api-model/models/invoice-error.d.ts +24 -0
- package/package.json +4 -4
|
@@ -28,6 +28,36 @@ const base_1 = require("../base");
|
|
|
28
28
|
*/
|
|
29
29
|
const InvoicesApiAxiosParamCreator = function (configuration) {
|
|
30
30
|
return {
|
|
31
|
+
/**
|
|
32
|
+
* Submits an asynchronous government invoice creation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
33
|
+
* @param {GovernmentInvoiceRequest} body Information required to create the government invoice.
|
|
34
|
+
* @param {*} [options] Override http request option.
|
|
35
|
+
* @throws {RequiredError}
|
|
36
|
+
*/
|
|
37
|
+
createGovernmentInvoice: async (body, options = {}) => {
|
|
38
|
+
// verify required parameter 'body' is not null or undefined
|
|
39
|
+
(0, common_1.assertParamExists)('createGovernmentInvoice', 'body', body);
|
|
40
|
+
const localVarPath = `/tax/invoices/2024-06-19/governmentInvoiceRequests`;
|
|
41
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
42
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
43
|
+
let baseOptions;
|
|
44
|
+
if (configuration) {
|
|
45
|
+
baseOptions = configuration.baseOptions;
|
|
46
|
+
}
|
|
47
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
48
|
+
const localVarHeaderParameter = {};
|
|
49
|
+
const localVarQueryParameter = {};
|
|
50
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
51
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
52
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
53
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
54
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
55
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
56
|
+
return {
|
|
57
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
58
|
+
options: localVarRequestOptions,
|
|
59
|
+
};
|
|
60
|
+
},
|
|
31
61
|
/**
|
|
32
62
|
* Creates an invoice export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.167 | 1 | 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 indicates 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 in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
33
63
|
* @param {ExportInvoicesRequest} body Information required to create the export request.
|
|
@@ -58,6 +88,114 @@ const InvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
58
88
|
options: localVarRequestOptions,
|
|
59
89
|
};
|
|
60
90
|
},
|
|
91
|
+
/**
|
|
92
|
+
* Returns an invoiceDocument object containing an invoiceDocumentUrl . **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
93
|
+
* @param {string} marketplaceId The invoices returned will match the marketplace that you specify.
|
|
94
|
+
* @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \'transactionType\' options using \'getInvoicesAttributes\' operation.
|
|
95
|
+
* @param {string} shipmentId The unique shipment identifier to get an invoice for.
|
|
96
|
+
* @param {string} invoiceType Marketplace specific classification of the invoice type. Check \'invoiceType\' options using \'getInvoicesAttributes\' operation.
|
|
97
|
+
* @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
|
|
98
|
+
* @param {string} [fileFormat] Requested file format. Default is XML
|
|
99
|
+
* @param {*} [options] Override http request option.
|
|
100
|
+
* @throws {RequiredError}
|
|
101
|
+
*/
|
|
102
|
+
getGovernmentInvoiceDocument: async (marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, fileFormat, options = {}) => {
|
|
103
|
+
// verify required parameter 'marketplaceId' is not null or undefined
|
|
104
|
+
(0, common_1.assertParamExists)('getGovernmentInvoiceDocument', 'marketplaceId', marketplaceId);
|
|
105
|
+
// verify required parameter 'transactionType' is not null or undefined
|
|
106
|
+
(0, common_1.assertParamExists)('getGovernmentInvoiceDocument', 'transactionType', transactionType);
|
|
107
|
+
// verify required parameter 'shipmentId' is not null or undefined
|
|
108
|
+
(0, common_1.assertParamExists)('getGovernmentInvoiceDocument', 'shipmentId', shipmentId);
|
|
109
|
+
// verify required parameter 'invoiceType' is not null or undefined
|
|
110
|
+
(0, common_1.assertParamExists)('getGovernmentInvoiceDocument', 'invoiceType', invoiceType);
|
|
111
|
+
const localVarPath = `/tax/invoices/2024-06-19/governmentInvoiceRequests/{shipmentId}`
|
|
112
|
+
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
|
|
113
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
114
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
115
|
+
let baseOptions;
|
|
116
|
+
if (configuration) {
|
|
117
|
+
baseOptions = configuration.baseOptions;
|
|
118
|
+
}
|
|
119
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
120
|
+
const localVarHeaderParameter = {};
|
|
121
|
+
const localVarQueryParameter = {};
|
|
122
|
+
if (marketplaceId !== undefined) {
|
|
123
|
+
localVarQueryParameter['marketplaceId'] = marketplaceId;
|
|
124
|
+
}
|
|
125
|
+
if (transactionType !== undefined) {
|
|
126
|
+
localVarQueryParameter['transactionType'] = transactionType;
|
|
127
|
+
}
|
|
128
|
+
if (invoiceType !== undefined) {
|
|
129
|
+
localVarQueryParameter['invoiceType'] = invoiceType;
|
|
130
|
+
}
|
|
131
|
+
if (inboundPlanId !== undefined) {
|
|
132
|
+
localVarQueryParameter['inboundPlanId'] = inboundPlanId;
|
|
133
|
+
}
|
|
134
|
+
if (fileFormat !== undefined) {
|
|
135
|
+
localVarQueryParameter['fileFormat'] = fileFormat;
|
|
136
|
+
}
|
|
137
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
138
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
139
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
140
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
141
|
+
return {
|
|
142
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
143
|
+
options: localVarRequestOptions,
|
|
144
|
+
};
|
|
145
|
+
},
|
|
146
|
+
/**
|
|
147
|
+
* Returns the status of an invoice generation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
148
|
+
* @param {string} marketplaceId The invoices status will match the marketplace that you specify.
|
|
149
|
+
* @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \'transactionType\' options using \'getInvoicesAttributes\' operation.
|
|
150
|
+
* @param {string} shipmentId The unique shipment identifier to get an invoice for.
|
|
151
|
+
* @param {string} invoiceType Marketplace specific classification of the invoice type. Check \'invoiceType\' options using \'getInvoicesAttributes\' operation.
|
|
152
|
+
* @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
|
|
153
|
+
* @param {*} [options] Override http request option.
|
|
154
|
+
* @throws {RequiredError}
|
|
155
|
+
*/
|
|
156
|
+
getGovernmentInvoiceStatus: async (marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, options = {}) => {
|
|
157
|
+
// verify required parameter 'marketplaceId' is not null or undefined
|
|
158
|
+
(0, common_1.assertParamExists)('getGovernmentInvoiceStatus', 'marketplaceId', marketplaceId);
|
|
159
|
+
// verify required parameter 'transactionType' is not null or undefined
|
|
160
|
+
(0, common_1.assertParamExists)('getGovernmentInvoiceStatus', 'transactionType', transactionType);
|
|
161
|
+
// verify required parameter 'shipmentId' is not null or undefined
|
|
162
|
+
(0, common_1.assertParamExists)('getGovernmentInvoiceStatus', 'shipmentId', shipmentId);
|
|
163
|
+
// verify required parameter 'invoiceType' is not null or undefined
|
|
164
|
+
(0, common_1.assertParamExists)('getGovernmentInvoiceStatus', 'invoiceType', invoiceType);
|
|
165
|
+
const localVarPath = `/tax/invoices/2024-06-19/governmentInvoiceRequests`;
|
|
166
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
167
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
168
|
+
let baseOptions;
|
|
169
|
+
if (configuration) {
|
|
170
|
+
baseOptions = configuration.baseOptions;
|
|
171
|
+
}
|
|
172
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
173
|
+
const localVarHeaderParameter = {};
|
|
174
|
+
const localVarQueryParameter = {};
|
|
175
|
+
if (marketplaceId !== undefined) {
|
|
176
|
+
localVarQueryParameter['marketplaceId'] = marketplaceId;
|
|
177
|
+
}
|
|
178
|
+
if (transactionType !== undefined) {
|
|
179
|
+
localVarQueryParameter['transactionType'] = transactionType;
|
|
180
|
+
}
|
|
181
|
+
if (shipmentId !== undefined) {
|
|
182
|
+
localVarQueryParameter['shipmentId'] = shipmentId;
|
|
183
|
+
}
|
|
184
|
+
if (invoiceType !== undefined) {
|
|
185
|
+
localVarQueryParameter['invoiceType'] = invoiceType;
|
|
186
|
+
}
|
|
187
|
+
if (inboundPlanId !== undefined) {
|
|
188
|
+
localVarQueryParameter['inboundPlanId'] = inboundPlanId;
|
|
189
|
+
}
|
|
190
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
191
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
192
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
193
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
194
|
+
return {
|
|
195
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
196
|
+
options: localVarRequestOptions,
|
|
197
|
+
};
|
|
198
|
+
},
|
|
61
199
|
/**
|
|
62
200
|
* Returns invoice data for the specified invoice. This operation returns only a subset of the invoices data; refer to the response definition to get all the possible attributes. To get the full invoice, use the `createInvoicesExport` operation to start an export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | 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 indicates 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 in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
63
201
|
* @param {string} marketplaceId The marketplace from which you want the invoice.
|
|
@@ -333,6 +471,18 @@ exports.InvoicesApiAxiosParamCreator = InvoicesApiAxiosParamCreator;
|
|
|
333
471
|
const InvoicesApiFp = function (configuration) {
|
|
334
472
|
const localVarAxiosParamCreator = (0, exports.InvoicesApiAxiosParamCreator)(configuration);
|
|
335
473
|
return {
|
|
474
|
+
/**
|
|
475
|
+
* Submits an asynchronous government invoice creation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
476
|
+
* @param {GovernmentInvoiceRequest} body Information required to create the government invoice.
|
|
477
|
+
* @param {*} [options] Override http request option.
|
|
478
|
+
* @throws {RequiredError}
|
|
479
|
+
*/
|
|
480
|
+
async createGovernmentInvoice(body, options) {
|
|
481
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createGovernmentInvoice(body, options);
|
|
482
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
483
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['InvoicesApi.createGovernmentInvoice']?.[localVarOperationServerIndex]?.url;
|
|
484
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
485
|
+
},
|
|
336
486
|
/**
|
|
337
487
|
* Creates an invoice export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.167 | 1 | 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 indicates 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 in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
338
488
|
* @param {ExportInvoicesRequest} body Information required to create the export request.
|
|
@@ -345,6 +495,39 @@ const InvoicesApiFp = function (configuration) {
|
|
|
345
495
|
const localVarOperationServerBasePath = base_1.operationServerMap['InvoicesApi.createInvoicesExport']?.[localVarOperationServerIndex]?.url;
|
|
346
496
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
347
497
|
},
|
|
498
|
+
/**
|
|
499
|
+
* Returns an invoiceDocument object containing an invoiceDocumentUrl . **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
500
|
+
* @param {string} marketplaceId The invoices returned will match the marketplace that you specify.
|
|
501
|
+
* @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \'transactionType\' options using \'getInvoicesAttributes\' operation.
|
|
502
|
+
* @param {string} shipmentId The unique shipment identifier to get an invoice for.
|
|
503
|
+
* @param {string} invoiceType Marketplace specific classification of the invoice type. Check \'invoiceType\' options using \'getInvoicesAttributes\' operation.
|
|
504
|
+
* @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
|
|
505
|
+
* @param {string} [fileFormat] Requested file format. Default is XML
|
|
506
|
+
* @param {*} [options] Override http request option.
|
|
507
|
+
* @throws {RequiredError}
|
|
508
|
+
*/
|
|
509
|
+
async getGovernmentInvoiceDocument(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, fileFormat, options) {
|
|
510
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getGovernmentInvoiceDocument(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, fileFormat, options);
|
|
511
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
512
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['InvoicesApi.getGovernmentInvoiceDocument']?.[localVarOperationServerIndex]?.url;
|
|
513
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
514
|
+
},
|
|
515
|
+
/**
|
|
516
|
+
* Returns the status of an invoice generation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
517
|
+
* @param {string} marketplaceId The invoices status will match the marketplace that you specify.
|
|
518
|
+
* @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \'transactionType\' options using \'getInvoicesAttributes\' operation.
|
|
519
|
+
* @param {string} shipmentId The unique shipment identifier to get an invoice for.
|
|
520
|
+
* @param {string} invoiceType Marketplace specific classification of the invoice type. Check \'invoiceType\' options using \'getInvoicesAttributes\' operation.
|
|
521
|
+
* @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
|
|
522
|
+
* @param {*} [options] Override http request option.
|
|
523
|
+
* @throws {RequiredError}
|
|
524
|
+
*/
|
|
525
|
+
async getGovernmentInvoiceStatus(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, options) {
|
|
526
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getGovernmentInvoiceStatus(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, options);
|
|
527
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
528
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['InvoicesApi.getGovernmentInvoiceStatus']?.[localVarOperationServerIndex]?.url;
|
|
529
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
530
|
+
},
|
|
348
531
|
/**
|
|
349
532
|
* Returns invoice data for the specified invoice. This operation returns only a subset of the invoices data; refer to the response definition to get all the possible attributes. To get the full invoice, use the `createInvoicesExport` operation to start an export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | 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 indicates 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 in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
350
533
|
* @param {string} marketplaceId The marketplace from which you want the invoice.
|
|
@@ -445,6 +628,15 @@ exports.InvoicesApiFp = InvoicesApiFp;
|
|
|
445
628
|
const InvoicesApiFactory = function (configuration, basePath, axios) {
|
|
446
629
|
const localVarFp = (0, exports.InvoicesApiFp)(configuration);
|
|
447
630
|
return {
|
|
631
|
+
/**
|
|
632
|
+
* Submits an asynchronous government invoice creation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
633
|
+
* @param {InvoicesApiCreateGovernmentInvoiceRequest} requestParameters Request parameters.
|
|
634
|
+
* @param {*} [options] Override http request option.
|
|
635
|
+
* @throws {RequiredError}
|
|
636
|
+
*/
|
|
637
|
+
createGovernmentInvoice(requestParameters, options) {
|
|
638
|
+
return localVarFp.createGovernmentInvoice(requestParameters.body, options).then((request) => request(axios, basePath));
|
|
639
|
+
},
|
|
448
640
|
/**
|
|
449
641
|
* Creates an invoice export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.167 | 1 | 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 indicates 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 in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
450
642
|
* @param {InvoicesApiCreateInvoicesExportRequest} requestParameters Request parameters.
|
|
@@ -454,6 +646,24 @@ const InvoicesApiFactory = function (configuration, basePath, axios) {
|
|
|
454
646
|
createInvoicesExport(requestParameters, options) {
|
|
455
647
|
return localVarFp.createInvoicesExport(requestParameters.body, options).then((request) => request(axios, basePath));
|
|
456
648
|
},
|
|
649
|
+
/**
|
|
650
|
+
* Returns an invoiceDocument object containing an invoiceDocumentUrl . **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
651
|
+
* @param {InvoicesApiGetGovernmentInvoiceDocumentRequest} requestParameters Request parameters.
|
|
652
|
+
* @param {*} [options] Override http request option.
|
|
653
|
+
* @throws {RequiredError}
|
|
654
|
+
*/
|
|
655
|
+
getGovernmentInvoiceDocument(requestParameters, options) {
|
|
656
|
+
return localVarFp.getGovernmentInvoiceDocument(requestParameters.marketplaceId, requestParameters.transactionType, requestParameters.shipmentId, requestParameters.invoiceType, requestParameters.inboundPlanId, requestParameters.fileFormat, options).then((request) => request(axios, basePath));
|
|
657
|
+
},
|
|
658
|
+
/**
|
|
659
|
+
* Returns the status of an invoice generation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
660
|
+
* @param {InvoicesApiGetGovernmentInvoiceStatusRequest} requestParameters Request parameters.
|
|
661
|
+
* @param {*} [options] Override http request option.
|
|
662
|
+
* @throws {RequiredError}
|
|
663
|
+
*/
|
|
664
|
+
getGovernmentInvoiceStatus(requestParameters, options) {
|
|
665
|
+
return localVarFp.getGovernmentInvoiceStatus(requestParameters.marketplaceId, requestParameters.transactionType, requestParameters.shipmentId, requestParameters.invoiceType, requestParameters.inboundPlanId, options).then((request) => request(axios, basePath));
|
|
666
|
+
},
|
|
457
667
|
/**
|
|
458
668
|
* Returns invoice data for the specified invoice. This operation returns only a subset of the invoices data; refer to the response definition to get all the possible attributes. To get the full invoice, use the `createInvoicesExport` operation to start an export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | 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 indicates 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 in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
459
669
|
* @param {InvoicesApiGetInvoiceRequest} requestParameters Request parameters.
|
|
@@ -515,6 +725,15 @@ exports.InvoicesApiFactory = InvoicesApiFactory;
|
|
|
515
725
|
* InvoicesApi - object-oriented interface
|
|
516
726
|
*/
|
|
517
727
|
class InvoicesApi extends base_1.BaseAPI {
|
|
728
|
+
/**
|
|
729
|
+
* Submits an asynchronous government invoice creation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
730
|
+
* @param {InvoicesApiCreateGovernmentInvoiceRequest} requestParameters Request parameters.
|
|
731
|
+
* @param {*} [options] Override http request option.
|
|
732
|
+
* @throws {RequiredError}
|
|
733
|
+
*/
|
|
734
|
+
createGovernmentInvoice(requestParameters, options) {
|
|
735
|
+
return (0, exports.InvoicesApiFp)(this.configuration).createGovernmentInvoice(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
736
|
+
}
|
|
518
737
|
/**
|
|
519
738
|
* Creates an invoice export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.167 | 1 | 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 indicates 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 in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
520
739
|
* @param {InvoicesApiCreateInvoicesExportRequest} requestParameters Request parameters.
|
|
@@ -524,6 +743,24 @@ class InvoicesApi extends base_1.BaseAPI {
|
|
|
524
743
|
createInvoicesExport(requestParameters, options) {
|
|
525
744
|
return (0, exports.InvoicesApiFp)(this.configuration).createInvoicesExport(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
526
745
|
}
|
|
746
|
+
/**
|
|
747
|
+
* Returns an invoiceDocument object containing an invoiceDocumentUrl . **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
748
|
+
* @param {InvoicesApiGetGovernmentInvoiceDocumentRequest} requestParameters Request parameters.
|
|
749
|
+
* @param {*} [options] Override http request option.
|
|
750
|
+
* @throws {RequiredError}
|
|
751
|
+
*/
|
|
752
|
+
getGovernmentInvoiceDocument(requestParameters, options) {
|
|
753
|
+
return (0, exports.InvoicesApiFp)(this.configuration).getGovernmentInvoiceDocument(requestParameters.marketplaceId, requestParameters.transactionType, requestParameters.shipmentId, requestParameters.invoiceType, requestParameters.inboundPlanId, requestParameters.fileFormat, options).then((request) => request(this.axios, this.basePath));
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Returns the status of an invoice generation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
757
|
+
* @param {InvoicesApiGetGovernmentInvoiceStatusRequest} requestParameters Request parameters.
|
|
758
|
+
* @param {*} [options] Override http request option.
|
|
759
|
+
* @throws {RequiredError}
|
|
760
|
+
*/
|
|
761
|
+
getGovernmentInvoiceStatus(requestParameters, options) {
|
|
762
|
+
return (0, exports.InvoicesApiFp)(this.configuration).getGovernmentInvoiceStatus(requestParameters.marketplaceId, requestParameters.transactionType, requestParameters.shipmentId, requestParameters.invoiceType, requestParameters.inboundPlanId, options).then((request) => request(this.axios, this.basePath));
|
|
763
|
+
}
|
|
527
764
|
/**
|
|
528
765
|
* Returns invoice data for the specified invoice. This operation returns only a subset of the invoices data; refer to the response definition to get all the possible attributes. To get the full invoice, use the `createInvoicesExport` operation to start an export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | 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 indicates 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 in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
529
766
|
* @param {InvoicesApiGetInvoiceRequest} requestParameters Request parameters.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Invoices.
|
|
6
|
+
* Use the Selling Partner API for Invoices to retrieve and manage invoice-related operations, which can help selling partners manage their bookkeeping processes.
|
|
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 });
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Invoices.
|
|
6
|
+
* Use the Selling Partner API for Invoices to retrieve and manage invoice-related operations, which can help selling partners manage their bookkeeping processes.
|
|
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.GovernmentInvoiceCreationStatus = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* The current status of a government invoice creation request.
|
|
19
|
+
*/
|
|
20
|
+
exports.GovernmentInvoiceCreationStatus = {
|
|
21
|
+
Processing: 'PROCESSING',
|
|
22
|
+
Success: 'SUCCESS',
|
|
23
|
+
Error: 'ERROR'
|
|
24
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Invoices.
|
|
6
|
+
* Use the Selling Partner API for Invoices to retrieve and manage invoice-related operations, which can help selling partners manage their bookkeeping processes.
|
|
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 });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Invoices.
|
|
6
|
+
* Use the Selling Partner API for Invoices to retrieve and manage invoice-related operations, which can help selling partners manage their bookkeeping processes.
|
|
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 });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Invoices.
|
|
6
|
+
* Use the Selling Partner API for Invoices to retrieve and manage invoice-related operations, which can help selling partners manage their bookkeeping processes.
|
|
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 });
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./attribute-option"), exports);
|
|
18
|
+
__exportStar(require("./carrier-details-context"), exports);
|
|
18
19
|
__exportStar(require("./error-list"), exports);
|
|
19
20
|
__exportStar(require("./export"), exports);
|
|
20
21
|
__exportStar(require("./export-invoices-request"), exports);
|
|
@@ -27,7 +28,13 @@ __exportStar(require("./get-invoices-document-response"), exports);
|
|
|
27
28
|
__exportStar(require("./get-invoices-export-response"), exports);
|
|
28
29
|
__exportStar(require("./get-invoices-exports-response"), exports);
|
|
29
30
|
__exportStar(require("./get-invoices-response"), exports);
|
|
31
|
+
__exportStar(require("./government-invoice-creation-status"), exports);
|
|
32
|
+
__exportStar(require("./government-invoice-request"), exports);
|
|
33
|
+
__exportStar(require("./government-invoice-status-response"), exports);
|
|
34
|
+
__exportStar(require("./govt-invoice-document-response"), exports);
|
|
30
35
|
__exportStar(require("./invoice"), exports);
|
|
36
|
+
__exportStar(require("./invoice-document"), exports);
|
|
37
|
+
__exportStar(require("./invoice-error"), exports);
|
|
31
38
|
__exportStar(require("./invoices-attributes"), exports);
|
|
32
39
|
__exportStar(require("./invoices-document"), exports);
|
|
33
40
|
__exportStar(require("./model-error"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Invoices.
|
|
6
|
+
* Use the Selling Partner API for Invoices to retrieve and manage invoice-related operations, which can help selling partners manage their bookkeeping processes.
|
|
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 });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Invoices.
|
|
6
|
+
* Use the Selling Partner API for Invoices to retrieve and manage invoice-related operations, which can help selling partners manage their bookkeeping processes.
|
|
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 });
|
package/dist/cjs/client.js
CHANGED
|
@@ -39,6 +39,27 @@ exports.clientRateLimits = [
|
|
|
39
39
|
rate: 2,
|
|
40
40
|
burst: 15,
|
|
41
41
|
},
|
|
42
|
+
{
|
|
43
|
+
method: 'post',
|
|
44
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
45
|
+
urlRegex: new RegExp('^/tax/invoices/2024-06-19/governmentInvoiceRequests$'),
|
|
46
|
+
rate: 0.0167,
|
|
47
|
+
burst: 1,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
method: 'get',
|
|
51
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
52
|
+
urlRegex: new RegExp('^/tax/invoices/2024-06-19/governmentInvoiceRequests$'),
|
|
53
|
+
rate: 0.0167,
|
|
54
|
+
burst: 1,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
method: 'get',
|
|
58
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
59
|
+
urlRegex: new RegExp('^/tax/invoices/2024-06-19/governmentInvoiceRequests/[^/]*$'),
|
|
60
|
+
rate: 0.0167,
|
|
61
|
+
burst: 1,
|
|
62
|
+
},
|
|
42
63
|
{
|
|
43
64
|
method: 'get',
|
|
44
65
|
// eslint-disable-next-line prefer-regex-literals
|