@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
package/dist/index.js
ADDED
|
@@ -0,0 +1,1042 @@
|
|
|
1
|
+
// src/client.ts
|
|
2
|
+
import { createAxiosInstance } from "@sp-api-sdk/common";
|
|
3
|
+
|
|
4
|
+
// src/api-model/api/invoices-api.ts
|
|
5
|
+
import globalAxios2 from "axios";
|
|
6
|
+
|
|
7
|
+
// src/api-model/base.ts
|
|
8
|
+
import globalAxios from "axios";
|
|
9
|
+
var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
10
|
+
var COLLECTION_FORMATS = {
|
|
11
|
+
csv: ",",
|
|
12
|
+
ssv: " ",
|
|
13
|
+
tsv: " ",
|
|
14
|
+
pipes: "|"
|
|
15
|
+
};
|
|
16
|
+
var BaseAPI = class {
|
|
17
|
+
constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
|
|
18
|
+
this.basePath = basePath;
|
|
19
|
+
this.axios = axios;
|
|
20
|
+
if (configuration) {
|
|
21
|
+
this.configuration = configuration;
|
|
22
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
basePath;
|
|
26
|
+
axios;
|
|
27
|
+
configuration;
|
|
28
|
+
};
|
|
29
|
+
var RequiredError = class extends Error {
|
|
30
|
+
constructor(field, msg) {
|
|
31
|
+
super(msg);
|
|
32
|
+
this.field = field;
|
|
33
|
+
this.name = "RequiredError";
|
|
34
|
+
}
|
|
35
|
+
field;
|
|
36
|
+
};
|
|
37
|
+
var operationServerMap = {};
|
|
38
|
+
|
|
39
|
+
// src/api-model/common.ts
|
|
40
|
+
var DUMMY_BASE_URL = "https://example.com";
|
|
41
|
+
var assertParamExists = function(functionName, paramName, paramValue) {
|
|
42
|
+
if (paramValue === null || paramValue === void 0) {
|
|
43
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
47
|
+
if (parameter == null) return;
|
|
48
|
+
if (typeof parameter === "object") {
|
|
49
|
+
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
50
|
+
parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
51
|
+
} else {
|
|
52
|
+
Object.keys(parameter).forEach(
|
|
53
|
+
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
if (urlSearchParams.has(key)) {
|
|
58
|
+
urlSearchParams.append(key, parameter);
|
|
59
|
+
} else {
|
|
60
|
+
urlSearchParams.set(key, parameter);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
var setSearchParams = function(url, ...objects) {
|
|
65
|
+
const searchParams = new URLSearchParams(url.search);
|
|
66
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
67
|
+
url.search = searchParams.toString();
|
|
68
|
+
};
|
|
69
|
+
var replaceWithSerializableTypeIfNeeded = function(key, value) {
|
|
70
|
+
if (value instanceof Set) {
|
|
71
|
+
return Array.from(value);
|
|
72
|
+
} else {
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
var serializeDataIfNeeded = function(value, requestOptions, configuration) {
|
|
77
|
+
const nonString = typeof value !== "string";
|
|
78
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
|
|
79
|
+
return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || "";
|
|
80
|
+
};
|
|
81
|
+
var toPathString = function(url) {
|
|
82
|
+
return url.pathname + url.search + url.hash;
|
|
83
|
+
};
|
|
84
|
+
var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
|
|
85
|
+
return (axios = globalAxios3, basePath = BASE_PATH2) => {
|
|
86
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
87
|
+
return axios.request(axiosRequestArgs);
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
// src/api-model/api/invoices-api.ts
|
|
92
|
+
var InvoicesApiAxiosParamCreator = function(configuration) {
|
|
93
|
+
return {
|
|
94
|
+
/**
|
|
95
|
+
* 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.
|
|
96
|
+
* @param {GovernmentInvoiceRequest} body Information required to create the government invoice.
|
|
97
|
+
* @param {*} [options] Override http request option.
|
|
98
|
+
* @throws {RequiredError}
|
|
99
|
+
*/
|
|
100
|
+
createGovernmentInvoice: async (body, options = {}) => {
|
|
101
|
+
assertParamExists("createGovernmentInvoice", "body", body);
|
|
102
|
+
const localVarPath = `/tax/invoices/2024-06-19/governmentInvoiceRequests`;
|
|
103
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
104
|
+
let baseOptions;
|
|
105
|
+
if (configuration) {
|
|
106
|
+
baseOptions = configuration.baseOptions;
|
|
107
|
+
}
|
|
108
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
109
|
+
const localVarHeaderParameter = {};
|
|
110
|
+
const localVarQueryParameter = {};
|
|
111
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
112
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
113
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
114
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
115
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
116
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
117
|
+
return {
|
|
118
|
+
url: toPathString(localVarUrlObj),
|
|
119
|
+
options: localVarRequestOptions
|
|
120
|
+
};
|
|
121
|
+
},
|
|
122
|
+
/**
|
|
123
|
+
* 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).
|
|
124
|
+
* @param {ExportInvoicesRequest} body Information required to create the export request.
|
|
125
|
+
* @param {*} [options] Override http request option.
|
|
126
|
+
* @throws {RequiredError}
|
|
127
|
+
*/
|
|
128
|
+
createInvoicesExport: async (body, options = {}) => {
|
|
129
|
+
assertParamExists("createInvoicesExport", "body", body);
|
|
130
|
+
const localVarPath = `/tax/invoices/2024-06-19/exports`;
|
|
131
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
132
|
+
let baseOptions;
|
|
133
|
+
if (configuration) {
|
|
134
|
+
baseOptions = configuration.baseOptions;
|
|
135
|
+
}
|
|
136
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
137
|
+
const localVarHeaderParameter = {};
|
|
138
|
+
const localVarQueryParameter = {};
|
|
139
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
140
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
141
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
142
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
143
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
144
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
145
|
+
return {
|
|
146
|
+
url: toPathString(localVarUrlObj),
|
|
147
|
+
options: localVarRequestOptions
|
|
148
|
+
};
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* 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.
|
|
152
|
+
* @param {string} marketplaceId The invoices returned will match the marketplace that you specify.
|
|
153
|
+
* @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \'transactionType\' options using \'getInvoicesAttributes\' operation.
|
|
154
|
+
* @param {string} shipmentId The unique shipment identifier to get an invoice for.
|
|
155
|
+
* @param {string} invoiceType Marketplace specific classification of the invoice type. Check \'invoiceType\' options using \'getInvoicesAttributes\' operation.
|
|
156
|
+
* @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
|
|
157
|
+
* @param {string} [fileFormat] Requested file format. Default is XML
|
|
158
|
+
* @param {*} [options] Override http request option.
|
|
159
|
+
* @throws {RequiredError}
|
|
160
|
+
*/
|
|
161
|
+
getGovernmentInvoiceDocument: async (marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, fileFormat, options = {}) => {
|
|
162
|
+
assertParamExists("getGovernmentInvoiceDocument", "marketplaceId", marketplaceId);
|
|
163
|
+
assertParamExists("getGovernmentInvoiceDocument", "transactionType", transactionType);
|
|
164
|
+
assertParamExists("getGovernmentInvoiceDocument", "shipmentId", shipmentId);
|
|
165
|
+
assertParamExists("getGovernmentInvoiceDocument", "invoiceType", invoiceType);
|
|
166
|
+
const localVarPath = `/tax/invoices/2024-06-19/governmentInvoiceRequests/{shipmentId}`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
|
|
167
|
+
const localVarUrlObj = new URL(localVarPath, 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 !== void 0) {
|
|
176
|
+
localVarQueryParameter["marketplaceId"] = marketplaceId;
|
|
177
|
+
}
|
|
178
|
+
if (transactionType !== void 0) {
|
|
179
|
+
localVarQueryParameter["transactionType"] = transactionType;
|
|
180
|
+
}
|
|
181
|
+
if (invoiceType !== void 0) {
|
|
182
|
+
localVarQueryParameter["invoiceType"] = invoiceType;
|
|
183
|
+
}
|
|
184
|
+
if (inboundPlanId !== void 0) {
|
|
185
|
+
localVarQueryParameter["inboundPlanId"] = inboundPlanId;
|
|
186
|
+
}
|
|
187
|
+
if (fileFormat !== void 0) {
|
|
188
|
+
localVarQueryParameter["fileFormat"] = fileFormat;
|
|
189
|
+
}
|
|
190
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
191
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
192
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
193
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
194
|
+
return {
|
|
195
|
+
url: toPathString(localVarUrlObj),
|
|
196
|
+
options: localVarRequestOptions
|
|
197
|
+
};
|
|
198
|
+
},
|
|
199
|
+
/**
|
|
200
|
+
* 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.
|
|
201
|
+
* @param {string} marketplaceId The invoices status will match the marketplace that you specify.
|
|
202
|
+
* @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \'transactionType\' options using \'getInvoicesAttributes\' operation.
|
|
203
|
+
* @param {string} shipmentId The unique shipment identifier to get an invoice for.
|
|
204
|
+
* @param {string} invoiceType Marketplace specific classification of the invoice type. Check \'invoiceType\' options using \'getInvoicesAttributes\' operation.
|
|
205
|
+
* @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
|
|
206
|
+
* @param {*} [options] Override http request option.
|
|
207
|
+
* @throws {RequiredError}
|
|
208
|
+
*/
|
|
209
|
+
getGovernmentInvoiceStatus: async (marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, options = {}) => {
|
|
210
|
+
assertParamExists("getGovernmentInvoiceStatus", "marketplaceId", marketplaceId);
|
|
211
|
+
assertParamExists("getGovernmentInvoiceStatus", "transactionType", transactionType);
|
|
212
|
+
assertParamExists("getGovernmentInvoiceStatus", "shipmentId", shipmentId);
|
|
213
|
+
assertParamExists("getGovernmentInvoiceStatus", "invoiceType", invoiceType);
|
|
214
|
+
const localVarPath = `/tax/invoices/2024-06-19/governmentInvoiceRequests`;
|
|
215
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
216
|
+
let baseOptions;
|
|
217
|
+
if (configuration) {
|
|
218
|
+
baseOptions = configuration.baseOptions;
|
|
219
|
+
}
|
|
220
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
221
|
+
const localVarHeaderParameter = {};
|
|
222
|
+
const localVarQueryParameter = {};
|
|
223
|
+
if (marketplaceId !== void 0) {
|
|
224
|
+
localVarQueryParameter["marketplaceId"] = marketplaceId;
|
|
225
|
+
}
|
|
226
|
+
if (transactionType !== void 0) {
|
|
227
|
+
localVarQueryParameter["transactionType"] = transactionType;
|
|
228
|
+
}
|
|
229
|
+
if (shipmentId !== void 0) {
|
|
230
|
+
localVarQueryParameter["shipmentId"] = shipmentId;
|
|
231
|
+
}
|
|
232
|
+
if (invoiceType !== void 0) {
|
|
233
|
+
localVarQueryParameter["invoiceType"] = invoiceType;
|
|
234
|
+
}
|
|
235
|
+
if (inboundPlanId !== void 0) {
|
|
236
|
+
localVarQueryParameter["inboundPlanId"] = inboundPlanId;
|
|
237
|
+
}
|
|
238
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
239
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
240
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
241
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
242
|
+
return {
|
|
243
|
+
url: toPathString(localVarUrlObj),
|
|
244
|
+
options: localVarRequestOptions
|
|
245
|
+
};
|
|
246
|
+
},
|
|
247
|
+
/**
|
|
248
|
+
* 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).
|
|
249
|
+
* @param {string} marketplaceId The marketplace from which you want the invoice.
|
|
250
|
+
* @param {string} invoiceId The invoice identifier.
|
|
251
|
+
* @param {*} [options] Override http request option.
|
|
252
|
+
* @throws {RequiredError}
|
|
253
|
+
*/
|
|
254
|
+
getInvoice: async (marketplaceId, invoiceId, options = {}) => {
|
|
255
|
+
assertParamExists("getInvoice", "marketplaceId", marketplaceId);
|
|
256
|
+
assertParamExists("getInvoice", "invoiceId", invoiceId);
|
|
257
|
+
const localVarPath = `/tax/invoices/2024-06-19/invoices/{invoiceId}`.replace("{invoiceId}", encodeURIComponent(String(invoiceId)));
|
|
258
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
259
|
+
let baseOptions;
|
|
260
|
+
if (configuration) {
|
|
261
|
+
baseOptions = configuration.baseOptions;
|
|
262
|
+
}
|
|
263
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
264
|
+
const localVarHeaderParameter = {};
|
|
265
|
+
const localVarQueryParameter = {};
|
|
266
|
+
if (marketplaceId !== void 0) {
|
|
267
|
+
localVarQueryParameter["marketplaceId"] = marketplaceId;
|
|
268
|
+
}
|
|
269
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
270
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
271
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
272
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
273
|
+
return {
|
|
274
|
+
url: toPathString(localVarUrlObj),
|
|
275
|
+
options: localVarRequestOptions
|
|
276
|
+
};
|
|
277
|
+
},
|
|
278
|
+
/**
|
|
279
|
+
* 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).
|
|
280
|
+
* @param {string} marketplaceId The response includes only the invoices that match the specified marketplace.
|
|
281
|
+
* @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.
|
|
282
|
+
* @param {number} [pageSize] The maximum number of invoices you want to return in a single call. Minimum: 1 Maximum: 200
|
|
283
|
+
* @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.
|
|
284
|
+
* @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.
|
|
285
|
+
* @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.
|
|
286
|
+
* @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.
|
|
287
|
+
* @param {string} [series] Return invoices with the specified series number.
|
|
288
|
+
* @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.
|
|
289
|
+
* @param {GetInvoicesSortOrderEnum} [sortOrder] Sort the invoices in the response in ascending or descending order.
|
|
290
|
+
* @param {string} [invoiceType] The marketplace-specific classification of the invoice type. Use the `getInvoicesAttributes` operation to check `invoiceType` options.
|
|
291
|
+
* @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
|
|
292
|
+
* @param {string} [externalInvoiceId] Return invoices that match this external ID. This is typically the Government Invoice ID.
|
|
293
|
+
* @param {GetInvoicesSortByEnum} [sortBy] The attribute by which you want to sort the invoices in the response.
|
|
294
|
+
* @param {*} [options] Override http request option.
|
|
295
|
+
* @throws {RequiredError}
|
|
296
|
+
*/
|
|
297
|
+
getInvoices: async (marketplaceId, transactionIdentifierName, pageSize, dateEnd, transactionType, transactionIdentifierId, dateStart, series, nextToken, sortOrder, invoiceType, statuses, externalInvoiceId, sortBy, options = {}) => {
|
|
298
|
+
assertParamExists("getInvoices", "marketplaceId", marketplaceId);
|
|
299
|
+
const localVarPath = `/tax/invoices/2024-06-19/invoices`;
|
|
300
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
301
|
+
let baseOptions;
|
|
302
|
+
if (configuration) {
|
|
303
|
+
baseOptions = configuration.baseOptions;
|
|
304
|
+
}
|
|
305
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
306
|
+
const localVarHeaderParameter = {};
|
|
307
|
+
const localVarQueryParameter = {};
|
|
308
|
+
if (transactionIdentifierName !== void 0) {
|
|
309
|
+
localVarQueryParameter["transactionIdentifierName"] = transactionIdentifierName;
|
|
310
|
+
}
|
|
311
|
+
if (pageSize !== void 0) {
|
|
312
|
+
localVarQueryParameter["pageSize"] = pageSize;
|
|
313
|
+
}
|
|
314
|
+
if (dateEnd !== void 0) {
|
|
315
|
+
localVarQueryParameter["dateEnd"] = dateEnd instanceof Date ? dateEnd.toISOString() : dateEnd;
|
|
316
|
+
}
|
|
317
|
+
if (marketplaceId !== void 0) {
|
|
318
|
+
localVarQueryParameter["marketplaceId"] = marketplaceId;
|
|
319
|
+
}
|
|
320
|
+
if (transactionType !== void 0) {
|
|
321
|
+
localVarQueryParameter["transactionType"] = transactionType;
|
|
322
|
+
}
|
|
323
|
+
if (transactionIdentifierId !== void 0) {
|
|
324
|
+
localVarQueryParameter["transactionIdentifierId"] = transactionIdentifierId;
|
|
325
|
+
}
|
|
326
|
+
if (dateStart !== void 0) {
|
|
327
|
+
localVarQueryParameter["dateStart"] = dateStart instanceof Date ? dateStart.toISOString() : dateStart;
|
|
328
|
+
}
|
|
329
|
+
if (series !== void 0) {
|
|
330
|
+
localVarQueryParameter["series"] = series;
|
|
331
|
+
}
|
|
332
|
+
if (nextToken !== void 0) {
|
|
333
|
+
localVarQueryParameter["nextToken"] = nextToken;
|
|
334
|
+
}
|
|
335
|
+
if (sortOrder !== void 0) {
|
|
336
|
+
localVarQueryParameter["sortOrder"] = sortOrder;
|
|
337
|
+
}
|
|
338
|
+
if (invoiceType !== void 0) {
|
|
339
|
+
localVarQueryParameter["invoiceType"] = invoiceType;
|
|
340
|
+
}
|
|
341
|
+
if (statuses) {
|
|
342
|
+
localVarQueryParameter["statuses"] = statuses.join(COLLECTION_FORMATS.csv);
|
|
343
|
+
}
|
|
344
|
+
if (externalInvoiceId !== void 0) {
|
|
345
|
+
localVarQueryParameter["externalInvoiceId"] = externalInvoiceId;
|
|
346
|
+
}
|
|
347
|
+
if (sortBy !== void 0) {
|
|
348
|
+
localVarQueryParameter["sortBy"] = sortBy;
|
|
349
|
+
}
|
|
350
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
351
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
352
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
353
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
354
|
+
return {
|
|
355
|
+
url: toPathString(localVarUrlObj),
|
|
356
|
+
options: localVarRequestOptions
|
|
357
|
+
};
|
|
358
|
+
},
|
|
359
|
+
/**
|
|
360
|
+
* 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).
|
|
361
|
+
* @param {string} marketplaceId The marketplace identifier.
|
|
362
|
+
* @param {*} [options] Override http request option.
|
|
363
|
+
* @throws {RequiredError}
|
|
364
|
+
*/
|
|
365
|
+
getInvoicesAttributes: async (marketplaceId, options = {}) => {
|
|
366
|
+
assertParamExists("getInvoicesAttributes", "marketplaceId", marketplaceId);
|
|
367
|
+
const localVarPath = `/tax/invoices/2024-06-19/attributes`;
|
|
368
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
369
|
+
let baseOptions;
|
|
370
|
+
if (configuration) {
|
|
371
|
+
baseOptions = configuration.baseOptions;
|
|
372
|
+
}
|
|
373
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
374
|
+
const localVarHeaderParameter = {};
|
|
375
|
+
const localVarQueryParameter = {};
|
|
376
|
+
if (marketplaceId !== void 0) {
|
|
377
|
+
localVarQueryParameter["marketplaceId"] = marketplaceId;
|
|
378
|
+
}
|
|
379
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
380
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
381
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
382
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
383
|
+
return {
|
|
384
|
+
url: toPathString(localVarUrlObj),
|
|
385
|
+
options: localVarRequestOptions
|
|
386
|
+
};
|
|
387
|
+
},
|
|
388
|
+
/**
|
|
389
|
+
* 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).
|
|
390
|
+
* @param {string} invoicesDocumentId The export document identifier.
|
|
391
|
+
* @param {*} [options] Override http request option.
|
|
392
|
+
* @throws {RequiredError}
|
|
393
|
+
*/
|
|
394
|
+
getInvoicesDocument: async (invoicesDocumentId, options = {}) => {
|
|
395
|
+
assertParamExists("getInvoicesDocument", "invoicesDocumentId", invoicesDocumentId);
|
|
396
|
+
const localVarPath = `/tax/invoices/2024-06-19/documents/{invoicesDocumentId}`.replace("{invoicesDocumentId}", encodeURIComponent(String(invoicesDocumentId)));
|
|
397
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
398
|
+
let baseOptions;
|
|
399
|
+
if (configuration) {
|
|
400
|
+
baseOptions = configuration.baseOptions;
|
|
401
|
+
}
|
|
402
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
403
|
+
const localVarHeaderParameter = {};
|
|
404
|
+
const localVarQueryParameter = {};
|
|
405
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
406
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
407
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
408
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
409
|
+
return {
|
|
410
|
+
url: toPathString(localVarUrlObj),
|
|
411
|
+
options: localVarRequestOptions
|
|
412
|
+
};
|
|
413
|
+
},
|
|
414
|
+
/**
|
|
415
|
+
* 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).
|
|
416
|
+
* @param {string} exportId The unique identifier for the export.
|
|
417
|
+
* @param {*} [options] Override http request option.
|
|
418
|
+
* @throws {RequiredError}
|
|
419
|
+
*/
|
|
420
|
+
getInvoicesExport: async (exportId, options = {}) => {
|
|
421
|
+
assertParamExists("getInvoicesExport", "exportId", exportId);
|
|
422
|
+
const localVarPath = `/tax/invoices/2024-06-19/exports/{exportId}`.replace("{exportId}", encodeURIComponent(String(exportId)));
|
|
423
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
424
|
+
let baseOptions;
|
|
425
|
+
if (configuration) {
|
|
426
|
+
baseOptions = configuration.baseOptions;
|
|
427
|
+
}
|
|
428
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
429
|
+
const localVarHeaderParameter = {};
|
|
430
|
+
const localVarQueryParameter = {};
|
|
431
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
432
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
433
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
434
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
435
|
+
return {
|
|
436
|
+
url: toPathString(localVarUrlObj),
|
|
437
|
+
options: localVarRequestOptions
|
|
438
|
+
};
|
|
439
|
+
},
|
|
440
|
+
/**
|
|
441
|
+
* 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).
|
|
442
|
+
* @param {string} marketplaceId The returned exports match the specified marketplace.
|
|
443
|
+
* @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.
|
|
444
|
+
* @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.
|
|
445
|
+
* @param {number} [pageSize] The maximum number of invoices to return in a single call. Minimum: 1 Maximum: 100
|
|
446
|
+
* @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.
|
|
447
|
+
* @param {GetInvoicesExportsStatusEnum} [status] Return exports matching the status specified.
|
|
448
|
+
* @param {*} [options] Override http request option.
|
|
449
|
+
* @throws {RequiredError}
|
|
450
|
+
*/
|
|
451
|
+
getInvoicesExports: async (marketplaceId, dateStart, nextToken, pageSize, dateEnd, status, options = {}) => {
|
|
452
|
+
assertParamExists("getInvoicesExports", "marketplaceId", marketplaceId);
|
|
453
|
+
const localVarPath = `/tax/invoices/2024-06-19/exports`;
|
|
454
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
455
|
+
let baseOptions;
|
|
456
|
+
if (configuration) {
|
|
457
|
+
baseOptions = configuration.baseOptions;
|
|
458
|
+
}
|
|
459
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
460
|
+
const localVarHeaderParameter = {};
|
|
461
|
+
const localVarQueryParameter = {};
|
|
462
|
+
if (marketplaceId !== void 0) {
|
|
463
|
+
localVarQueryParameter["marketplaceId"] = marketplaceId;
|
|
464
|
+
}
|
|
465
|
+
if (dateStart !== void 0) {
|
|
466
|
+
localVarQueryParameter["dateStart"] = dateStart instanceof Date ? dateStart.toISOString() : dateStart;
|
|
467
|
+
}
|
|
468
|
+
if (nextToken !== void 0) {
|
|
469
|
+
localVarQueryParameter["nextToken"] = nextToken;
|
|
470
|
+
}
|
|
471
|
+
if (pageSize !== void 0) {
|
|
472
|
+
localVarQueryParameter["pageSize"] = pageSize;
|
|
473
|
+
}
|
|
474
|
+
if (dateEnd !== void 0) {
|
|
475
|
+
localVarQueryParameter["dateEnd"] = dateEnd instanceof Date ? dateEnd.toISOString() : dateEnd;
|
|
476
|
+
}
|
|
477
|
+
if (status !== void 0) {
|
|
478
|
+
localVarQueryParameter["status"] = status;
|
|
479
|
+
}
|
|
480
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
481
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
482
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
483
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
484
|
+
return {
|
|
485
|
+
url: toPathString(localVarUrlObj),
|
|
486
|
+
options: localVarRequestOptions
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
};
|
|
490
|
+
};
|
|
491
|
+
var InvoicesApiFp = function(configuration) {
|
|
492
|
+
const localVarAxiosParamCreator = InvoicesApiAxiosParamCreator(configuration);
|
|
493
|
+
return {
|
|
494
|
+
/**
|
|
495
|
+
* 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.
|
|
496
|
+
* @param {GovernmentInvoiceRequest} body Information required to create the government invoice.
|
|
497
|
+
* @param {*} [options] Override http request option.
|
|
498
|
+
* @throws {RequiredError}
|
|
499
|
+
*/
|
|
500
|
+
async createGovernmentInvoice(body, options) {
|
|
501
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createGovernmentInvoice(body, options);
|
|
502
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
503
|
+
const localVarOperationServerBasePath = operationServerMap["InvoicesApi.createGovernmentInvoice"]?.[localVarOperationServerIndex]?.url;
|
|
504
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
505
|
+
},
|
|
506
|
+
/**
|
|
507
|
+
* 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).
|
|
508
|
+
* @param {ExportInvoicesRequest} body Information required to create the export request.
|
|
509
|
+
* @param {*} [options] Override http request option.
|
|
510
|
+
* @throws {RequiredError}
|
|
511
|
+
*/
|
|
512
|
+
async createInvoicesExport(body, options) {
|
|
513
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createInvoicesExport(body, options);
|
|
514
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
515
|
+
const localVarOperationServerBasePath = operationServerMap["InvoicesApi.createInvoicesExport"]?.[localVarOperationServerIndex]?.url;
|
|
516
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
517
|
+
},
|
|
518
|
+
/**
|
|
519
|
+
* 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.
|
|
520
|
+
* @param {string} marketplaceId The invoices returned will match the marketplace that you specify.
|
|
521
|
+
* @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \'transactionType\' options using \'getInvoicesAttributes\' operation.
|
|
522
|
+
* @param {string} shipmentId The unique shipment identifier to get an invoice for.
|
|
523
|
+
* @param {string} invoiceType Marketplace specific classification of the invoice type. Check \'invoiceType\' options using \'getInvoicesAttributes\' operation.
|
|
524
|
+
* @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
|
|
525
|
+
* @param {string} [fileFormat] Requested file format. Default is XML
|
|
526
|
+
* @param {*} [options] Override http request option.
|
|
527
|
+
* @throws {RequiredError}
|
|
528
|
+
*/
|
|
529
|
+
async getGovernmentInvoiceDocument(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, fileFormat, options) {
|
|
530
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getGovernmentInvoiceDocument(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, fileFormat, options);
|
|
531
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
532
|
+
const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getGovernmentInvoiceDocument"]?.[localVarOperationServerIndex]?.url;
|
|
533
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
534
|
+
},
|
|
535
|
+
/**
|
|
536
|
+
* 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.
|
|
537
|
+
* @param {string} marketplaceId The invoices status will match the marketplace that you specify.
|
|
538
|
+
* @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \'transactionType\' options using \'getInvoicesAttributes\' operation.
|
|
539
|
+
* @param {string} shipmentId The unique shipment identifier to get an invoice for.
|
|
540
|
+
* @param {string} invoiceType Marketplace specific classification of the invoice type. Check \'invoiceType\' options using \'getInvoicesAttributes\' operation.
|
|
541
|
+
* @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
|
|
542
|
+
* @param {*} [options] Override http request option.
|
|
543
|
+
* @throws {RequiredError}
|
|
544
|
+
*/
|
|
545
|
+
async getGovernmentInvoiceStatus(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, options) {
|
|
546
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getGovernmentInvoiceStatus(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, options);
|
|
547
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
548
|
+
const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getGovernmentInvoiceStatus"]?.[localVarOperationServerIndex]?.url;
|
|
549
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
550
|
+
},
|
|
551
|
+
/**
|
|
552
|
+
* 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).
|
|
553
|
+
* @param {string} marketplaceId The marketplace from which you want the invoice.
|
|
554
|
+
* @param {string} invoiceId The invoice identifier.
|
|
555
|
+
* @param {*} [options] Override http request option.
|
|
556
|
+
* @throws {RequiredError}
|
|
557
|
+
*/
|
|
558
|
+
async getInvoice(marketplaceId, invoiceId, options) {
|
|
559
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoice(marketplaceId, invoiceId, options);
|
|
560
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
561
|
+
const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getInvoice"]?.[localVarOperationServerIndex]?.url;
|
|
562
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
563
|
+
},
|
|
564
|
+
/**
|
|
565
|
+
* 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).
|
|
566
|
+
* @param {string} marketplaceId The response includes only the invoices that match the specified marketplace.
|
|
567
|
+
* @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.
|
|
568
|
+
* @param {number} [pageSize] The maximum number of invoices you want to return in a single call. Minimum: 1 Maximum: 200
|
|
569
|
+
* @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.
|
|
570
|
+
* @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.
|
|
571
|
+
* @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.
|
|
572
|
+
* @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.
|
|
573
|
+
* @param {string} [series] Return invoices with the specified series number.
|
|
574
|
+
* @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.
|
|
575
|
+
* @param {GetInvoicesSortOrderEnum} [sortOrder] Sort the invoices in the response in ascending or descending order.
|
|
576
|
+
* @param {string} [invoiceType] The marketplace-specific classification of the invoice type. Use the `getInvoicesAttributes` operation to check `invoiceType` options.
|
|
577
|
+
* @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
|
|
578
|
+
* @param {string} [externalInvoiceId] Return invoices that match this external ID. This is typically the Government Invoice ID.
|
|
579
|
+
* @param {GetInvoicesSortByEnum} [sortBy] The attribute by which you want to sort the invoices in the response.
|
|
580
|
+
* @param {*} [options] Override http request option.
|
|
581
|
+
* @throws {RequiredError}
|
|
582
|
+
*/
|
|
583
|
+
async getInvoices(marketplaceId, transactionIdentifierName, pageSize, dateEnd, transactionType, transactionIdentifierId, dateStart, series, nextToken, sortOrder, invoiceType, statuses, externalInvoiceId, sortBy, options) {
|
|
584
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoices(marketplaceId, transactionIdentifierName, pageSize, dateEnd, transactionType, transactionIdentifierId, dateStart, series, nextToken, sortOrder, invoiceType, statuses, externalInvoiceId, sortBy, options);
|
|
585
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
586
|
+
const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getInvoices"]?.[localVarOperationServerIndex]?.url;
|
|
587
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
588
|
+
},
|
|
589
|
+
/**
|
|
590
|
+
* 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).
|
|
591
|
+
* @param {string} marketplaceId The marketplace identifier.
|
|
592
|
+
* @param {*} [options] Override http request option.
|
|
593
|
+
* @throws {RequiredError}
|
|
594
|
+
*/
|
|
595
|
+
async getInvoicesAttributes(marketplaceId, options) {
|
|
596
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoicesAttributes(marketplaceId, options);
|
|
597
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
598
|
+
const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getInvoicesAttributes"]?.[localVarOperationServerIndex]?.url;
|
|
599
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
600
|
+
},
|
|
601
|
+
/**
|
|
602
|
+
* 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).
|
|
603
|
+
* @param {string} invoicesDocumentId The export document identifier.
|
|
604
|
+
* @param {*} [options] Override http request option.
|
|
605
|
+
* @throws {RequiredError}
|
|
606
|
+
*/
|
|
607
|
+
async getInvoicesDocument(invoicesDocumentId, options) {
|
|
608
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoicesDocument(invoicesDocumentId, options);
|
|
609
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
610
|
+
const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getInvoicesDocument"]?.[localVarOperationServerIndex]?.url;
|
|
611
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
612
|
+
},
|
|
613
|
+
/**
|
|
614
|
+
* 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).
|
|
615
|
+
* @param {string} exportId The unique identifier for the export.
|
|
616
|
+
* @param {*} [options] Override http request option.
|
|
617
|
+
* @throws {RequiredError}
|
|
618
|
+
*/
|
|
619
|
+
async getInvoicesExport(exportId, options) {
|
|
620
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoicesExport(exportId, options);
|
|
621
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
622
|
+
const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getInvoicesExport"]?.[localVarOperationServerIndex]?.url;
|
|
623
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
624
|
+
},
|
|
625
|
+
/**
|
|
626
|
+
* 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).
|
|
627
|
+
* @param {string} marketplaceId The returned exports match the specified marketplace.
|
|
628
|
+
* @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.
|
|
629
|
+
* @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.
|
|
630
|
+
* @param {number} [pageSize] The maximum number of invoices to return in a single call. Minimum: 1 Maximum: 100
|
|
631
|
+
* @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.
|
|
632
|
+
* @param {GetInvoicesExportsStatusEnum} [status] Return exports matching the status specified.
|
|
633
|
+
* @param {*} [options] Override http request option.
|
|
634
|
+
* @throws {RequiredError}
|
|
635
|
+
*/
|
|
636
|
+
async getInvoicesExports(marketplaceId, dateStart, nextToken, pageSize, dateEnd, status, options) {
|
|
637
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoicesExports(marketplaceId, dateStart, nextToken, pageSize, dateEnd, status, options);
|
|
638
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
639
|
+
const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getInvoicesExports"]?.[localVarOperationServerIndex]?.url;
|
|
640
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
641
|
+
}
|
|
642
|
+
};
|
|
643
|
+
};
|
|
644
|
+
var InvoicesApiFactory = function(configuration, basePath, axios) {
|
|
645
|
+
const localVarFp = InvoicesApiFp(configuration);
|
|
646
|
+
return {
|
|
647
|
+
/**
|
|
648
|
+
* 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.
|
|
649
|
+
* @param {InvoicesApiCreateGovernmentInvoiceRequest} requestParameters Request parameters.
|
|
650
|
+
* @param {*} [options] Override http request option.
|
|
651
|
+
* @throws {RequiredError}
|
|
652
|
+
*/
|
|
653
|
+
createGovernmentInvoice(requestParameters, options) {
|
|
654
|
+
return localVarFp.createGovernmentInvoice(requestParameters.body, options).then((request) => request(axios, basePath));
|
|
655
|
+
},
|
|
656
|
+
/**
|
|
657
|
+
* 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).
|
|
658
|
+
* @param {InvoicesApiCreateInvoicesExportRequest} requestParameters Request parameters.
|
|
659
|
+
* @param {*} [options] Override http request option.
|
|
660
|
+
* @throws {RequiredError}
|
|
661
|
+
*/
|
|
662
|
+
createInvoicesExport(requestParameters, options) {
|
|
663
|
+
return localVarFp.createInvoicesExport(requestParameters.body, options).then((request) => request(axios, basePath));
|
|
664
|
+
},
|
|
665
|
+
/**
|
|
666
|
+
* 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.
|
|
667
|
+
* @param {InvoicesApiGetGovernmentInvoiceDocumentRequest} requestParameters Request parameters.
|
|
668
|
+
* @param {*} [options] Override http request option.
|
|
669
|
+
* @throws {RequiredError}
|
|
670
|
+
*/
|
|
671
|
+
getGovernmentInvoiceDocument(requestParameters, options) {
|
|
672
|
+
return localVarFp.getGovernmentInvoiceDocument(requestParameters.marketplaceId, requestParameters.transactionType, requestParameters.shipmentId, requestParameters.invoiceType, requestParameters.inboundPlanId, requestParameters.fileFormat, options).then((request) => request(axios, basePath));
|
|
673
|
+
},
|
|
674
|
+
/**
|
|
675
|
+
* 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.
|
|
676
|
+
* @param {InvoicesApiGetGovernmentInvoiceStatusRequest} requestParameters Request parameters.
|
|
677
|
+
* @param {*} [options] Override http request option.
|
|
678
|
+
* @throws {RequiredError}
|
|
679
|
+
*/
|
|
680
|
+
getGovernmentInvoiceStatus(requestParameters, options) {
|
|
681
|
+
return localVarFp.getGovernmentInvoiceStatus(requestParameters.marketplaceId, requestParameters.transactionType, requestParameters.shipmentId, requestParameters.invoiceType, requestParameters.inboundPlanId, options).then((request) => request(axios, basePath));
|
|
682
|
+
},
|
|
683
|
+
/**
|
|
684
|
+
* 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).
|
|
685
|
+
* @param {InvoicesApiGetInvoiceRequest} requestParameters Request parameters.
|
|
686
|
+
* @param {*} [options] Override http request option.
|
|
687
|
+
* @throws {RequiredError}
|
|
688
|
+
*/
|
|
689
|
+
getInvoice(requestParameters, options) {
|
|
690
|
+
return localVarFp.getInvoice(requestParameters.marketplaceId, requestParameters.invoiceId, options).then((request) => request(axios, basePath));
|
|
691
|
+
},
|
|
692
|
+
/**
|
|
693
|
+
* 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).
|
|
694
|
+
* @param {InvoicesApiGetInvoicesRequest} requestParameters Request parameters.
|
|
695
|
+
* @param {*} [options] Override http request option.
|
|
696
|
+
* @throws {RequiredError}
|
|
697
|
+
*/
|
|
698
|
+
getInvoices(requestParameters, options) {
|
|
699
|
+
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));
|
|
700
|
+
},
|
|
701
|
+
/**
|
|
702
|
+
* 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).
|
|
703
|
+
* @param {InvoicesApiGetInvoicesAttributesRequest} requestParameters Request parameters.
|
|
704
|
+
* @param {*} [options] Override http request option.
|
|
705
|
+
* @throws {RequiredError}
|
|
706
|
+
*/
|
|
707
|
+
getInvoicesAttributes(requestParameters, options) {
|
|
708
|
+
return localVarFp.getInvoicesAttributes(requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
|
|
709
|
+
},
|
|
710
|
+
/**
|
|
711
|
+
* 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).
|
|
712
|
+
* @param {InvoicesApiGetInvoicesDocumentRequest} requestParameters Request parameters.
|
|
713
|
+
* @param {*} [options] Override http request option.
|
|
714
|
+
* @throws {RequiredError}
|
|
715
|
+
*/
|
|
716
|
+
getInvoicesDocument(requestParameters, options) {
|
|
717
|
+
return localVarFp.getInvoicesDocument(requestParameters.invoicesDocumentId, options).then((request) => request(axios, basePath));
|
|
718
|
+
},
|
|
719
|
+
/**
|
|
720
|
+
* 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).
|
|
721
|
+
* @param {InvoicesApiGetInvoicesExportRequest} requestParameters Request parameters.
|
|
722
|
+
* @param {*} [options] Override http request option.
|
|
723
|
+
* @throws {RequiredError}
|
|
724
|
+
*/
|
|
725
|
+
getInvoicesExport(requestParameters, options) {
|
|
726
|
+
return localVarFp.getInvoicesExport(requestParameters.exportId, options).then((request) => request(axios, basePath));
|
|
727
|
+
},
|
|
728
|
+
/**
|
|
729
|
+
* 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).
|
|
730
|
+
* @param {InvoicesApiGetInvoicesExportsRequest} requestParameters Request parameters.
|
|
731
|
+
* @param {*} [options] Override http request option.
|
|
732
|
+
* @throws {RequiredError}
|
|
733
|
+
*/
|
|
734
|
+
getInvoicesExports(requestParameters, options) {
|
|
735
|
+
return localVarFp.getInvoicesExports(requestParameters.marketplaceId, requestParameters.dateStart, requestParameters.nextToken, requestParameters.pageSize, requestParameters.dateEnd, requestParameters.status, options).then((request) => request(axios, basePath));
|
|
736
|
+
}
|
|
737
|
+
};
|
|
738
|
+
};
|
|
739
|
+
var InvoicesApi = class extends BaseAPI {
|
|
740
|
+
/**
|
|
741
|
+
* 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.
|
|
742
|
+
* @param {InvoicesApiCreateGovernmentInvoiceRequest} requestParameters Request parameters.
|
|
743
|
+
* @param {*} [options] Override http request option.
|
|
744
|
+
* @throws {RequiredError}
|
|
745
|
+
*/
|
|
746
|
+
createGovernmentInvoice(requestParameters, options) {
|
|
747
|
+
return InvoicesApiFp(this.configuration).createGovernmentInvoice(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* 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).
|
|
751
|
+
* @param {InvoicesApiCreateInvoicesExportRequest} requestParameters Request parameters.
|
|
752
|
+
* @param {*} [options] Override http request option.
|
|
753
|
+
* @throws {RequiredError}
|
|
754
|
+
*/
|
|
755
|
+
createInvoicesExport(requestParameters, options) {
|
|
756
|
+
return InvoicesApiFp(this.configuration).createInvoicesExport(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* 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.
|
|
760
|
+
* @param {InvoicesApiGetGovernmentInvoiceDocumentRequest} requestParameters Request parameters.
|
|
761
|
+
* @param {*} [options] Override http request option.
|
|
762
|
+
* @throws {RequiredError}
|
|
763
|
+
*/
|
|
764
|
+
getGovernmentInvoiceDocument(requestParameters, options) {
|
|
765
|
+
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));
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* 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.
|
|
769
|
+
* @param {InvoicesApiGetGovernmentInvoiceStatusRequest} requestParameters Request parameters.
|
|
770
|
+
* @param {*} [options] Override http request option.
|
|
771
|
+
* @throws {RequiredError}
|
|
772
|
+
*/
|
|
773
|
+
getGovernmentInvoiceStatus(requestParameters, options) {
|
|
774
|
+
return InvoicesApiFp(this.configuration).getGovernmentInvoiceStatus(requestParameters.marketplaceId, requestParameters.transactionType, requestParameters.shipmentId, requestParameters.invoiceType, requestParameters.inboundPlanId, options).then((request) => request(this.axios, this.basePath));
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* 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).
|
|
778
|
+
* @param {InvoicesApiGetInvoiceRequest} requestParameters Request parameters.
|
|
779
|
+
* @param {*} [options] Override http request option.
|
|
780
|
+
* @throws {RequiredError}
|
|
781
|
+
*/
|
|
782
|
+
getInvoice(requestParameters, options) {
|
|
783
|
+
return InvoicesApiFp(this.configuration).getInvoice(requestParameters.marketplaceId, requestParameters.invoiceId, options).then((request) => request(this.axios, this.basePath));
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* 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).
|
|
787
|
+
* @param {InvoicesApiGetInvoicesRequest} requestParameters Request parameters.
|
|
788
|
+
* @param {*} [options] Override http request option.
|
|
789
|
+
* @throws {RequiredError}
|
|
790
|
+
*/
|
|
791
|
+
getInvoices(requestParameters, options) {
|
|
792
|
+
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));
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* 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).
|
|
796
|
+
* @param {InvoicesApiGetInvoicesAttributesRequest} requestParameters Request parameters.
|
|
797
|
+
* @param {*} [options] Override http request option.
|
|
798
|
+
* @throws {RequiredError}
|
|
799
|
+
*/
|
|
800
|
+
getInvoicesAttributes(requestParameters, options) {
|
|
801
|
+
return InvoicesApiFp(this.configuration).getInvoicesAttributes(requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* 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).
|
|
805
|
+
* @param {InvoicesApiGetInvoicesDocumentRequest} requestParameters Request parameters.
|
|
806
|
+
* @param {*} [options] Override http request option.
|
|
807
|
+
* @throws {RequiredError}
|
|
808
|
+
*/
|
|
809
|
+
getInvoicesDocument(requestParameters, options) {
|
|
810
|
+
return InvoicesApiFp(this.configuration).getInvoicesDocument(requestParameters.invoicesDocumentId, options).then((request) => request(this.axios, this.basePath));
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* 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).
|
|
814
|
+
* @param {InvoicesApiGetInvoicesExportRequest} requestParameters Request parameters.
|
|
815
|
+
* @param {*} [options] Override http request option.
|
|
816
|
+
* @throws {RequiredError}
|
|
817
|
+
*/
|
|
818
|
+
getInvoicesExport(requestParameters, options) {
|
|
819
|
+
return InvoicesApiFp(this.configuration).getInvoicesExport(requestParameters.exportId, options).then((request) => request(this.axios, this.basePath));
|
|
820
|
+
}
|
|
821
|
+
/**
|
|
822
|
+
* 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).
|
|
823
|
+
* @param {InvoicesApiGetInvoicesExportsRequest} requestParameters Request parameters.
|
|
824
|
+
* @param {*} [options] Override http request option.
|
|
825
|
+
* @throws {RequiredError}
|
|
826
|
+
*/
|
|
827
|
+
getInvoicesExports(requestParameters, options) {
|
|
828
|
+
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));
|
|
829
|
+
}
|
|
830
|
+
};
|
|
831
|
+
var GetInvoicesSortOrderEnum = {
|
|
832
|
+
Desc: "DESC",
|
|
833
|
+
Asc: "ASC"
|
|
834
|
+
};
|
|
835
|
+
var GetInvoicesSortByEnum = {
|
|
836
|
+
StartDateTime: "START_DATE_TIME"
|
|
837
|
+
};
|
|
838
|
+
var GetInvoicesExportsStatusEnum = {
|
|
839
|
+
Requested: "REQUESTED",
|
|
840
|
+
Processing: "PROCESSING",
|
|
841
|
+
Done: "DONE",
|
|
842
|
+
Error: "ERROR"
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
// src/api-model/configuration.ts
|
|
846
|
+
var Configuration = class {
|
|
847
|
+
/**
|
|
848
|
+
* parameter for apiKey security
|
|
849
|
+
* @param name security name
|
|
850
|
+
*/
|
|
851
|
+
apiKey;
|
|
852
|
+
/**
|
|
853
|
+
* parameter for basic security
|
|
854
|
+
*/
|
|
855
|
+
username;
|
|
856
|
+
/**
|
|
857
|
+
* parameter for basic security
|
|
858
|
+
*/
|
|
859
|
+
password;
|
|
860
|
+
/**
|
|
861
|
+
* parameter for oauth2 security
|
|
862
|
+
* @param name security name
|
|
863
|
+
* @param scopes oauth2 scope
|
|
864
|
+
*/
|
|
865
|
+
accessToken;
|
|
866
|
+
/**
|
|
867
|
+
* parameter for aws4 signature security
|
|
868
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
869
|
+
* @param {string} options.region - aws region
|
|
870
|
+
* @param {string} options.service - name of the service.
|
|
871
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
872
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
873
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
874
|
+
* @memberof Configuration
|
|
875
|
+
*/
|
|
876
|
+
awsv4;
|
|
877
|
+
/**
|
|
878
|
+
* override base path
|
|
879
|
+
*/
|
|
880
|
+
basePath;
|
|
881
|
+
/**
|
|
882
|
+
* override server index
|
|
883
|
+
*/
|
|
884
|
+
serverIndex;
|
|
885
|
+
/**
|
|
886
|
+
* base options for axios calls
|
|
887
|
+
*/
|
|
888
|
+
baseOptions;
|
|
889
|
+
/**
|
|
890
|
+
* The FormData constructor that will be used to create multipart form data
|
|
891
|
+
* requests. You can inject this here so that execution environments that
|
|
892
|
+
* do not support the FormData class can still run the generated client.
|
|
893
|
+
*
|
|
894
|
+
* @type {new () => FormData}
|
|
895
|
+
*/
|
|
896
|
+
formDataCtor;
|
|
897
|
+
constructor(param = {}) {
|
|
898
|
+
this.apiKey = param.apiKey;
|
|
899
|
+
this.username = param.username;
|
|
900
|
+
this.password = param.password;
|
|
901
|
+
this.accessToken = param.accessToken;
|
|
902
|
+
this.awsv4 = param.awsv4;
|
|
903
|
+
this.basePath = param.basePath;
|
|
904
|
+
this.serverIndex = param.serverIndex;
|
|
905
|
+
this.baseOptions = {
|
|
906
|
+
...param.baseOptions,
|
|
907
|
+
headers: {
|
|
908
|
+
...param.baseOptions?.headers
|
|
909
|
+
}
|
|
910
|
+
};
|
|
911
|
+
this.formDataCtor = param.formDataCtor;
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* Check if the given MIME is a JSON MIME.
|
|
915
|
+
* JSON MIME examples:
|
|
916
|
+
* application/json
|
|
917
|
+
* application/json; charset=UTF8
|
|
918
|
+
* APPLICATION/JSON
|
|
919
|
+
* application/vnd.company+json
|
|
920
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
921
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
922
|
+
*/
|
|
923
|
+
isJsonMime(mime) {
|
|
924
|
+
const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
925
|
+
return mime !== null && jsonMime.test(mime);
|
|
926
|
+
}
|
|
927
|
+
};
|
|
928
|
+
|
|
929
|
+
// src/api-model/models/export-status.ts
|
|
930
|
+
var ExportStatus = {
|
|
931
|
+
Requested: "REQUESTED",
|
|
932
|
+
Processing: "PROCESSING",
|
|
933
|
+
Done: "DONE",
|
|
934
|
+
Error: "ERROR"
|
|
935
|
+
};
|
|
936
|
+
|
|
937
|
+
// src/api-model/models/file-format.ts
|
|
938
|
+
var FileFormat = {
|
|
939
|
+
Xml: "XML"
|
|
940
|
+
};
|
|
941
|
+
|
|
942
|
+
// src/api-model/models/government-invoice-creation-status.ts
|
|
943
|
+
var GovernmentInvoiceCreationStatus = {
|
|
944
|
+
Processing: "PROCESSING",
|
|
945
|
+
Success: "SUCCESS",
|
|
946
|
+
Error: "ERROR"
|
|
947
|
+
};
|
|
948
|
+
|
|
949
|
+
// src/client.ts
|
|
950
|
+
var clientRateLimits = [
|
|
951
|
+
{
|
|
952
|
+
method: "get",
|
|
953
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
954
|
+
urlRegex: new RegExp("^/tax/invoices/2024-06-19/attributes$"),
|
|
955
|
+
rate: 1,
|
|
956
|
+
burst: 1
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
method: "get",
|
|
960
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
961
|
+
urlRegex: new RegExp("^/tax/invoices/2024-06-19/documents/[^/]*$"),
|
|
962
|
+
rate: 0.0167,
|
|
963
|
+
burst: 1
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
method: "post",
|
|
967
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
968
|
+
urlRegex: new RegExp("^/tax/invoices/2024-06-19/exports$"),
|
|
969
|
+
rate: 0.167,
|
|
970
|
+
burst: 1
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
method: "get",
|
|
974
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
975
|
+
urlRegex: new RegExp("^/tax/invoices/2024-06-19/exports$"),
|
|
976
|
+
rate: 0.1,
|
|
977
|
+
burst: 20
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
method: "get",
|
|
981
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
982
|
+
urlRegex: new RegExp("^/tax/invoices/2024-06-19/exports/[^/]*$"),
|
|
983
|
+
rate: 2,
|
|
984
|
+
burst: 15
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
method: "post",
|
|
988
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
989
|
+
urlRegex: new RegExp("^/tax/invoices/2024-06-19/governmentInvoiceRequests$"),
|
|
990
|
+
rate: 0.0167,
|
|
991
|
+
burst: 1
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
method: "get",
|
|
995
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
996
|
+
urlRegex: new RegExp("^/tax/invoices/2024-06-19/governmentInvoiceRequests$"),
|
|
997
|
+
rate: 0.0167,
|
|
998
|
+
burst: 1
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
method: "get",
|
|
1002
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
1003
|
+
urlRegex: new RegExp("^/tax/invoices/2024-06-19/governmentInvoiceRequests/[^/]*$"),
|
|
1004
|
+
rate: 0.0167,
|
|
1005
|
+
burst: 1
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
method: "get",
|
|
1009
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
1010
|
+
urlRegex: new RegExp("^/tax/invoices/2024-06-19/invoices$"),
|
|
1011
|
+
rate: 0.1,
|
|
1012
|
+
burst: 20
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
method: "get",
|
|
1016
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
1017
|
+
urlRegex: new RegExp("^/tax/invoices/2024-06-19/invoices/[^/]*$"),
|
|
1018
|
+
rate: 2,
|
|
1019
|
+
burst: 15
|
|
1020
|
+
}
|
|
1021
|
+
];
|
|
1022
|
+
var InvoicesApiClient = class extends InvoicesApi {
|
|
1023
|
+
constructor(configuration) {
|
|
1024
|
+
const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
|
|
1025
|
+
super(new Configuration(), endpoint, axios);
|
|
1026
|
+
}
|
|
1027
|
+
};
|
|
1028
|
+
export {
|
|
1029
|
+
ExportStatus,
|
|
1030
|
+
FileFormat,
|
|
1031
|
+
GetInvoicesExportsStatusEnum,
|
|
1032
|
+
GetInvoicesSortByEnum,
|
|
1033
|
+
GetInvoicesSortOrderEnum,
|
|
1034
|
+
GovernmentInvoiceCreationStatus,
|
|
1035
|
+
InvoicesApi,
|
|
1036
|
+
InvoicesApiAxiosParamCreator,
|
|
1037
|
+
InvoicesApiClient,
|
|
1038
|
+
InvoicesApiFactory,
|
|
1039
|
+
InvoicesApiFp,
|
|
1040
|
+
clientRateLimits
|
|
1041
|
+
};
|
|
1042
|
+
//# sourceMappingURL=index.js.map
|