@teemill/orders 1.6.0 → 1.6.2
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/.openapi-generator/FILES +7 -25
- package/.openapi-generator/VERSION +1 -1
- package/README.md +3 -3
- package/api.ts +1539 -0
- package/base.ts +86 -0
- package/common.ts +150 -0
- package/configuration.ts +110 -0
- package/dist/api.d.ts +1116 -0
- package/dist/api.js +632 -0
- package/dist/base.d.ts +66 -0
- package/dist/base.js +65 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +161 -0
- package/dist/configuration.d.ts +91 -0
- package/dist/configuration.js +43 -0
- package/dist/esm/api.d.ts +1116 -0
- package/dist/esm/api.js +625 -0
- package/dist/esm/base.d.ts +66 -0
- package/dist/esm/base.js +60 -0
- package/dist/esm/common.d.ts +65 -0
- package/dist/esm/common.js +149 -0
- package/dist/esm/configuration.d.ts +91 -0
- package/dist/esm/configuration.js +39 -0
- package/dist/{models/Status.d.ts → esm/index.d.ts} +3 -16
- package/dist/esm/index.js +15 -0
- package/dist/index.d.ts +13 -3
- package/dist/index.js +15 -5
- package/git_push.sh +57 -0
- package/{src/models/Status.ts → index.ts} +3 -26
- package/package.json +18 -4
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +4 -6
- package/dist/apis/OrdersApi.d.ts +0 -115
- package/dist/apis/OrdersApi.js +0 -531
- package/dist/apis/index.d.ts +0 -1
- package/dist/apis/index.js +0 -19
- package/dist/models/Address.d.ts +0 -73
- package/dist/models/Address.js +0 -67
- package/dist/models/ApiError.d.ts +0 -37
- package/dist/models/ApiError.js +0 -49
- package/dist/models/ConfirmOrderFulfillment.d.ts +0 -37
- package/dist/models/ConfirmOrderFulfillment.js +0 -51
- package/dist/models/ConfirmOrderRequest.d.ts +0 -32
- package/dist/models/ConfirmOrderRequest.js +0 -48
- package/dist/models/ConfirmOrderValidationError.d.ts +0 -47
- package/dist/models/ConfirmOrderValidationError.js +0 -60
- package/dist/models/ContactInformation.d.ts +0 -37
- package/dist/models/ContactInformation.js +0 -49
- package/dist/models/DeliveryEstimates.d.ts +0 -37
- package/dist/models/DeliveryEstimates.js +0 -47
- package/dist/models/ExportOrders202Response.d.ts +0 -31
- package/dist/models/ExportOrders202Response.js +0 -45
- package/dist/models/Fulfillment.d.ts +0 -71
- package/dist/models/Fulfillment.js +0 -61
- package/dist/models/FulfillmentItem.d.ts +0 -43
- package/dist/models/FulfillmentItem.js +0 -49
- package/dist/models/Order.d.ts +0 -135
- package/dist/models/Order.js +0 -90
- package/dist/models/OrderItem.d.ts +0 -75
- package/dist/models/OrderItem.js +0 -61
- package/dist/models/OrderItemTaxPrice.d.ts +0 -37
- package/dist/models/OrderItemTaxPrice.js +0 -47
- package/dist/models/OrderTracking.d.ts +0 -43
- package/dist/models/OrderTracking.js +0 -49
- package/dist/models/OrdersResponse.d.ts +0 -38
- package/dist/models/OrdersResponse.js +0 -48
- package/dist/models/Origin.d.ts +0 -37
- package/dist/models/Origin.js +0 -47
- package/dist/models/Price.d.ts +0 -37
- package/dist/models/Price.js +0 -47
- package/dist/models/ShippingMethod.d.ts +0 -75
- package/dist/models/ShippingMethod.js +0 -61
- package/dist/models/Status.js +0 -39
- package/dist/models/StatusHistoryItem.d.ts +0 -38
- package/dist/models/StatusHistoryItem.js +0 -48
- package/dist/models/index.d.ts +0 -20
- package/dist/models/index.js +0 -38
- package/dist/runtime.d.ts +0 -187
- package/dist/runtime.js +0 -565
- package/src/apis/OrdersApi.ts +0 -511
- package/src/apis/index.ts +0 -3
- package/src/index.ts +0 -5
- package/src/models/Address.ts +0 -120
- package/src/models/ApiError.ts +0 -69
- package/src/models/ConfirmOrderFulfillment.ts +0 -70
- package/src/models/ConfirmOrderRequest.ts +0 -68
- package/src/models/ConfirmOrderValidationError.ts +0 -83
- package/src/models/ContactInformation.ts +0 -69
- package/src/models/DeliveryEstimates.ts +0 -68
- package/src/models/ExportOrders202Response.ts +0 -60
- package/src/models/Fulfillment.ts +0 -133
- package/src/models/FulfillmentItem.ts +0 -76
- package/src/models/Order.ts +0 -239
- package/src/models/OrderItem.ts +0 -127
- package/src/models/OrderItemTaxPrice.ts +0 -68
- package/src/models/OrderTracking.ts +0 -76
- package/src/models/OrdersResponse.ts +0 -75
- package/src/models/Origin.ts +0 -68
- package/src/models/Price.ts +0 -68
- package/src/models/ShippingMethod.ts +0 -129
- package/src/models/StatusHistoryItem.ts +0 -75
- package/src/models/index.ts +0 -22
- package/src/runtime.ts +0 -441
package/dist/api.js
ADDED
|
@@ -0,0 +1,632 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Orders API
|
|
6
|
+
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.6.2
|
|
9
|
+
* Contact: hello@teemill.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = exports.Status = exports.ConfirmOrderValidationErrorCodeEnum = void 0;
|
|
26
|
+
const axios_1 = require("axios");
|
|
27
|
+
// Some imports not used depending on template conditions
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
const common_1 = require("./common");
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
const base_1 = require("./base");
|
|
32
|
+
exports.ConfirmOrderValidationErrorCodeEnum = {
|
|
33
|
+
BadRequest: 'BAD_REQUEST',
|
|
34
|
+
PaymentFailed: 'PAYMENT_FAILED',
|
|
35
|
+
Conflict: 'CONFLICT',
|
|
36
|
+
ActionRequired: 'ACTION_REQUIRED'
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @export
|
|
41
|
+
* @enum {string}
|
|
42
|
+
*/
|
|
43
|
+
exports.Status = {
|
|
44
|
+
New: 'new',
|
|
45
|
+
Paid: 'paid',
|
|
46
|
+
Processing: 'processing',
|
|
47
|
+
Complete: 'complete',
|
|
48
|
+
Refunded: 'refunded'
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* OrdersApi - axios parameter creator
|
|
52
|
+
* @export
|
|
53
|
+
*/
|
|
54
|
+
const OrdersApiAxiosParamCreator = function (configuration) {
|
|
55
|
+
return {
|
|
56
|
+
/**
|
|
57
|
+
* Cancels an order if it has not yet started processing.
|
|
58
|
+
* @summary Cancel order
|
|
59
|
+
* @param {string} project What project it is
|
|
60
|
+
* @param {string} orderId Unique identifier of an order
|
|
61
|
+
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
62
|
+
* @param {*} [options] Override http request option.
|
|
63
|
+
* @throws {RequiredError}
|
|
64
|
+
*/
|
|
65
|
+
cancelOrder: (project_1, orderId_1, fields_1, ...args_1) => __awaiter(this, [project_1, orderId_1, fields_1, ...args_1], void 0, function* (project, orderId, fields, options = {}) {
|
|
66
|
+
// verify required parameter 'project' is not null or undefined
|
|
67
|
+
(0, common_1.assertParamExists)('cancelOrder', 'project', project);
|
|
68
|
+
// verify required parameter 'orderId' is not null or undefined
|
|
69
|
+
(0, common_1.assertParamExists)('cancelOrder', 'orderId', orderId);
|
|
70
|
+
const localVarPath = `/v1/orders/{orderId}`
|
|
71
|
+
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
|
|
72
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
73
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
74
|
+
let baseOptions;
|
|
75
|
+
if (configuration) {
|
|
76
|
+
baseOptions = configuration.baseOptions;
|
|
77
|
+
}
|
|
78
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
79
|
+
const localVarHeaderParameter = {};
|
|
80
|
+
const localVarQueryParameter = {};
|
|
81
|
+
// authentication session-oauth required
|
|
82
|
+
// oauth required
|
|
83
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
84
|
+
// authentication api-key required
|
|
85
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
86
|
+
if (project !== undefined) {
|
|
87
|
+
localVarQueryParameter['project'] = project;
|
|
88
|
+
}
|
|
89
|
+
if (fields !== undefined) {
|
|
90
|
+
localVarQueryParameter['fields'] = fields;
|
|
91
|
+
}
|
|
92
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
93
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
94
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
95
|
+
return {
|
|
96
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
97
|
+
options: localVarRequestOptions,
|
|
98
|
+
};
|
|
99
|
+
}),
|
|
100
|
+
/**
|
|
101
|
+
* Confirms an order, and submits it as ready to take payment and begin processing.
|
|
102
|
+
* @summary Confirm order
|
|
103
|
+
* @param {string} project What project it is
|
|
104
|
+
* @param {string} orderId Unique identifier of an order
|
|
105
|
+
* @param {ConfirmOrderRequest} confirmOrderRequest ConfirmFulfillment schema
|
|
106
|
+
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
107
|
+
* @param {*} [options] Override http request option.
|
|
108
|
+
* @throws {RequiredError}
|
|
109
|
+
*/
|
|
110
|
+
confirmOrder: (project_1, orderId_1, confirmOrderRequest_1, fields_1, ...args_1) => __awaiter(this, [project_1, orderId_1, confirmOrderRequest_1, fields_1, ...args_1], void 0, function* (project, orderId, confirmOrderRequest, fields, options = {}) {
|
|
111
|
+
// verify required parameter 'project' is not null or undefined
|
|
112
|
+
(0, common_1.assertParamExists)('confirmOrder', 'project', project);
|
|
113
|
+
// verify required parameter 'orderId' is not null or undefined
|
|
114
|
+
(0, common_1.assertParamExists)('confirmOrder', 'orderId', orderId);
|
|
115
|
+
// verify required parameter 'confirmOrderRequest' is not null or undefined
|
|
116
|
+
(0, common_1.assertParamExists)('confirmOrder', 'confirmOrderRequest', confirmOrderRequest);
|
|
117
|
+
const localVarPath = `/v1/orders/{orderId}/confirm`
|
|
118
|
+
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
|
|
119
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
120
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
121
|
+
let baseOptions;
|
|
122
|
+
if (configuration) {
|
|
123
|
+
baseOptions = configuration.baseOptions;
|
|
124
|
+
}
|
|
125
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
126
|
+
const localVarHeaderParameter = {};
|
|
127
|
+
const localVarQueryParameter = {};
|
|
128
|
+
// authentication session-oauth required
|
|
129
|
+
// oauth required
|
|
130
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
131
|
+
// authentication api-key required
|
|
132
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
133
|
+
if (project !== undefined) {
|
|
134
|
+
localVarQueryParameter['project'] = project;
|
|
135
|
+
}
|
|
136
|
+
if (fields !== undefined) {
|
|
137
|
+
localVarQueryParameter['fields'] = fields;
|
|
138
|
+
}
|
|
139
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
140
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
141
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
142
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
143
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(confirmOrderRequest, localVarRequestOptions, configuration);
|
|
144
|
+
return {
|
|
145
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
146
|
+
options: localVarRequestOptions,
|
|
147
|
+
};
|
|
148
|
+
}),
|
|
149
|
+
/**
|
|
150
|
+
* Creates a new order for the provided variants. You can fetch details and references to the given project\'s variants from the Product Catalog API.
|
|
151
|
+
* @summary Create order
|
|
152
|
+
* @param {string} project What project it is
|
|
153
|
+
* @param {Order} order Order schema
|
|
154
|
+
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
155
|
+
* @param {*} [options] Override http request option.
|
|
156
|
+
* @throws {RequiredError}
|
|
157
|
+
*/
|
|
158
|
+
createOrder: (project_1, order_1, fields_1, ...args_1) => __awaiter(this, [project_1, order_1, fields_1, ...args_1], void 0, function* (project, order, fields, options = {}) {
|
|
159
|
+
// verify required parameter 'project' is not null or undefined
|
|
160
|
+
(0, common_1.assertParamExists)('createOrder', 'project', project);
|
|
161
|
+
// verify required parameter 'order' is not null or undefined
|
|
162
|
+
(0, common_1.assertParamExists)('createOrder', 'order', order);
|
|
163
|
+
const localVarPath = `/v1/orders`;
|
|
164
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
165
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
166
|
+
let baseOptions;
|
|
167
|
+
if (configuration) {
|
|
168
|
+
baseOptions = configuration.baseOptions;
|
|
169
|
+
}
|
|
170
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
171
|
+
const localVarHeaderParameter = {};
|
|
172
|
+
const localVarQueryParameter = {};
|
|
173
|
+
// authentication session-oauth required
|
|
174
|
+
// oauth required
|
|
175
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
176
|
+
// authentication api-key required
|
|
177
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
178
|
+
if (project !== undefined) {
|
|
179
|
+
localVarQueryParameter['project'] = project;
|
|
180
|
+
}
|
|
181
|
+
if (fields !== undefined) {
|
|
182
|
+
localVarQueryParameter['fields'] = fields;
|
|
183
|
+
}
|
|
184
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
185
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
186
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
187
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
188
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(order, localVarRequestOptions, configuration);
|
|
189
|
+
return {
|
|
190
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
191
|
+
options: localVarRequestOptions,
|
|
192
|
+
};
|
|
193
|
+
}),
|
|
194
|
+
/**
|
|
195
|
+
* Export orders as a CSV file
|
|
196
|
+
* @summary Export orders
|
|
197
|
+
* @param {string} project What project it is
|
|
198
|
+
* @param {string} start Start of date range to filter by when orders were placed
|
|
199
|
+
* @param {string} [end] End of date range to filter by when orders were placed
|
|
200
|
+
* @param {*} [options] Override http request option.
|
|
201
|
+
* @throws {RequiredError}
|
|
202
|
+
*/
|
|
203
|
+
exportOrders: (project_1, start_1, end_1, ...args_1) => __awaiter(this, [project_1, start_1, end_1, ...args_1], void 0, function* (project, start, end, options = {}) {
|
|
204
|
+
// verify required parameter 'project' is not null or undefined
|
|
205
|
+
(0, common_1.assertParamExists)('exportOrders', 'project', project);
|
|
206
|
+
// verify required parameter 'start' is not null or undefined
|
|
207
|
+
(0, common_1.assertParamExists)('exportOrders', 'start', start);
|
|
208
|
+
const localVarPath = `/v1/orders/export`;
|
|
209
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
210
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
211
|
+
let baseOptions;
|
|
212
|
+
if (configuration) {
|
|
213
|
+
baseOptions = configuration.baseOptions;
|
|
214
|
+
}
|
|
215
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
216
|
+
const localVarHeaderParameter = {};
|
|
217
|
+
const localVarQueryParameter = {};
|
|
218
|
+
// authentication session-oauth required
|
|
219
|
+
// oauth required
|
|
220
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
221
|
+
// authentication api-key required
|
|
222
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
223
|
+
if (project !== undefined) {
|
|
224
|
+
localVarQueryParameter['project'] = project;
|
|
225
|
+
}
|
|
226
|
+
if (start !== undefined) {
|
|
227
|
+
localVarQueryParameter['start'] = (start instanceof Date) ?
|
|
228
|
+
start.toISOString() :
|
|
229
|
+
start;
|
|
230
|
+
}
|
|
231
|
+
if (end !== undefined) {
|
|
232
|
+
localVarQueryParameter['end'] = (end instanceof Date) ?
|
|
233
|
+
end.toISOString() :
|
|
234
|
+
end;
|
|
235
|
+
}
|
|
236
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
237
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
238
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
239
|
+
return {
|
|
240
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
241
|
+
options: localVarRequestOptions,
|
|
242
|
+
};
|
|
243
|
+
}),
|
|
244
|
+
/**
|
|
245
|
+
* Get an order by a given ID.
|
|
246
|
+
* @summary Get order
|
|
247
|
+
* @param {string} project What project it is
|
|
248
|
+
* @param {string} orderId Unique identifier of an order
|
|
249
|
+
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
250
|
+
* @param {*} [options] Override http request option.
|
|
251
|
+
* @throws {RequiredError}
|
|
252
|
+
*/
|
|
253
|
+
getOrder: (project_1, orderId_1, fields_1, ...args_1) => __awaiter(this, [project_1, orderId_1, fields_1, ...args_1], void 0, function* (project, orderId, fields, options = {}) {
|
|
254
|
+
// verify required parameter 'project' is not null or undefined
|
|
255
|
+
(0, common_1.assertParamExists)('getOrder', 'project', project);
|
|
256
|
+
// verify required parameter 'orderId' is not null or undefined
|
|
257
|
+
(0, common_1.assertParamExists)('getOrder', 'orderId', orderId);
|
|
258
|
+
const localVarPath = `/v1/orders/{orderId}`
|
|
259
|
+
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
|
|
260
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
261
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
262
|
+
let baseOptions;
|
|
263
|
+
if (configuration) {
|
|
264
|
+
baseOptions = configuration.baseOptions;
|
|
265
|
+
}
|
|
266
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
267
|
+
const localVarHeaderParameter = {};
|
|
268
|
+
const localVarQueryParameter = {};
|
|
269
|
+
// authentication session-oauth required
|
|
270
|
+
// oauth required
|
|
271
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
272
|
+
// authentication api-key required
|
|
273
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
274
|
+
if (project !== undefined) {
|
|
275
|
+
localVarQueryParameter['project'] = project;
|
|
276
|
+
}
|
|
277
|
+
if (fields !== undefined) {
|
|
278
|
+
localVarQueryParameter['fields'] = fields;
|
|
279
|
+
}
|
|
280
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
281
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
282
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
283
|
+
return {
|
|
284
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
285
|
+
options: localVarRequestOptions,
|
|
286
|
+
};
|
|
287
|
+
}),
|
|
288
|
+
/**
|
|
289
|
+
* Lists all orders placed on this project, paginated into configurable chunks.
|
|
290
|
+
* @summary List orders
|
|
291
|
+
* @param {string} project What project it is
|
|
292
|
+
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
293
|
+
* @param {number} [pageToken] Page reference token
|
|
294
|
+
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
295
|
+
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
296
|
+
* @param {Array<string>} [ids] Specify fulfillment IDs to list
|
|
297
|
+
* @param {Array<Status>} [statuses] Filter by fulfillment status
|
|
298
|
+
* @param {string} [start] Start of date range to filter by when orders were placed
|
|
299
|
+
* @param {string} [end] End of date range to filter by when orders were placed
|
|
300
|
+
* @param {*} [options] Override http request option.
|
|
301
|
+
* @throws {RequiredError}
|
|
302
|
+
*/
|
|
303
|
+
getOrders: (project_1, fields_1, pageToken_1, pageSize_1, search_1, ids_1, statuses_1, start_1, end_1, ...args_1) => __awaiter(this, [project_1, fields_1, pageToken_1, pageSize_1, search_1, ids_1, statuses_1, start_1, end_1, ...args_1], void 0, function* (project, fields, pageToken, pageSize, search, ids, statuses, start, end, options = {}) {
|
|
304
|
+
// verify required parameter 'project' is not null or undefined
|
|
305
|
+
(0, common_1.assertParamExists)('getOrders', 'project', project);
|
|
306
|
+
const localVarPath = `/v1/orders`;
|
|
307
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
308
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
309
|
+
let baseOptions;
|
|
310
|
+
if (configuration) {
|
|
311
|
+
baseOptions = configuration.baseOptions;
|
|
312
|
+
}
|
|
313
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
314
|
+
const localVarHeaderParameter = {};
|
|
315
|
+
const localVarQueryParameter = {};
|
|
316
|
+
// authentication session-oauth required
|
|
317
|
+
// oauth required
|
|
318
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
319
|
+
// authentication api-key required
|
|
320
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
321
|
+
if (project !== undefined) {
|
|
322
|
+
localVarQueryParameter['project'] = project;
|
|
323
|
+
}
|
|
324
|
+
if (fields !== undefined) {
|
|
325
|
+
localVarQueryParameter['fields'] = fields;
|
|
326
|
+
}
|
|
327
|
+
if (pageToken !== undefined) {
|
|
328
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
329
|
+
}
|
|
330
|
+
if (pageSize !== undefined) {
|
|
331
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
332
|
+
}
|
|
333
|
+
if (search !== undefined) {
|
|
334
|
+
localVarQueryParameter['search'] = search;
|
|
335
|
+
}
|
|
336
|
+
if (ids) {
|
|
337
|
+
localVarQueryParameter['ids'] = ids;
|
|
338
|
+
}
|
|
339
|
+
if (statuses) {
|
|
340
|
+
localVarQueryParameter['statuses'] = statuses;
|
|
341
|
+
}
|
|
342
|
+
if (start !== undefined) {
|
|
343
|
+
localVarQueryParameter['start'] = (start instanceof Date) ?
|
|
344
|
+
start.toISOString() :
|
|
345
|
+
start;
|
|
346
|
+
}
|
|
347
|
+
if (end !== undefined) {
|
|
348
|
+
localVarQueryParameter['end'] = (end instanceof Date) ?
|
|
349
|
+
end.toISOString() :
|
|
350
|
+
end;
|
|
351
|
+
}
|
|
352
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
353
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
354
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
355
|
+
return {
|
|
356
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
357
|
+
options: localVarRequestOptions,
|
|
358
|
+
};
|
|
359
|
+
}),
|
|
360
|
+
};
|
|
361
|
+
};
|
|
362
|
+
exports.OrdersApiAxiosParamCreator = OrdersApiAxiosParamCreator;
|
|
363
|
+
/**
|
|
364
|
+
* OrdersApi - functional programming interface
|
|
365
|
+
* @export
|
|
366
|
+
*/
|
|
367
|
+
const OrdersApiFp = function (configuration) {
|
|
368
|
+
const localVarAxiosParamCreator = (0, exports.OrdersApiAxiosParamCreator)(configuration);
|
|
369
|
+
return {
|
|
370
|
+
/**
|
|
371
|
+
* Cancels an order if it has not yet started processing.
|
|
372
|
+
* @summary Cancel order
|
|
373
|
+
* @param {string} project What project it is
|
|
374
|
+
* @param {string} orderId Unique identifier of an order
|
|
375
|
+
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
376
|
+
* @param {*} [options] Override http request option.
|
|
377
|
+
* @throws {RequiredError}
|
|
378
|
+
*/
|
|
379
|
+
cancelOrder(project, orderId, fields, options) {
|
|
380
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
381
|
+
var _a, _b, _c;
|
|
382
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelOrder(project, orderId, fields, options);
|
|
383
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
384
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.cancelOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
385
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
386
|
+
});
|
|
387
|
+
},
|
|
388
|
+
/**
|
|
389
|
+
* Confirms an order, and submits it as ready to take payment and begin processing.
|
|
390
|
+
* @summary Confirm order
|
|
391
|
+
* @param {string} project What project it is
|
|
392
|
+
* @param {string} orderId Unique identifier of an order
|
|
393
|
+
* @param {ConfirmOrderRequest} confirmOrderRequest ConfirmFulfillment schema
|
|
394
|
+
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
395
|
+
* @param {*} [options] Override http request option.
|
|
396
|
+
* @throws {RequiredError}
|
|
397
|
+
*/
|
|
398
|
+
confirmOrder(project, orderId, confirmOrderRequest, fields, options) {
|
|
399
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
400
|
+
var _a, _b, _c;
|
|
401
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.confirmOrder(project, orderId, confirmOrderRequest, fields, options);
|
|
402
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
403
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.confirmOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
404
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
405
|
+
});
|
|
406
|
+
},
|
|
407
|
+
/**
|
|
408
|
+
* Creates a new order for the provided variants. You can fetch details and references to the given project\'s variants from the Product Catalog API.
|
|
409
|
+
* @summary Create order
|
|
410
|
+
* @param {string} project What project it is
|
|
411
|
+
* @param {Order} order Order schema
|
|
412
|
+
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
413
|
+
* @param {*} [options] Override http request option.
|
|
414
|
+
* @throws {RequiredError}
|
|
415
|
+
*/
|
|
416
|
+
createOrder(project, order, fields, options) {
|
|
417
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
418
|
+
var _a, _b, _c;
|
|
419
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrder(project, order, fields, options);
|
|
420
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
421
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.createOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
422
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
423
|
+
});
|
|
424
|
+
},
|
|
425
|
+
/**
|
|
426
|
+
* Export orders as a CSV file
|
|
427
|
+
* @summary Export orders
|
|
428
|
+
* @param {string} project What project it is
|
|
429
|
+
* @param {string} start Start of date range to filter by when orders were placed
|
|
430
|
+
* @param {string} [end] End of date range to filter by when orders were placed
|
|
431
|
+
* @param {*} [options] Override http request option.
|
|
432
|
+
* @throws {RequiredError}
|
|
433
|
+
*/
|
|
434
|
+
exportOrders(project, start, end, options) {
|
|
435
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
436
|
+
var _a, _b, _c;
|
|
437
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.exportOrders(project, start, end, options);
|
|
438
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
439
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.exportOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
440
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
441
|
+
});
|
|
442
|
+
},
|
|
443
|
+
/**
|
|
444
|
+
* Get an order by a given ID.
|
|
445
|
+
* @summary Get order
|
|
446
|
+
* @param {string} project What project it is
|
|
447
|
+
* @param {string} orderId Unique identifier of an order
|
|
448
|
+
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
449
|
+
* @param {*} [options] Override http request option.
|
|
450
|
+
* @throws {RequiredError}
|
|
451
|
+
*/
|
|
452
|
+
getOrder(project, orderId, fields, options) {
|
|
453
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
454
|
+
var _a, _b, _c;
|
|
455
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrder(project, orderId, fields, options);
|
|
456
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
457
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.getOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
458
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
459
|
+
});
|
|
460
|
+
},
|
|
461
|
+
/**
|
|
462
|
+
* Lists all orders placed on this project, paginated into configurable chunks.
|
|
463
|
+
* @summary List orders
|
|
464
|
+
* @param {string} project What project it is
|
|
465
|
+
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
466
|
+
* @param {number} [pageToken] Page reference token
|
|
467
|
+
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
468
|
+
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
469
|
+
* @param {Array<string>} [ids] Specify fulfillment IDs to list
|
|
470
|
+
* @param {Array<Status>} [statuses] Filter by fulfillment status
|
|
471
|
+
* @param {string} [start] Start of date range to filter by when orders were placed
|
|
472
|
+
* @param {string} [end] End of date range to filter by when orders were placed
|
|
473
|
+
* @param {*} [options] Override http request option.
|
|
474
|
+
* @throws {RequiredError}
|
|
475
|
+
*/
|
|
476
|
+
getOrders(project, fields, pageToken, pageSize, search, ids, statuses, start, end, options) {
|
|
477
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
478
|
+
var _a, _b, _c;
|
|
479
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrders(project, fields, pageToken, pageSize, search, ids, statuses, start, end, options);
|
|
480
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
481
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.getOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
482
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
483
|
+
});
|
|
484
|
+
},
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
exports.OrdersApiFp = OrdersApiFp;
|
|
488
|
+
/**
|
|
489
|
+
* OrdersApi - factory interface
|
|
490
|
+
* @export
|
|
491
|
+
*/
|
|
492
|
+
const OrdersApiFactory = function (configuration, basePath, axios) {
|
|
493
|
+
const localVarFp = (0, exports.OrdersApiFp)(configuration);
|
|
494
|
+
return {
|
|
495
|
+
/**
|
|
496
|
+
* Cancels an order if it has not yet started processing.
|
|
497
|
+
* @summary Cancel order
|
|
498
|
+
* @param {OrdersApiCancelOrderRequest} requestParameters Request parameters.
|
|
499
|
+
* @param {*} [options] Override http request option.
|
|
500
|
+
* @throws {RequiredError}
|
|
501
|
+
*/
|
|
502
|
+
cancelOrder(requestParameters, options) {
|
|
503
|
+
return localVarFp.cancelOrder(requestParameters.project, requestParameters.orderId, requestParameters.fields, options).then((request) => request(axios, basePath));
|
|
504
|
+
},
|
|
505
|
+
/**
|
|
506
|
+
* Confirms an order, and submits it as ready to take payment and begin processing.
|
|
507
|
+
* @summary Confirm order
|
|
508
|
+
* @param {OrdersApiConfirmOrderRequest} requestParameters Request parameters.
|
|
509
|
+
* @param {*} [options] Override http request option.
|
|
510
|
+
* @throws {RequiredError}
|
|
511
|
+
*/
|
|
512
|
+
confirmOrder(requestParameters, options) {
|
|
513
|
+
return localVarFp.confirmOrder(requestParameters.project, requestParameters.orderId, requestParameters.confirmOrderRequest, requestParameters.fields, options).then((request) => request(axios, basePath));
|
|
514
|
+
},
|
|
515
|
+
/**
|
|
516
|
+
* Creates a new order for the provided variants. You can fetch details and references to the given project\'s variants from the Product Catalog API.
|
|
517
|
+
* @summary Create order
|
|
518
|
+
* @param {OrdersApiCreateOrderRequest} requestParameters Request parameters.
|
|
519
|
+
* @param {*} [options] Override http request option.
|
|
520
|
+
* @throws {RequiredError}
|
|
521
|
+
*/
|
|
522
|
+
createOrder(requestParameters, options) {
|
|
523
|
+
return localVarFp.createOrder(requestParameters.project, requestParameters.order, requestParameters.fields, options).then((request) => request(axios, basePath));
|
|
524
|
+
},
|
|
525
|
+
/**
|
|
526
|
+
* Export orders as a CSV file
|
|
527
|
+
* @summary Export orders
|
|
528
|
+
* @param {OrdersApiExportOrdersRequest} requestParameters Request parameters.
|
|
529
|
+
* @param {*} [options] Override http request option.
|
|
530
|
+
* @throws {RequiredError}
|
|
531
|
+
*/
|
|
532
|
+
exportOrders(requestParameters, options) {
|
|
533
|
+
return localVarFp.exportOrders(requestParameters.project, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
|
|
534
|
+
},
|
|
535
|
+
/**
|
|
536
|
+
* Get an order by a given ID.
|
|
537
|
+
* @summary Get order
|
|
538
|
+
* @param {OrdersApiGetOrderRequest} requestParameters Request parameters.
|
|
539
|
+
* @param {*} [options] Override http request option.
|
|
540
|
+
* @throws {RequiredError}
|
|
541
|
+
*/
|
|
542
|
+
getOrder(requestParameters, options) {
|
|
543
|
+
return localVarFp.getOrder(requestParameters.project, requestParameters.orderId, requestParameters.fields, options).then((request) => request(axios, basePath));
|
|
544
|
+
},
|
|
545
|
+
/**
|
|
546
|
+
* Lists all orders placed on this project, paginated into configurable chunks.
|
|
547
|
+
* @summary List orders
|
|
548
|
+
* @param {OrdersApiGetOrdersRequest} requestParameters Request parameters.
|
|
549
|
+
* @param {*} [options] Override http request option.
|
|
550
|
+
* @throws {RequiredError}
|
|
551
|
+
*/
|
|
552
|
+
getOrders(requestParameters, options) {
|
|
553
|
+
return localVarFp.getOrders(requestParameters.project, requestParameters.fields, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.ids, requestParameters.statuses, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
|
|
554
|
+
},
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
exports.OrdersApiFactory = OrdersApiFactory;
|
|
558
|
+
/**
|
|
559
|
+
* OrdersApi - object-oriented interface
|
|
560
|
+
* @export
|
|
561
|
+
* @class OrdersApi
|
|
562
|
+
* @extends {BaseAPI}
|
|
563
|
+
*/
|
|
564
|
+
class OrdersApi extends base_1.BaseAPI {
|
|
565
|
+
/**
|
|
566
|
+
* Cancels an order if it has not yet started processing.
|
|
567
|
+
* @summary Cancel order
|
|
568
|
+
* @param {OrdersApiCancelOrderRequest} requestParameters Request parameters.
|
|
569
|
+
* @param {*} [options] Override http request option.
|
|
570
|
+
* @throws {RequiredError}
|
|
571
|
+
* @memberof OrdersApi
|
|
572
|
+
*/
|
|
573
|
+
cancelOrder(requestParameters, options) {
|
|
574
|
+
return (0, exports.OrdersApiFp)(this.configuration).cancelOrder(requestParameters.project, requestParameters.orderId, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Confirms an order, and submits it as ready to take payment and begin processing.
|
|
578
|
+
* @summary Confirm order
|
|
579
|
+
* @param {OrdersApiConfirmOrderRequest} requestParameters Request parameters.
|
|
580
|
+
* @param {*} [options] Override http request option.
|
|
581
|
+
* @throws {RequiredError}
|
|
582
|
+
* @memberof OrdersApi
|
|
583
|
+
*/
|
|
584
|
+
confirmOrder(requestParameters, options) {
|
|
585
|
+
return (0, exports.OrdersApiFp)(this.configuration).confirmOrder(requestParameters.project, requestParameters.orderId, requestParameters.confirmOrderRequest, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Creates a new order for the provided variants. You can fetch details and references to the given project\'s variants from the Product Catalog API.
|
|
589
|
+
* @summary Create order
|
|
590
|
+
* @param {OrdersApiCreateOrderRequest} requestParameters Request parameters.
|
|
591
|
+
* @param {*} [options] Override http request option.
|
|
592
|
+
* @throws {RequiredError}
|
|
593
|
+
* @memberof OrdersApi
|
|
594
|
+
*/
|
|
595
|
+
createOrder(requestParameters, options) {
|
|
596
|
+
return (0, exports.OrdersApiFp)(this.configuration).createOrder(requestParameters.project, requestParameters.order, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Export orders as a CSV file
|
|
600
|
+
* @summary Export orders
|
|
601
|
+
* @param {OrdersApiExportOrdersRequest} requestParameters Request parameters.
|
|
602
|
+
* @param {*} [options] Override http request option.
|
|
603
|
+
* @throws {RequiredError}
|
|
604
|
+
* @memberof OrdersApi
|
|
605
|
+
*/
|
|
606
|
+
exportOrders(requestParameters, options) {
|
|
607
|
+
return (0, exports.OrdersApiFp)(this.configuration).exportOrders(requestParameters.project, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Get an order by a given ID.
|
|
611
|
+
* @summary Get order
|
|
612
|
+
* @param {OrdersApiGetOrderRequest} requestParameters Request parameters.
|
|
613
|
+
* @param {*} [options] Override http request option.
|
|
614
|
+
* @throws {RequiredError}
|
|
615
|
+
* @memberof OrdersApi
|
|
616
|
+
*/
|
|
617
|
+
getOrder(requestParameters, options) {
|
|
618
|
+
return (0, exports.OrdersApiFp)(this.configuration).getOrder(requestParameters.project, requestParameters.orderId, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* Lists all orders placed on this project, paginated into configurable chunks.
|
|
622
|
+
* @summary List orders
|
|
623
|
+
* @param {OrdersApiGetOrdersRequest} requestParameters Request parameters.
|
|
624
|
+
* @param {*} [options] Override http request option.
|
|
625
|
+
* @throws {RequiredError}
|
|
626
|
+
* @memberof OrdersApi
|
|
627
|
+
*/
|
|
628
|
+
getOrders(requestParameters, options) {
|
|
629
|
+
return (0, exports.OrdersApiFp)(this.configuration).getOrders(requestParameters.project, requestParameters.fields, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.ids, requestParameters.statuses, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
exports.OrdersApi = OrdersApi;
|