@sp-api-sdk/invoices-api-2024-06-19 2.1.3 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/index.cjs +1090 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{types/api-model/api/invoices-api.d.ts → index.d.cts} +853 -45
- package/dist/index.d.ts +1408 -0
- package/dist/index.js +1042 -0
- package/dist/index.js.map +1 -0
- package/package.json +23 -12
- package/dist/cjs/api-model/api/invoices-api.js +0 -832
- package/dist/cjs/api-model/api.js +0 -30
- package/dist/cjs/api-model/base.js +0 -52
- package/dist/cjs/api-model/common.js +0 -123
- package/dist/cjs/api-model/configuration.js +0 -98
- package/dist/cjs/api-model/index.js +0 -32
- package/dist/cjs/api-model/models/attribute-option.js +0 -15
- package/dist/cjs/api-model/models/carrier-details-context.js +0 -15
- package/dist/cjs/api-model/models/error-list.js +0 -15
- package/dist/cjs/api-model/models/export-invoices-request.js +0 -15
- package/dist/cjs/api-model/models/export-invoices-response.js +0 -15
- package/dist/cjs/api-model/models/export-status.js +0 -25
- package/dist/cjs/api-model/models/export.js +0 -15
- package/dist/cjs/api-model/models/file-format.js +0 -22
- package/dist/cjs/api-model/models/get-invoice-response.js +0 -15
- package/dist/cjs/api-model/models/get-invoices-attributes-response.js +0 -15
- package/dist/cjs/api-model/models/get-invoices-document-response.js +0 -15
- package/dist/cjs/api-model/models/get-invoices-export-response.js +0 -15
- package/dist/cjs/api-model/models/get-invoices-exports-response.js +0 -15
- package/dist/cjs/api-model/models/get-invoices-response.js +0 -15
- package/dist/cjs/api-model/models/government-invoice-creation-status.js +0 -24
- package/dist/cjs/api-model/models/government-invoice-request.js +0 -15
- package/dist/cjs/api-model/models/government-invoice-status-response.js +0 -15
- package/dist/cjs/api-model/models/govt-invoice-document-response.js +0 -15
- package/dist/cjs/api-model/models/index.js +0 -41
- package/dist/cjs/api-model/models/invoice-document.js +0 -15
- package/dist/cjs/api-model/models/invoice-error.js +0 -15
- package/dist/cjs/api-model/models/invoice.js +0 -15
- package/dist/cjs/api-model/models/invoices-attributes.js +0 -15
- package/dist/cjs/api-model/models/invoices-document.js +0 -15
- package/dist/cjs/api-model/models/model-error.js +0 -15
- package/dist/cjs/api-model/models/transaction-identifier.js +0 -15
- package/dist/cjs/client.js +0 -84
- package/dist/cjs/index.js +0 -19
- package/dist/es/api-model/api/invoices-api.js +0 -822
- package/dist/es/api-model/api.js +0 -14
- package/dist/es/api-model/base.js +0 -44
- package/dist/es/api-model/common.js +0 -110
- package/dist/es/api-model/configuration.js +0 -94
- package/dist/es/api-model/index.js +0 -16
- package/dist/es/api-model/models/attribute-option.js +0 -14
- package/dist/es/api-model/models/carrier-details-context.js +0 -14
- package/dist/es/api-model/models/error-list.js +0 -14
- package/dist/es/api-model/models/export-invoices-request.js +0 -14
- package/dist/es/api-model/models/export-invoices-response.js +0 -14
- package/dist/es/api-model/models/export-status.js +0 -22
- package/dist/es/api-model/models/export.js +0 -14
- package/dist/es/api-model/models/file-format.js +0 -19
- package/dist/es/api-model/models/get-invoice-response.js +0 -14
- package/dist/es/api-model/models/get-invoices-attributes-response.js +0 -14
- package/dist/es/api-model/models/get-invoices-document-response.js +0 -14
- package/dist/es/api-model/models/get-invoices-export-response.js +0 -14
- package/dist/es/api-model/models/get-invoices-exports-response.js +0 -14
- package/dist/es/api-model/models/get-invoices-response.js +0 -14
- package/dist/es/api-model/models/government-invoice-creation-status.js +0 -21
- package/dist/es/api-model/models/government-invoice-request.js +0 -14
- package/dist/es/api-model/models/government-invoice-status-response.js +0 -14
- package/dist/es/api-model/models/govt-invoice-document-response.js +0 -14
- package/dist/es/api-model/models/index.js +0 -25
- package/dist/es/api-model/models/invoice-document.js +0 -14
- package/dist/es/api-model/models/invoice-error.js +0 -14
- package/dist/es/api-model/models/invoice.js +0 -14
- package/dist/es/api-model/models/invoices-attributes.js +0 -14
- package/dist/es/api-model/models/invoices-document.js +0 -14
- package/dist/es/api-model/models/model-error.js +0 -14
- package/dist/es/api-model/models/transaction-identifier.js +0 -14
- package/dist/es/client.js +0 -80
- package/dist/es/index.js +0 -3
- package/dist/types/api-model/api.d.ts +0 -12
- package/dist/types/api-model/base.d.ts +0 -42
- package/dist/types/api-model/common.d.ts +0 -34
- package/dist/types/api-model/configuration.d.ts +0 -98
- package/dist/types/api-model/index.d.ts +0 -14
- package/dist/types/api-model/models/attribute-option.d.ts +0 -24
- package/dist/types/api-model/models/carrier-details-context.d.ts +0 -48
- package/dist/types/api-model/models/error-list.d.ts +0 -20
- package/dist/types/api-model/models/export-invoices-request.d.ts +0 -52
- package/dist/types/api-model/models/export-invoices-response.d.ts +0 -20
- package/dist/types/api-model/models/export-status.d.ts +0 -21
- package/dist/types/api-model/models/export.d.ts +0 -38
- package/dist/types/api-model/models/file-format.d.ts +0 -18
- package/dist/types/api-model/models/get-invoice-response.d.ts +0 -18
- package/dist/types/api-model/models/get-invoices-attributes-response.d.ts +0 -18
- package/dist/types/api-model/models/get-invoices-document-response.d.ts +0 -18
- package/dist/types/api-model/models/get-invoices-export-response.d.ts +0 -18
- package/dist/types/api-model/models/get-invoices-exports-response.d.ts +0 -25
- package/dist/types/api-model/models/get-invoices-response.d.ts +0 -25
- package/dist/types/api-model/models/government-invoice-creation-status.d.ts +0 -20
- package/dist/types/api-model/models/government-invoice-request.d.ts +0 -41
- package/dist/types/api-model/models/government-invoice-status-response.d.ts +0 -27
- package/dist/types/api-model/models/govt-invoice-document-response.d.ts +0 -18
- package/dist/types/api-model/models/index.d.ts +0 -25
- package/dist/types/api-model/models/invoice-document.d.ts +0 -20
- package/dist/types/api-model/models/invoice-error.d.ts +0 -24
- package/dist/types/api-model/models/invoice.d.ts +0 -57
- package/dist/types/api-model/models/invoices-attributes.d.ts +0 -33
- package/dist/types/api-model/models/invoices-document.d.ts +0 -24
- package/dist/types/api-model/models/model-error.d.ts +0 -28
- package/dist/types/api-model/models/transaction-identifier.d.ts +0 -24
- package/dist/types/client.d.ts +0 -6
- package/dist/types/index.d.ts +0 -3
|
@@ -1,822 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* The Selling Partner API for Invoices.
|
|
5
|
-
* Use the Selling Partner API for Invoices to retrieve and manage invoice-related operations, which can help selling partners manage their bookkeeping processes.
|
|
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, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
18
|
-
// @ts-ignore
|
|
19
|
-
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from '../base';
|
|
20
|
-
/**
|
|
21
|
-
* InvoicesApi - axios parameter creator
|
|
22
|
-
*/
|
|
23
|
-
export const InvoicesApiAxiosParamCreator = function (configuration) {
|
|
24
|
-
return {
|
|
25
|
-
/**
|
|
26
|
-
* 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.
|
|
27
|
-
* @param {GovernmentInvoiceRequest} body Information required to create the government invoice.
|
|
28
|
-
* @param {*} [options] Override http request option.
|
|
29
|
-
* @throws {RequiredError}
|
|
30
|
-
*/
|
|
31
|
-
createGovernmentInvoice: async (body, options = {}) => {
|
|
32
|
-
// verify required parameter 'body' is not null or undefined
|
|
33
|
-
assertParamExists('createGovernmentInvoice', 'body', body);
|
|
34
|
-
const localVarPath = `/tax/invoices/2024-06-19/governmentInvoiceRequests`;
|
|
35
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
36
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
37
|
-
let baseOptions;
|
|
38
|
-
if (configuration) {
|
|
39
|
-
baseOptions = configuration.baseOptions;
|
|
40
|
-
}
|
|
41
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
42
|
-
const localVarHeaderParameter = {};
|
|
43
|
-
const localVarQueryParameter = {};
|
|
44
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
45
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
46
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
47
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
48
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
49
|
-
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
50
|
-
return {
|
|
51
|
-
url: toPathString(localVarUrlObj),
|
|
52
|
-
options: localVarRequestOptions,
|
|
53
|
-
};
|
|
54
|
-
},
|
|
55
|
-
/**
|
|
56
|
-
* 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).
|
|
57
|
-
* @param {ExportInvoicesRequest} body Information required to create the export request.
|
|
58
|
-
* @param {*} [options] Override http request option.
|
|
59
|
-
* @throws {RequiredError}
|
|
60
|
-
*/
|
|
61
|
-
createInvoicesExport: async (body, options = {}) => {
|
|
62
|
-
// verify required parameter 'body' is not null or undefined
|
|
63
|
-
assertParamExists('createInvoicesExport', 'body', body);
|
|
64
|
-
const localVarPath = `/tax/invoices/2024-06-19/exports`;
|
|
65
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
66
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
67
|
-
let baseOptions;
|
|
68
|
-
if (configuration) {
|
|
69
|
-
baseOptions = configuration.baseOptions;
|
|
70
|
-
}
|
|
71
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
72
|
-
const localVarHeaderParameter = {};
|
|
73
|
-
const localVarQueryParameter = {};
|
|
74
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
75
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
76
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
77
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
78
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
79
|
-
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
80
|
-
return {
|
|
81
|
-
url: toPathString(localVarUrlObj),
|
|
82
|
-
options: localVarRequestOptions,
|
|
83
|
-
};
|
|
84
|
-
},
|
|
85
|
-
/**
|
|
86
|
-
* 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.
|
|
87
|
-
* @param {string} marketplaceId The invoices returned will match the marketplace that you specify.
|
|
88
|
-
* @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \'transactionType\' options using \'getInvoicesAttributes\' operation.
|
|
89
|
-
* @param {string} shipmentId The unique shipment identifier to get an invoice for.
|
|
90
|
-
* @param {string} invoiceType Marketplace specific classification of the invoice type. Check \'invoiceType\' options using \'getInvoicesAttributes\' operation.
|
|
91
|
-
* @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
|
|
92
|
-
* @param {string} [fileFormat] Requested file format. Default is XML
|
|
93
|
-
* @param {*} [options] Override http request option.
|
|
94
|
-
* @throws {RequiredError}
|
|
95
|
-
*/
|
|
96
|
-
getGovernmentInvoiceDocument: async (marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, fileFormat, options = {}) => {
|
|
97
|
-
// verify required parameter 'marketplaceId' is not null or undefined
|
|
98
|
-
assertParamExists('getGovernmentInvoiceDocument', 'marketplaceId', marketplaceId);
|
|
99
|
-
// verify required parameter 'transactionType' is not null or undefined
|
|
100
|
-
assertParamExists('getGovernmentInvoiceDocument', 'transactionType', transactionType);
|
|
101
|
-
// verify required parameter 'shipmentId' is not null or undefined
|
|
102
|
-
assertParamExists('getGovernmentInvoiceDocument', 'shipmentId', shipmentId);
|
|
103
|
-
// verify required parameter 'invoiceType' is not null or undefined
|
|
104
|
-
assertParamExists('getGovernmentInvoiceDocument', 'invoiceType', invoiceType);
|
|
105
|
-
const localVarPath = `/tax/invoices/2024-06-19/governmentInvoiceRequests/{shipmentId}`
|
|
106
|
-
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
|
|
107
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
108
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
109
|
-
let baseOptions;
|
|
110
|
-
if (configuration) {
|
|
111
|
-
baseOptions = configuration.baseOptions;
|
|
112
|
-
}
|
|
113
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
114
|
-
const localVarHeaderParameter = {};
|
|
115
|
-
const localVarQueryParameter = {};
|
|
116
|
-
if (marketplaceId !== undefined) {
|
|
117
|
-
localVarQueryParameter['marketplaceId'] = marketplaceId;
|
|
118
|
-
}
|
|
119
|
-
if (transactionType !== undefined) {
|
|
120
|
-
localVarQueryParameter['transactionType'] = transactionType;
|
|
121
|
-
}
|
|
122
|
-
if (invoiceType !== undefined) {
|
|
123
|
-
localVarQueryParameter['invoiceType'] = invoiceType;
|
|
124
|
-
}
|
|
125
|
-
if (inboundPlanId !== undefined) {
|
|
126
|
-
localVarQueryParameter['inboundPlanId'] = inboundPlanId;
|
|
127
|
-
}
|
|
128
|
-
if (fileFormat !== undefined) {
|
|
129
|
-
localVarQueryParameter['fileFormat'] = fileFormat;
|
|
130
|
-
}
|
|
131
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
132
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
133
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
134
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
135
|
-
return {
|
|
136
|
-
url: toPathString(localVarUrlObj),
|
|
137
|
-
options: localVarRequestOptions,
|
|
138
|
-
};
|
|
139
|
-
},
|
|
140
|
-
/**
|
|
141
|
-
* 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.
|
|
142
|
-
* @param {string} marketplaceId The invoices status will match the marketplace that you specify.
|
|
143
|
-
* @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \'transactionType\' options using \'getInvoicesAttributes\' operation.
|
|
144
|
-
* @param {string} shipmentId The unique shipment identifier to get an invoice for.
|
|
145
|
-
* @param {string} invoiceType Marketplace specific classification of the invoice type. Check \'invoiceType\' options using \'getInvoicesAttributes\' operation.
|
|
146
|
-
* @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
|
|
147
|
-
* @param {*} [options] Override http request option.
|
|
148
|
-
* @throws {RequiredError}
|
|
149
|
-
*/
|
|
150
|
-
getGovernmentInvoiceStatus: async (marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, options = {}) => {
|
|
151
|
-
// verify required parameter 'marketplaceId' is not null or undefined
|
|
152
|
-
assertParamExists('getGovernmentInvoiceStatus', 'marketplaceId', marketplaceId);
|
|
153
|
-
// verify required parameter 'transactionType' is not null or undefined
|
|
154
|
-
assertParamExists('getGovernmentInvoiceStatus', 'transactionType', transactionType);
|
|
155
|
-
// verify required parameter 'shipmentId' is not null or undefined
|
|
156
|
-
assertParamExists('getGovernmentInvoiceStatus', 'shipmentId', shipmentId);
|
|
157
|
-
// verify required parameter 'invoiceType' is not null or undefined
|
|
158
|
-
assertParamExists('getGovernmentInvoiceStatus', 'invoiceType', invoiceType);
|
|
159
|
-
const localVarPath = `/tax/invoices/2024-06-19/governmentInvoiceRequests`;
|
|
160
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
161
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
162
|
-
let baseOptions;
|
|
163
|
-
if (configuration) {
|
|
164
|
-
baseOptions = configuration.baseOptions;
|
|
165
|
-
}
|
|
166
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
167
|
-
const localVarHeaderParameter = {};
|
|
168
|
-
const localVarQueryParameter = {};
|
|
169
|
-
if (marketplaceId !== undefined) {
|
|
170
|
-
localVarQueryParameter['marketplaceId'] = marketplaceId;
|
|
171
|
-
}
|
|
172
|
-
if (transactionType !== undefined) {
|
|
173
|
-
localVarQueryParameter['transactionType'] = transactionType;
|
|
174
|
-
}
|
|
175
|
-
if (shipmentId !== undefined) {
|
|
176
|
-
localVarQueryParameter['shipmentId'] = shipmentId;
|
|
177
|
-
}
|
|
178
|
-
if (invoiceType !== undefined) {
|
|
179
|
-
localVarQueryParameter['invoiceType'] = invoiceType;
|
|
180
|
-
}
|
|
181
|
-
if (inboundPlanId !== undefined) {
|
|
182
|
-
localVarQueryParameter['inboundPlanId'] = inboundPlanId;
|
|
183
|
-
}
|
|
184
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
185
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
186
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
187
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
188
|
-
return {
|
|
189
|
-
url: toPathString(localVarUrlObj),
|
|
190
|
-
options: localVarRequestOptions,
|
|
191
|
-
};
|
|
192
|
-
},
|
|
193
|
-
/**
|
|
194
|
-
* 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).
|
|
195
|
-
* @param {string} marketplaceId The marketplace from which you want the invoice.
|
|
196
|
-
* @param {string} invoiceId The invoice identifier.
|
|
197
|
-
* @param {*} [options] Override http request option.
|
|
198
|
-
* @throws {RequiredError}
|
|
199
|
-
*/
|
|
200
|
-
getInvoice: async (marketplaceId, invoiceId, options = {}) => {
|
|
201
|
-
// verify required parameter 'marketplaceId' is not null or undefined
|
|
202
|
-
assertParamExists('getInvoice', 'marketplaceId', marketplaceId);
|
|
203
|
-
// verify required parameter 'invoiceId' is not null or undefined
|
|
204
|
-
assertParamExists('getInvoice', 'invoiceId', invoiceId);
|
|
205
|
-
const localVarPath = `/tax/invoices/2024-06-19/invoices/{invoiceId}`
|
|
206
|
-
.replace(`{${"invoiceId"}}`, encodeURIComponent(String(invoiceId)));
|
|
207
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
208
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
209
|
-
let baseOptions;
|
|
210
|
-
if (configuration) {
|
|
211
|
-
baseOptions = configuration.baseOptions;
|
|
212
|
-
}
|
|
213
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
214
|
-
const localVarHeaderParameter = {};
|
|
215
|
-
const localVarQueryParameter = {};
|
|
216
|
-
if (marketplaceId !== undefined) {
|
|
217
|
-
localVarQueryParameter['marketplaceId'] = marketplaceId;
|
|
218
|
-
}
|
|
219
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
220
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
221
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
222
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
223
|
-
return {
|
|
224
|
-
url: toPathString(localVarUrlObj),
|
|
225
|
-
options: localVarRequestOptions,
|
|
226
|
-
};
|
|
227
|
-
},
|
|
228
|
-
/**
|
|
229
|
-
* Returns invoice details for the invoices that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | 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).
|
|
230
|
-
* @param {string} marketplaceId The response includes only the invoices that match the specified marketplace.
|
|
231
|
-
* @param {string} [transactionIdentifierName] The name of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the `transactionIdentifierId` field.Use the `getInvoicesAttributes` operation to check `transactionIdentifierName` options.
|
|
232
|
-
* @param {number} [pageSize] The maximum number of invoices you want to return in a single call. Minimum: 1 Maximum: 200
|
|
233
|
-
* @param {string} [dateEnd] The latest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is the current date-time.
|
|
234
|
-
* @param {string} [transactionType] The marketplace-specific classification of the transaction type for which the invoice was created. Use the `getInvoicesAttributes` operation to check `transactionType` options.
|
|
235
|
-
* @param {string} [transactionIdentifierId] The ID of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the `transactionIdentifierName` field.
|
|
236
|
-
* @param {string} [dateStart] The earliest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 24 hours prior to the time of the request.
|
|
237
|
-
* @param {string} [series] Return invoices with the specified series number.
|
|
238
|
-
* @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
239
|
-
* @param {GetInvoicesSortOrderEnum} [sortOrder] Sort the invoices in the response in ascending or descending order.
|
|
240
|
-
* @param {string} [invoiceType] The marketplace-specific classification of the invoice type. Use the `getInvoicesAttributes` operation to check `invoiceType` options.
|
|
241
|
-
* @param {Array<string>} [statuses] A list of statuses that you can use to filter invoices. Use the `getInvoicesAttributes` operation to check invoice status options. Min count: 1
|
|
242
|
-
* @param {string} [externalInvoiceId] Return invoices that match this external ID. This is typically the Government Invoice ID.
|
|
243
|
-
* @param {GetInvoicesSortByEnum} [sortBy] The attribute by which you want to sort the invoices in the response.
|
|
244
|
-
* @param {*} [options] Override http request option.
|
|
245
|
-
* @throws {RequiredError}
|
|
246
|
-
*/
|
|
247
|
-
getInvoices: async (marketplaceId, transactionIdentifierName, pageSize, dateEnd, transactionType, transactionIdentifierId, dateStart, series, nextToken, sortOrder, invoiceType, statuses, externalInvoiceId, sortBy, options = {}) => {
|
|
248
|
-
// verify required parameter 'marketplaceId' is not null or undefined
|
|
249
|
-
assertParamExists('getInvoices', 'marketplaceId', marketplaceId);
|
|
250
|
-
const localVarPath = `/tax/invoices/2024-06-19/invoices`;
|
|
251
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
252
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
253
|
-
let baseOptions;
|
|
254
|
-
if (configuration) {
|
|
255
|
-
baseOptions = configuration.baseOptions;
|
|
256
|
-
}
|
|
257
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
258
|
-
const localVarHeaderParameter = {};
|
|
259
|
-
const localVarQueryParameter = {};
|
|
260
|
-
if (transactionIdentifierName !== undefined) {
|
|
261
|
-
localVarQueryParameter['transactionIdentifierName'] = transactionIdentifierName;
|
|
262
|
-
}
|
|
263
|
-
if (pageSize !== undefined) {
|
|
264
|
-
localVarQueryParameter['pageSize'] = pageSize;
|
|
265
|
-
}
|
|
266
|
-
if (dateEnd !== undefined) {
|
|
267
|
-
localVarQueryParameter['dateEnd'] = (dateEnd instanceof Date) ?
|
|
268
|
-
dateEnd.toISOString() :
|
|
269
|
-
dateEnd;
|
|
270
|
-
}
|
|
271
|
-
if (marketplaceId !== undefined) {
|
|
272
|
-
localVarQueryParameter['marketplaceId'] = marketplaceId;
|
|
273
|
-
}
|
|
274
|
-
if (transactionType !== undefined) {
|
|
275
|
-
localVarQueryParameter['transactionType'] = transactionType;
|
|
276
|
-
}
|
|
277
|
-
if (transactionIdentifierId !== undefined) {
|
|
278
|
-
localVarQueryParameter['transactionIdentifierId'] = transactionIdentifierId;
|
|
279
|
-
}
|
|
280
|
-
if (dateStart !== undefined) {
|
|
281
|
-
localVarQueryParameter['dateStart'] = (dateStart instanceof Date) ?
|
|
282
|
-
dateStart.toISOString() :
|
|
283
|
-
dateStart;
|
|
284
|
-
}
|
|
285
|
-
if (series !== undefined) {
|
|
286
|
-
localVarQueryParameter['series'] = series;
|
|
287
|
-
}
|
|
288
|
-
if (nextToken !== undefined) {
|
|
289
|
-
localVarQueryParameter['nextToken'] = nextToken;
|
|
290
|
-
}
|
|
291
|
-
if (sortOrder !== undefined) {
|
|
292
|
-
localVarQueryParameter['sortOrder'] = sortOrder;
|
|
293
|
-
}
|
|
294
|
-
if (invoiceType !== undefined) {
|
|
295
|
-
localVarQueryParameter['invoiceType'] = invoiceType;
|
|
296
|
-
}
|
|
297
|
-
if (statuses) {
|
|
298
|
-
localVarQueryParameter['statuses'] = statuses.join(COLLECTION_FORMATS.csv);
|
|
299
|
-
}
|
|
300
|
-
if (externalInvoiceId !== undefined) {
|
|
301
|
-
localVarQueryParameter['externalInvoiceId'] = externalInvoiceId;
|
|
302
|
-
}
|
|
303
|
-
if (sortBy !== undefined) {
|
|
304
|
-
localVarQueryParameter['sortBy'] = sortBy;
|
|
305
|
-
}
|
|
306
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
307
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
308
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
309
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
310
|
-
return {
|
|
311
|
-
url: toPathString(localVarUrlObj),
|
|
312
|
-
options: localVarRequestOptions,
|
|
313
|
-
};
|
|
314
|
-
},
|
|
315
|
-
/**
|
|
316
|
-
* Returns marketplace-dependent schemas and their respective set of possible values. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 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).
|
|
317
|
-
* @param {string} marketplaceId The marketplace identifier.
|
|
318
|
-
* @param {*} [options] Override http request option.
|
|
319
|
-
* @throws {RequiredError}
|
|
320
|
-
*/
|
|
321
|
-
getInvoicesAttributes: async (marketplaceId, options = {}) => {
|
|
322
|
-
// verify required parameter 'marketplaceId' is not null or undefined
|
|
323
|
-
assertParamExists('getInvoicesAttributes', 'marketplaceId', marketplaceId);
|
|
324
|
-
const localVarPath = `/tax/invoices/2024-06-19/attributes`;
|
|
325
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
326
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
327
|
-
let baseOptions;
|
|
328
|
-
if (configuration) {
|
|
329
|
-
baseOptions = configuration.baseOptions;
|
|
330
|
-
}
|
|
331
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
332
|
-
const localVarHeaderParameter = {};
|
|
333
|
-
const localVarQueryParameter = {};
|
|
334
|
-
if (marketplaceId !== undefined) {
|
|
335
|
-
localVarQueryParameter['marketplaceId'] = marketplaceId;
|
|
336
|
-
}
|
|
337
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
338
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
339
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
340
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
341
|
-
return {
|
|
342
|
-
url: toPathString(localVarUrlObj),
|
|
343
|
-
options: localVarRequestOptions,
|
|
344
|
-
};
|
|
345
|
-
},
|
|
346
|
-
/**
|
|
347
|
-
* Returns the invoice document\'s ID and URL. Use the URL to download the ZIP file, which contains the invoices from the corresponding `createInvoicesExport` request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 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).
|
|
348
|
-
* @param {string} invoicesDocumentId The export document identifier.
|
|
349
|
-
* @param {*} [options] Override http request option.
|
|
350
|
-
* @throws {RequiredError}
|
|
351
|
-
*/
|
|
352
|
-
getInvoicesDocument: async (invoicesDocumentId, options = {}) => {
|
|
353
|
-
// verify required parameter 'invoicesDocumentId' is not null or undefined
|
|
354
|
-
assertParamExists('getInvoicesDocument', 'invoicesDocumentId', invoicesDocumentId);
|
|
355
|
-
const localVarPath = `/tax/invoices/2024-06-19/documents/{invoicesDocumentId}`
|
|
356
|
-
.replace(`{${"invoicesDocumentId"}}`, encodeURIComponent(String(invoicesDocumentId)));
|
|
357
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
358
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
359
|
-
let baseOptions;
|
|
360
|
-
if (configuration) {
|
|
361
|
-
baseOptions = configuration.baseOptions;
|
|
362
|
-
}
|
|
363
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
364
|
-
const localVarHeaderParameter = {};
|
|
365
|
-
const localVarQueryParameter = {};
|
|
366
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
367
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
368
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
369
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
370
|
-
return {
|
|
371
|
-
url: toPathString(localVarUrlObj),
|
|
372
|
-
options: localVarRequestOptions,
|
|
373
|
-
};
|
|
374
|
-
},
|
|
375
|
-
/**
|
|
376
|
-
* Returns invoice export details (including the `exportDocumentId`, if available) for the export that you specify. **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).
|
|
377
|
-
* @param {string} exportId The unique identifier for the export.
|
|
378
|
-
* @param {*} [options] Override http request option.
|
|
379
|
-
* @throws {RequiredError}
|
|
380
|
-
*/
|
|
381
|
-
getInvoicesExport: async (exportId, options = {}) => {
|
|
382
|
-
// verify required parameter 'exportId' is not null or undefined
|
|
383
|
-
assertParamExists('getInvoicesExport', 'exportId', exportId);
|
|
384
|
-
const localVarPath = `/tax/invoices/2024-06-19/exports/{exportId}`
|
|
385
|
-
.replace(`{${"exportId"}}`, encodeURIComponent(String(exportId)));
|
|
386
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
387
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
388
|
-
let baseOptions;
|
|
389
|
-
if (configuration) {
|
|
390
|
-
baseOptions = configuration.baseOptions;
|
|
391
|
-
}
|
|
392
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
393
|
-
const localVarHeaderParameter = {};
|
|
394
|
-
const localVarQueryParameter = {};
|
|
395
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
396
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
397
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
398
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
399
|
-
return {
|
|
400
|
-
url: toPathString(localVarUrlObj),
|
|
401
|
-
options: localVarRequestOptions,
|
|
402
|
-
};
|
|
403
|
-
},
|
|
404
|
-
/**
|
|
405
|
-
* Returns invoice exports details for exports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | 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).
|
|
406
|
-
* @param {string} marketplaceId The returned exports match the specified marketplace.
|
|
407
|
-
* @param {string} [dateStart] The earliest export creation date and time for exports that you want to include in the response. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 30 days ago.
|
|
408
|
-
* @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
409
|
-
* @param {number} [pageSize] The maximum number of invoices to return in a single call. Minimum: 1 Maximum: 100
|
|
410
|
-
* @param {string} [dateEnd] The latest export creation date and time for exports that you want to include in the response. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default value is the time of the request.
|
|
411
|
-
* @param {GetInvoicesExportsStatusEnum} [status] Return exports matching the status specified.
|
|
412
|
-
* @param {*} [options] Override http request option.
|
|
413
|
-
* @throws {RequiredError}
|
|
414
|
-
*/
|
|
415
|
-
getInvoicesExports: async (marketplaceId, dateStart, nextToken, pageSize, dateEnd, status, options = {}) => {
|
|
416
|
-
// verify required parameter 'marketplaceId' is not null or undefined
|
|
417
|
-
assertParamExists('getInvoicesExports', 'marketplaceId', marketplaceId);
|
|
418
|
-
const localVarPath = `/tax/invoices/2024-06-19/exports`;
|
|
419
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
420
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
421
|
-
let baseOptions;
|
|
422
|
-
if (configuration) {
|
|
423
|
-
baseOptions = configuration.baseOptions;
|
|
424
|
-
}
|
|
425
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
426
|
-
const localVarHeaderParameter = {};
|
|
427
|
-
const localVarQueryParameter = {};
|
|
428
|
-
if (marketplaceId !== undefined) {
|
|
429
|
-
localVarQueryParameter['marketplaceId'] = marketplaceId;
|
|
430
|
-
}
|
|
431
|
-
if (dateStart !== undefined) {
|
|
432
|
-
localVarQueryParameter['dateStart'] = (dateStart instanceof Date) ?
|
|
433
|
-
dateStart.toISOString() :
|
|
434
|
-
dateStart;
|
|
435
|
-
}
|
|
436
|
-
if (nextToken !== undefined) {
|
|
437
|
-
localVarQueryParameter['nextToken'] = nextToken;
|
|
438
|
-
}
|
|
439
|
-
if (pageSize !== undefined) {
|
|
440
|
-
localVarQueryParameter['pageSize'] = pageSize;
|
|
441
|
-
}
|
|
442
|
-
if (dateEnd !== undefined) {
|
|
443
|
-
localVarQueryParameter['dateEnd'] = (dateEnd instanceof Date) ?
|
|
444
|
-
dateEnd.toISOString() :
|
|
445
|
-
dateEnd;
|
|
446
|
-
}
|
|
447
|
-
if (status !== undefined) {
|
|
448
|
-
localVarQueryParameter['status'] = status;
|
|
449
|
-
}
|
|
450
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
451
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
452
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
453
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
454
|
-
return {
|
|
455
|
-
url: toPathString(localVarUrlObj),
|
|
456
|
-
options: localVarRequestOptions,
|
|
457
|
-
};
|
|
458
|
-
},
|
|
459
|
-
};
|
|
460
|
-
};
|
|
461
|
-
/**
|
|
462
|
-
* InvoicesApi - functional programming interface
|
|
463
|
-
*/
|
|
464
|
-
export const InvoicesApiFp = function (configuration) {
|
|
465
|
-
const localVarAxiosParamCreator = InvoicesApiAxiosParamCreator(configuration);
|
|
466
|
-
return {
|
|
467
|
-
/**
|
|
468
|
-
* 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.
|
|
469
|
-
* @param {GovernmentInvoiceRequest} body Information required to create the government invoice.
|
|
470
|
-
* @param {*} [options] Override http request option.
|
|
471
|
-
* @throws {RequiredError}
|
|
472
|
-
*/
|
|
473
|
-
async createGovernmentInvoice(body, options) {
|
|
474
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createGovernmentInvoice(body, options);
|
|
475
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
476
|
-
const localVarOperationServerBasePath = operationServerMap['InvoicesApi.createGovernmentInvoice']?.[localVarOperationServerIndex]?.url;
|
|
477
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
478
|
-
},
|
|
479
|
-
/**
|
|
480
|
-
* 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).
|
|
481
|
-
* @param {ExportInvoicesRequest} body Information required to create the export request.
|
|
482
|
-
* @param {*} [options] Override http request option.
|
|
483
|
-
* @throws {RequiredError}
|
|
484
|
-
*/
|
|
485
|
-
async createInvoicesExport(body, options) {
|
|
486
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createInvoicesExport(body, options);
|
|
487
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
488
|
-
const localVarOperationServerBasePath = operationServerMap['InvoicesApi.createInvoicesExport']?.[localVarOperationServerIndex]?.url;
|
|
489
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
490
|
-
},
|
|
491
|
-
/**
|
|
492
|
-
* 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.
|
|
493
|
-
* @param {string} marketplaceId The invoices returned will match the marketplace that you specify.
|
|
494
|
-
* @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \'transactionType\' options using \'getInvoicesAttributes\' operation.
|
|
495
|
-
* @param {string} shipmentId The unique shipment identifier to get an invoice for.
|
|
496
|
-
* @param {string} invoiceType Marketplace specific classification of the invoice type. Check \'invoiceType\' options using \'getInvoicesAttributes\' operation.
|
|
497
|
-
* @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
|
|
498
|
-
* @param {string} [fileFormat] Requested file format. Default is XML
|
|
499
|
-
* @param {*} [options] Override http request option.
|
|
500
|
-
* @throws {RequiredError}
|
|
501
|
-
*/
|
|
502
|
-
async getGovernmentInvoiceDocument(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, fileFormat, options) {
|
|
503
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getGovernmentInvoiceDocument(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, fileFormat, options);
|
|
504
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
505
|
-
const localVarOperationServerBasePath = operationServerMap['InvoicesApi.getGovernmentInvoiceDocument']?.[localVarOperationServerIndex]?.url;
|
|
506
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
507
|
-
},
|
|
508
|
-
/**
|
|
509
|
-
* 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.
|
|
510
|
-
* @param {string} marketplaceId The invoices status will match the marketplace that you specify.
|
|
511
|
-
* @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \'transactionType\' options using \'getInvoicesAttributes\' operation.
|
|
512
|
-
* @param {string} shipmentId The unique shipment identifier to get an invoice for.
|
|
513
|
-
* @param {string} invoiceType Marketplace specific classification of the invoice type. Check \'invoiceType\' options using \'getInvoicesAttributes\' operation.
|
|
514
|
-
* @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
|
|
515
|
-
* @param {*} [options] Override http request option.
|
|
516
|
-
* @throws {RequiredError}
|
|
517
|
-
*/
|
|
518
|
-
async getGovernmentInvoiceStatus(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, options) {
|
|
519
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getGovernmentInvoiceStatus(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, options);
|
|
520
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
521
|
-
const localVarOperationServerBasePath = operationServerMap['InvoicesApi.getGovernmentInvoiceStatus']?.[localVarOperationServerIndex]?.url;
|
|
522
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
523
|
-
},
|
|
524
|
-
/**
|
|
525
|
-
* 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).
|
|
526
|
-
* @param {string} marketplaceId The marketplace from which you want the invoice.
|
|
527
|
-
* @param {string} invoiceId The invoice identifier.
|
|
528
|
-
* @param {*} [options] Override http request option.
|
|
529
|
-
* @throws {RequiredError}
|
|
530
|
-
*/
|
|
531
|
-
async getInvoice(marketplaceId, invoiceId, options) {
|
|
532
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoice(marketplaceId, invoiceId, options);
|
|
533
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
534
|
-
const localVarOperationServerBasePath = operationServerMap['InvoicesApi.getInvoice']?.[localVarOperationServerIndex]?.url;
|
|
535
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
536
|
-
},
|
|
537
|
-
/**
|
|
538
|
-
* Returns invoice details for the invoices that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | 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).
|
|
539
|
-
* @param {string} marketplaceId The response includes only the invoices that match the specified marketplace.
|
|
540
|
-
* @param {string} [transactionIdentifierName] The name of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the `transactionIdentifierId` field.Use the `getInvoicesAttributes` operation to check `transactionIdentifierName` options.
|
|
541
|
-
* @param {number} [pageSize] The maximum number of invoices you want to return in a single call. Minimum: 1 Maximum: 200
|
|
542
|
-
* @param {string} [dateEnd] The latest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is the current date-time.
|
|
543
|
-
* @param {string} [transactionType] The marketplace-specific classification of the transaction type for which the invoice was created. Use the `getInvoicesAttributes` operation to check `transactionType` options.
|
|
544
|
-
* @param {string} [transactionIdentifierId] The ID of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the `transactionIdentifierName` field.
|
|
545
|
-
* @param {string} [dateStart] The earliest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 24 hours prior to the time of the request.
|
|
546
|
-
* @param {string} [series] Return invoices with the specified series number.
|
|
547
|
-
* @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
548
|
-
* @param {GetInvoicesSortOrderEnum} [sortOrder] Sort the invoices in the response in ascending or descending order.
|
|
549
|
-
* @param {string} [invoiceType] The marketplace-specific classification of the invoice type. Use the `getInvoicesAttributes` operation to check `invoiceType` options.
|
|
550
|
-
* @param {Array<string>} [statuses] A list of statuses that you can use to filter invoices. Use the `getInvoicesAttributes` operation to check invoice status options. Min count: 1
|
|
551
|
-
* @param {string} [externalInvoiceId] Return invoices that match this external ID. This is typically the Government Invoice ID.
|
|
552
|
-
* @param {GetInvoicesSortByEnum} [sortBy] The attribute by which you want to sort the invoices in the response.
|
|
553
|
-
* @param {*} [options] Override http request option.
|
|
554
|
-
* @throws {RequiredError}
|
|
555
|
-
*/
|
|
556
|
-
async getInvoices(marketplaceId, transactionIdentifierName, pageSize, dateEnd, transactionType, transactionIdentifierId, dateStart, series, nextToken, sortOrder, invoiceType, statuses, externalInvoiceId, sortBy, options) {
|
|
557
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoices(marketplaceId, transactionIdentifierName, pageSize, dateEnd, transactionType, transactionIdentifierId, dateStart, series, nextToken, sortOrder, invoiceType, statuses, externalInvoiceId, sortBy, options);
|
|
558
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
559
|
-
const localVarOperationServerBasePath = operationServerMap['InvoicesApi.getInvoices']?.[localVarOperationServerIndex]?.url;
|
|
560
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
561
|
-
},
|
|
562
|
-
/**
|
|
563
|
-
* Returns marketplace-dependent schemas and their respective set of possible values. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 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).
|
|
564
|
-
* @param {string} marketplaceId The marketplace identifier.
|
|
565
|
-
* @param {*} [options] Override http request option.
|
|
566
|
-
* @throws {RequiredError}
|
|
567
|
-
*/
|
|
568
|
-
async getInvoicesAttributes(marketplaceId, options) {
|
|
569
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoicesAttributes(marketplaceId, options);
|
|
570
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
571
|
-
const localVarOperationServerBasePath = operationServerMap['InvoicesApi.getInvoicesAttributes']?.[localVarOperationServerIndex]?.url;
|
|
572
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
573
|
-
},
|
|
574
|
-
/**
|
|
575
|
-
* Returns the invoice document\'s ID and URL. Use the URL to download the ZIP file, which contains the invoices from the corresponding `createInvoicesExport` request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 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).
|
|
576
|
-
* @param {string} invoicesDocumentId The export document identifier.
|
|
577
|
-
* @param {*} [options] Override http request option.
|
|
578
|
-
* @throws {RequiredError}
|
|
579
|
-
*/
|
|
580
|
-
async getInvoicesDocument(invoicesDocumentId, options) {
|
|
581
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoicesDocument(invoicesDocumentId, options);
|
|
582
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
583
|
-
const localVarOperationServerBasePath = operationServerMap['InvoicesApi.getInvoicesDocument']?.[localVarOperationServerIndex]?.url;
|
|
584
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
585
|
-
},
|
|
586
|
-
/**
|
|
587
|
-
* Returns invoice export details (including the `exportDocumentId`, if available) for the export that you specify. **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).
|
|
588
|
-
* @param {string} exportId The unique identifier for the export.
|
|
589
|
-
* @param {*} [options] Override http request option.
|
|
590
|
-
* @throws {RequiredError}
|
|
591
|
-
*/
|
|
592
|
-
async getInvoicesExport(exportId, options) {
|
|
593
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoicesExport(exportId, options);
|
|
594
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
595
|
-
const localVarOperationServerBasePath = operationServerMap['InvoicesApi.getInvoicesExport']?.[localVarOperationServerIndex]?.url;
|
|
596
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
597
|
-
},
|
|
598
|
-
/**
|
|
599
|
-
* Returns invoice exports details for exports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | 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).
|
|
600
|
-
* @param {string} marketplaceId The returned exports match the specified marketplace.
|
|
601
|
-
* @param {string} [dateStart] The earliest export creation date and time for exports that you want to include in the response. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 30 days ago.
|
|
602
|
-
* @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
603
|
-
* @param {number} [pageSize] The maximum number of invoices to return in a single call. Minimum: 1 Maximum: 100
|
|
604
|
-
* @param {string} [dateEnd] The latest export creation date and time for exports that you want to include in the response. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default value is the time of the request.
|
|
605
|
-
* @param {GetInvoicesExportsStatusEnum} [status] Return exports matching the status specified.
|
|
606
|
-
* @param {*} [options] Override http request option.
|
|
607
|
-
* @throws {RequiredError}
|
|
608
|
-
*/
|
|
609
|
-
async getInvoicesExports(marketplaceId, dateStart, nextToken, pageSize, dateEnd, status, options) {
|
|
610
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoicesExports(marketplaceId, dateStart, nextToken, pageSize, dateEnd, status, options);
|
|
611
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
612
|
-
const localVarOperationServerBasePath = operationServerMap['InvoicesApi.getInvoicesExports']?.[localVarOperationServerIndex]?.url;
|
|
613
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
614
|
-
},
|
|
615
|
-
};
|
|
616
|
-
};
|
|
617
|
-
/**
|
|
618
|
-
* InvoicesApi - factory interface
|
|
619
|
-
*/
|
|
620
|
-
export const InvoicesApiFactory = function (configuration, basePath, axios) {
|
|
621
|
-
const localVarFp = InvoicesApiFp(configuration);
|
|
622
|
-
return {
|
|
623
|
-
/**
|
|
624
|
-
* 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.
|
|
625
|
-
* @param {InvoicesApiCreateGovernmentInvoiceRequest} requestParameters Request parameters.
|
|
626
|
-
* @param {*} [options] Override http request option.
|
|
627
|
-
* @throws {RequiredError}
|
|
628
|
-
*/
|
|
629
|
-
createGovernmentInvoice(requestParameters, options) {
|
|
630
|
-
return localVarFp.createGovernmentInvoice(requestParameters.body, options).then((request) => request(axios, basePath));
|
|
631
|
-
},
|
|
632
|
-
/**
|
|
633
|
-
* 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).
|
|
634
|
-
* @param {InvoicesApiCreateInvoicesExportRequest} requestParameters Request parameters.
|
|
635
|
-
* @param {*} [options] Override http request option.
|
|
636
|
-
* @throws {RequiredError}
|
|
637
|
-
*/
|
|
638
|
-
createInvoicesExport(requestParameters, options) {
|
|
639
|
-
return localVarFp.createInvoicesExport(requestParameters.body, options).then((request) => request(axios, basePath));
|
|
640
|
-
},
|
|
641
|
-
/**
|
|
642
|
-
* 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.
|
|
643
|
-
* @param {InvoicesApiGetGovernmentInvoiceDocumentRequest} requestParameters Request parameters.
|
|
644
|
-
* @param {*} [options] Override http request option.
|
|
645
|
-
* @throws {RequiredError}
|
|
646
|
-
*/
|
|
647
|
-
getGovernmentInvoiceDocument(requestParameters, options) {
|
|
648
|
-
return localVarFp.getGovernmentInvoiceDocument(requestParameters.marketplaceId, requestParameters.transactionType, requestParameters.shipmentId, requestParameters.invoiceType, requestParameters.inboundPlanId, requestParameters.fileFormat, options).then((request) => request(axios, basePath));
|
|
649
|
-
},
|
|
650
|
-
/**
|
|
651
|
-
* 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.
|
|
652
|
-
* @param {InvoicesApiGetGovernmentInvoiceStatusRequest} requestParameters Request parameters.
|
|
653
|
-
* @param {*} [options] Override http request option.
|
|
654
|
-
* @throws {RequiredError}
|
|
655
|
-
*/
|
|
656
|
-
getGovernmentInvoiceStatus(requestParameters, options) {
|
|
657
|
-
return localVarFp.getGovernmentInvoiceStatus(requestParameters.marketplaceId, requestParameters.transactionType, requestParameters.shipmentId, requestParameters.invoiceType, requestParameters.inboundPlanId, options).then((request) => request(axios, basePath));
|
|
658
|
-
},
|
|
659
|
-
/**
|
|
660
|
-
* 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).
|
|
661
|
-
* @param {InvoicesApiGetInvoiceRequest} requestParameters Request parameters.
|
|
662
|
-
* @param {*} [options] Override http request option.
|
|
663
|
-
* @throws {RequiredError}
|
|
664
|
-
*/
|
|
665
|
-
getInvoice(requestParameters, options) {
|
|
666
|
-
return localVarFp.getInvoice(requestParameters.marketplaceId, requestParameters.invoiceId, options).then((request) => request(axios, basePath));
|
|
667
|
-
},
|
|
668
|
-
/**
|
|
669
|
-
* Returns invoice details for the invoices that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | 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).
|
|
670
|
-
* @param {InvoicesApiGetInvoicesRequest} requestParameters Request parameters.
|
|
671
|
-
* @param {*} [options] Override http request option.
|
|
672
|
-
* @throws {RequiredError}
|
|
673
|
-
*/
|
|
674
|
-
getInvoices(requestParameters, options) {
|
|
675
|
-
return localVarFp.getInvoices(requestParameters.marketplaceId, requestParameters.transactionIdentifierName, requestParameters.pageSize, requestParameters.dateEnd, requestParameters.transactionType, requestParameters.transactionIdentifierId, requestParameters.dateStart, requestParameters.series, requestParameters.nextToken, requestParameters.sortOrder, requestParameters.invoiceType, requestParameters.statuses, requestParameters.externalInvoiceId, requestParameters.sortBy, options).then((request) => request(axios, basePath));
|
|
676
|
-
},
|
|
677
|
-
/**
|
|
678
|
-
* Returns marketplace-dependent schemas and their respective set of possible values. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 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).
|
|
679
|
-
* @param {InvoicesApiGetInvoicesAttributesRequest} requestParameters Request parameters.
|
|
680
|
-
* @param {*} [options] Override http request option.
|
|
681
|
-
* @throws {RequiredError}
|
|
682
|
-
*/
|
|
683
|
-
getInvoicesAttributes(requestParameters, options) {
|
|
684
|
-
return localVarFp.getInvoicesAttributes(requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
|
|
685
|
-
},
|
|
686
|
-
/**
|
|
687
|
-
* Returns the invoice document\'s ID and URL. Use the URL to download the ZIP file, which contains the invoices from the corresponding `createInvoicesExport` request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 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).
|
|
688
|
-
* @param {InvoicesApiGetInvoicesDocumentRequest} requestParameters Request parameters.
|
|
689
|
-
* @param {*} [options] Override http request option.
|
|
690
|
-
* @throws {RequiredError}
|
|
691
|
-
*/
|
|
692
|
-
getInvoicesDocument(requestParameters, options) {
|
|
693
|
-
return localVarFp.getInvoicesDocument(requestParameters.invoicesDocumentId, options).then((request) => request(axios, basePath));
|
|
694
|
-
},
|
|
695
|
-
/**
|
|
696
|
-
* Returns invoice export details (including the `exportDocumentId`, if available) for the export that you specify. **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).
|
|
697
|
-
* @param {InvoicesApiGetInvoicesExportRequest} requestParameters Request parameters.
|
|
698
|
-
* @param {*} [options] Override http request option.
|
|
699
|
-
* @throws {RequiredError}
|
|
700
|
-
*/
|
|
701
|
-
getInvoicesExport(requestParameters, options) {
|
|
702
|
-
return localVarFp.getInvoicesExport(requestParameters.exportId, options).then((request) => request(axios, basePath));
|
|
703
|
-
},
|
|
704
|
-
/**
|
|
705
|
-
* Returns invoice exports details for exports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | 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).
|
|
706
|
-
* @param {InvoicesApiGetInvoicesExportsRequest} requestParameters Request parameters.
|
|
707
|
-
* @param {*} [options] Override http request option.
|
|
708
|
-
* @throws {RequiredError}
|
|
709
|
-
*/
|
|
710
|
-
getInvoicesExports(requestParameters, options) {
|
|
711
|
-
return localVarFp.getInvoicesExports(requestParameters.marketplaceId, requestParameters.dateStart, requestParameters.nextToken, requestParameters.pageSize, requestParameters.dateEnd, requestParameters.status, options).then((request) => request(axios, basePath));
|
|
712
|
-
},
|
|
713
|
-
};
|
|
714
|
-
};
|
|
715
|
-
/**
|
|
716
|
-
* InvoicesApi - object-oriented interface
|
|
717
|
-
*/
|
|
718
|
-
export class InvoicesApi extends BaseAPI {
|
|
719
|
-
/**
|
|
720
|
-
* 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.
|
|
721
|
-
* @param {InvoicesApiCreateGovernmentInvoiceRequest} requestParameters Request parameters.
|
|
722
|
-
* @param {*} [options] Override http request option.
|
|
723
|
-
* @throws {RequiredError}
|
|
724
|
-
*/
|
|
725
|
-
createGovernmentInvoice(requestParameters, options) {
|
|
726
|
-
return InvoicesApiFp(this.configuration).createGovernmentInvoice(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
727
|
-
}
|
|
728
|
-
/**
|
|
729
|
-
* 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).
|
|
730
|
-
* @param {InvoicesApiCreateInvoicesExportRequest} requestParameters Request parameters.
|
|
731
|
-
* @param {*} [options] Override http request option.
|
|
732
|
-
* @throws {RequiredError}
|
|
733
|
-
*/
|
|
734
|
-
createInvoicesExport(requestParameters, options) {
|
|
735
|
-
return InvoicesApiFp(this.configuration).createInvoicesExport(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
736
|
-
}
|
|
737
|
-
/**
|
|
738
|
-
* 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.
|
|
739
|
-
* @param {InvoicesApiGetGovernmentInvoiceDocumentRequest} requestParameters Request parameters.
|
|
740
|
-
* @param {*} [options] Override http request option.
|
|
741
|
-
* @throws {RequiredError}
|
|
742
|
-
*/
|
|
743
|
-
getGovernmentInvoiceDocument(requestParameters, options) {
|
|
744
|
-
return InvoicesApiFp(this.configuration).getGovernmentInvoiceDocument(requestParameters.marketplaceId, requestParameters.transactionType, requestParameters.shipmentId, requestParameters.invoiceType, requestParameters.inboundPlanId, requestParameters.fileFormat, options).then((request) => request(this.axios, this.basePath));
|
|
745
|
-
}
|
|
746
|
-
/**
|
|
747
|
-
* 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.
|
|
748
|
-
* @param {InvoicesApiGetGovernmentInvoiceStatusRequest} requestParameters Request parameters.
|
|
749
|
-
* @param {*} [options] Override http request option.
|
|
750
|
-
* @throws {RequiredError}
|
|
751
|
-
*/
|
|
752
|
-
getGovernmentInvoiceStatus(requestParameters, options) {
|
|
753
|
-
return InvoicesApiFp(this.configuration).getGovernmentInvoiceStatus(requestParameters.marketplaceId, requestParameters.transactionType, requestParameters.shipmentId, requestParameters.invoiceType, requestParameters.inboundPlanId, options).then((request) => request(this.axios, this.basePath));
|
|
754
|
-
}
|
|
755
|
-
/**
|
|
756
|
-
* 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).
|
|
757
|
-
* @param {InvoicesApiGetInvoiceRequest} requestParameters Request parameters.
|
|
758
|
-
* @param {*} [options] Override http request option.
|
|
759
|
-
* @throws {RequiredError}
|
|
760
|
-
*/
|
|
761
|
-
getInvoice(requestParameters, options) {
|
|
762
|
-
return InvoicesApiFp(this.configuration).getInvoice(requestParameters.marketplaceId, requestParameters.invoiceId, options).then((request) => request(this.axios, this.basePath));
|
|
763
|
-
}
|
|
764
|
-
/**
|
|
765
|
-
* Returns invoice details for the invoices that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | 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).
|
|
766
|
-
* @param {InvoicesApiGetInvoicesRequest} requestParameters Request parameters.
|
|
767
|
-
* @param {*} [options] Override http request option.
|
|
768
|
-
* @throws {RequiredError}
|
|
769
|
-
*/
|
|
770
|
-
getInvoices(requestParameters, options) {
|
|
771
|
-
return InvoicesApiFp(this.configuration).getInvoices(requestParameters.marketplaceId, requestParameters.transactionIdentifierName, requestParameters.pageSize, requestParameters.dateEnd, requestParameters.transactionType, requestParameters.transactionIdentifierId, requestParameters.dateStart, requestParameters.series, requestParameters.nextToken, requestParameters.sortOrder, requestParameters.invoiceType, requestParameters.statuses, requestParameters.externalInvoiceId, requestParameters.sortBy, options).then((request) => request(this.axios, this.basePath));
|
|
772
|
-
}
|
|
773
|
-
/**
|
|
774
|
-
* Returns marketplace-dependent schemas and their respective set of possible values. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 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).
|
|
775
|
-
* @param {InvoicesApiGetInvoicesAttributesRequest} requestParameters Request parameters.
|
|
776
|
-
* @param {*} [options] Override http request option.
|
|
777
|
-
* @throws {RequiredError}
|
|
778
|
-
*/
|
|
779
|
-
getInvoicesAttributes(requestParameters, options) {
|
|
780
|
-
return InvoicesApiFp(this.configuration).getInvoicesAttributes(requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
|
|
781
|
-
}
|
|
782
|
-
/**
|
|
783
|
-
* Returns the invoice document\'s ID and URL. Use the URL to download the ZIP file, which contains the invoices from the corresponding `createInvoicesExport` request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 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).
|
|
784
|
-
* @param {InvoicesApiGetInvoicesDocumentRequest} requestParameters Request parameters.
|
|
785
|
-
* @param {*} [options] Override http request option.
|
|
786
|
-
* @throws {RequiredError}
|
|
787
|
-
*/
|
|
788
|
-
getInvoicesDocument(requestParameters, options) {
|
|
789
|
-
return InvoicesApiFp(this.configuration).getInvoicesDocument(requestParameters.invoicesDocumentId, options).then((request) => request(this.axios, this.basePath));
|
|
790
|
-
}
|
|
791
|
-
/**
|
|
792
|
-
* Returns invoice export details (including the `exportDocumentId`, if available) for the export that you specify. **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).
|
|
793
|
-
* @param {InvoicesApiGetInvoicesExportRequest} requestParameters Request parameters.
|
|
794
|
-
* @param {*} [options] Override http request option.
|
|
795
|
-
* @throws {RequiredError}
|
|
796
|
-
*/
|
|
797
|
-
getInvoicesExport(requestParameters, options) {
|
|
798
|
-
return InvoicesApiFp(this.configuration).getInvoicesExport(requestParameters.exportId, options).then((request) => request(this.axios, this.basePath));
|
|
799
|
-
}
|
|
800
|
-
/**
|
|
801
|
-
* Returns invoice exports details for exports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | 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).
|
|
802
|
-
* @param {InvoicesApiGetInvoicesExportsRequest} requestParameters Request parameters.
|
|
803
|
-
* @param {*} [options] Override http request option.
|
|
804
|
-
* @throws {RequiredError}
|
|
805
|
-
*/
|
|
806
|
-
getInvoicesExports(requestParameters, options) {
|
|
807
|
-
return InvoicesApiFp(this.configuration).getInvoicesExports(requestParameters.marketplaceId, requestParameters.dateStart, requestParameters.nextToken, requestParameters.pageSize, requestParameters.dateEnd, requestParameters.status, options).then((request) => request(this.axios, this.basePath));
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
export const GetInvoicesSortOrderEnum = {
|
|
811
|
-
Desc: 'DESC',
|
|
812
|
-
Asc: 'ASC'
|
|
813
|
-
};
|
|
814
|
-
export const GetInvoicesSortByEnum = {
|
|
815
|
-
StartDateTime: 'START_DATE_TIME'
|
|
816
|
-
};
|
|
817
|
-
export const GetInvoicesExportsStatusEnum = {
|
|
818
|
-
Requested: 'REQUESTED',
|
|
819
|
-
Processing: 'PROCESSING',
|
|
820
|
-
Done: 'DONE',
|
|
821
|
-
Error: 'ERROR'
|
|
822
|
-
};
|