@teemill/orders 1.15.3 → 1.17.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 +73 -2
- package/api.ts +179 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +119 -1
- package/dist/api.js +96 -2
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +119 -1
- package/dist/esm/api.js +95 -1
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/Address.md +35 -0
- package/docs/ApiError.md +22 -0
- package/docs/ConfirmOrderFulfillment.md +24 -0
- package/docs/ConfirmOrderFulfillmentShipment.md +21 -0
- package/docs/ConfirmOrderRequest.md +20 -0
- package/docs/ConfirmOrderValidationError.md +22 -0
- package/docs/ContactInformation.md +23 -0
- package/docs/CreateOrder.md +29 -0
- package/docs/CreateOrderContactInformation.md +23 -0
- package/docs/CustomsInformation.md +27 -0
- package/docs/CustomsInformation1.md +26 -0
- package/docs/DeliveryEstimates.md +24 -0
- package/docs/ExportOrders202Response.md +20 -0
- package/docs/Fulfillment.md +34 -0
- package/docs/FulfillmentFulfiller.md +23 -0
- package/docs/FulfillmentFulfillerLocation.md +22 -0
- package/docs/FulfillmentItem.md +24 -0
- package/docs/Image.md +27 -0
- package/docs/Option.md +22 -0
- package/docs/Order.md +58 -0
- package/docs/OrderItem.md +40 -0
- package/docs/OrderItem1.md +24 -0
- package/docs/OrderItem1RecipientCost.md +22 -0
- package/docs/OrderTracking.md +24 -0
- package/docs/OrdersApi.md +475 -0
- package/docs/OrdersResponse.md +22 -0
- package/docs/Origin.md +22 -0
- package/docs/PaymentAttempt.md +29 -0
- package/docs/Price.md +23 -0
- package/docs/ShippingMethod.md +34 -0
- package/docs/Status.md +18 -0
- package/docs/StatusHistoryItem.md +22 -0
- package/index.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
# OrdersApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.localhost:8080*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**cancelOrder**](#cancelorder) | **DELETE** /v1/orders/{orderId} | Cancel order|
|
|
8
|
+
|[**confirmOrder**](#confirmorder) | **POST** /v1/orders/{orderId}/confirm | Confirm order|
|
|
9
|
+
|[**createOrder**](#createorder) | **POST** /v1/orders | Create order|
|
|
10
|
+
|[**exportOrders**](#exportorders) | **GET** /v1/orders/export | Export orders|
|
|
11
|
+
|[**getOrder**](#getorder) | **GET** /v1/orders/{orderId} | Get order|
|
|
12
|
+
|[**getOrders**](#getorders) | **GET** /v1/orders | List orders|
|
|
13
|
+
|[**retryPlatformPayment**](#retryplatformpayment) | **POST** /v1/orders/{orderId}/retryPlatformPayment | Retry|
|
|
14
|
+
|
|
15
|
+
# **cancelOrder**
|
|
16
|
+
> cancelOrder()
|
|
17
|
+
|
|
18
|
+
Cancels an order if it has not yet started processing.
|
|
19
|
+
|
|
20
|
+
### Example
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import {
|
|
24
|
+
OrdersApi,
|
|
25
|
+
Configuration
|
|
26
|
+
} from '@teemill/orders';
|
|
27
|
+
|
|
28
|
+
const configuration = new Configuration();
|
|
29
|
+
const apiInstance = new OrdersApi(configuration);
|
|
30
|
+
|
|
31
|
+
let project: string; //What project it is (default to undefined)
|
|
32
|
+
let orderId: string; //Unique identifier of an order (default to undefined)
|
|
33
|
+
let fields: string; //Specifies which fields to return, separated by commas (optional) (default to undefined)
|
|
34
|
+
|
|
35
|
+
const { status, data } = await apiInstance.cancelOrder(
|
|
36
|
+
project,
|
|
37
|
+
orderId,
|
|
38
|
+
fields
|
|
39
|
+
);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Parameters
|
|
43
|
+
|
|
44
|
+
|Name | Type | Description | Notes|
|
|
45
|
+
|------------- | ------------- | ------------- | -------------|
|
|
46
|
+
| **project** | [**string**] | What project it is | defaults to undefined|
|
|
47
|
+
| **orderId** | [**string**] | Unique identifier of an order | defaults to undefined|
|
|
48
|
+
| **fields** | [**string**] | Specifies which fields to return, separated by commas | (optional) defaults to undefined|
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Return type
|
|
52
|
+
|
|
53
|
+
void (empty response body)
|
|
54
|
+
|
|
55
|
+
### Authorization
|
|
56
|
+
|
|
57
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
58
|
+
|
|
59
|
+
### HTTP request headers
|
|
60
|
+
|
|
61
|
+
- **Content-Type**: Not defined
|
|
62
|
+
- **Accept**: application/json
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### HTTP response details
|
|
66
|
+
| Status code | Description | Response headers |
|
|
67
|
+
|-------------|-------------|------------------|
|
|
68
|
+
|**204** | Order has been cancelled | - |
|
|
69
|
+
|**400** | Failed validation | - |
|
|
70
|
+
|**401** | Not authorised to access this resource | - |
|
|
71
|
+
|**403** | Refuse to authorize | - |
|
|
72
|
+
|**404** | Resource not found | - |
|
|
73
|
+
|**500** | Unknown server error | - |
|
|
74
|
+
|
|
75
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
76
|
+
|
|
77
|
+
# **confirmOrder**
|
|
78
|
+
> Order confirmOrder(confirmOrderRequest)
|
|
79
|
+
|
|
80
|
+
Confirms an order, and submits it as ready to take payment and begin processing.
|
|
81
|
+
|
|
82
|
+
### Example
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
import {
|
|
86
|
+
OrdersApi,
|
|
87
|
+
Configuration,
|
|
88
|
+
ConfirmOrderRequest
|
|
89
|
+
} from '@teemill/orders';
|
|
90
|
+
|
|
91
|
+
const configuration = new Configuration();
|
|
92
|
+
const apiInstance = new OrdersApi(configuration);
|
|
93
|
+
|
|
94
|
+
let project: string; //What project it is (default to undefined)
|
|
95
|
+
let orderId: string; //Unique identifier of an order (default to undefined)
|
|
96
|
+
let confirmOrderRequest: ConfirmOrderRequest; //ConfirmFulfillment schema
|
|
97
|
+
let fields: string; //Specifies which fields to return, separated by commas (optional) (default to undefined)
|
|
98
|
+
|
|
99
|
+
const { status, data } = await apiInstance.confirmOrder(
|
|
100
|
+
project,
|
|
101
|
+
orderId,
|
|
102
|
+
confirmOrderRequest,
|
|
103
|
+
fields
|
|
104
|
+
);
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Parameters
|
|
108
|
+
|
|
109
|
+
|Name | Type | Description | Notes|
|
|
110
|
+
|------------- | ------------- | ------------- | -------------|
|
|
111
|
+
| **confirmOrderRequest** | **ConfirmOrderRequest**| ConfirmFulfillment schema | |
|
|
112
|
+
| **project** | [**string**] | What project it is | defaults to undefined|
|
|
113
|
+
| **orderId** | [**string**] | Unique identifier of an order | defaults to undefined|
|
|
114
|
+
| **fields** | [**string**] | Specifies which fields to return, separated by commas | (optional) defaults to undefined|
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
### Return type
|
|
118
|
+
|
|
119
|
+
**Order**
|
|
120
|
+
|
|
121
|
+
### Authorization
|
|
122
|
+
|
|
123
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
124
|
+
|
|
125
|
+
### HTTP request headers
|
|
126
|
+
|
|
127
|
+
- **Content-Type**: application/json
|
|
128
|
+
- **Accept**: application/json
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
### HTTP response details
|
|
132
|
+
| Status code | Description | Response headers |
|
|
133
|
+
|-------------|-------------|------------------|
|
|
134
|
+
|**200** | Order schema | - |
|
|
135
|
+
|**400** | Failed validation | - |
|
|
136
|
+
|**401** | Not authorised to access this resource | - |
|
|
137
|
+
|**403** | Refuse to authorize | - |
|
|
138
|
+
|**404** | Resource not found | - |
|
|
139
|
+
|**500** | Unknown server error | - |
|
|
140
|
+
|
|
141
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
142
|
+
|
|
143
|
+
# **createOrder**
|
|
144
|
+
> Order createOrder(createOrder)
|
|
145
|
+
|
|
146
|
+
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.
|
|
147
|
+
|
|
148
|
+
### Example
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
import {
|
|
152
|
+
OrdersApi,
|
|
153
|
+
Configuration,
|
|
154
|
+
CreateOrder
|
|
155
|
+
} from '@teemill/orders';
|
|
156
|
+
|
|
157
|
+
const configuration = new Configuration();
|
|
158
|
+
const apiInstance = new OrdersApi(configuration);
|
|
159
|
+
|
|
160
|
+
let project: string; //What project it is (default to undefined)
|
|
161
|
+
let createOrder: CreateOrder; //Create Order schema
|
|
162
|
+
let fields: string; //Specifies which fields to return, separated by commas (optional) (default to undefined)
|
|
163
|
+
|
|
164
|
+
const { status, data } = await apiInstance.createOrder(
|
|
165
|
+
project,
|
|
166
|
+
createOrder,
|
|
167
|
+
fields
|
|
168
|
+
);
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Parameters
|
|
172
|
+
|
|
173
|
+
|Name | Type | Description | Notes|
|
|
174
|
+
|------------- | ------------- | ------------- | -------------|
|
|
175
|
+
| **createOrder** | **CreateOrder**| Create Order schema | |
|
|
176
|
+
| **project** | [**string**] | What project it is | defaults to undefined|
|
|
177
|
+
| **fields** | [**string**] | Specifies which fields to return, separated by commas | (optional) defaults to undefined|
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
### Return type
|
|
181
|
+
|
|
182
|
+
**Order**
|
|
183
|
+
|
|
184
|
+
### Authorization
|
|
185
|
+
|
|
186
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
187
|
+
|
|
188
|
+
### HTTP request headers
|
|
189
|
+
|
|
190
|
+
- **Content-Type**: application/json
|
|
191
|
+
- **Accept**: application/json
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
### HTTP response details
|
|
195
|
+
| Status code | Description | Response headers |
|
|
196
|
+
|-------------|-------------|------------------|
|
|
197
|
+
|**201** | Order schema | - |
|
|
198
|
+
|**400** | Failed validation | - |
|
|
199
|
+
|**401** | Not authorised to access this resource | - |
|
|
200
|
+
|**403** | Refuse to authorize | - |
|
|
201
|
+
|**500** | Unknown server error | - |
|
|
202
|
+
|
|
203
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
204
|
+
|
|
205
|
+
# **exportOrders**
|
|
206
|
+
> File exportOrders()
|
|
207
|
+
|
|
208
|
+
Export orders as a CSV file
|
|
209
|
+
|
|
210
|
+
### Example
|
|
211
|
+
|
|
212
|
+
```typescript
|
|
213
|
+
import {
|
|
214
|
+
OrdersApi,
|
|
215
|
+
Configuration
|
|
216
|
+
} from '@teemill/orders';
|
|
217
|
+
|
|
218
|
+
const configuration = new Configuration();
|
|
219
|
+
const apiInstance = new OrdersApi(configuration);
|
|
220
|
+
|
|
221
|
+
let project: string; //What project it is (default to undefined)
|
|
222
|
+
let start: string; //Start of date range to filter by when orders were placed (default to undefined)
|
|
223
|
+
let end: string; //End of date range (optional) (default to undefined)
|
|
224
|
+
let search: string; //Search term to filter based on order reference, customer name and email (optional) (default to undefined)
|
|
225
|
+
|
|
226
|
+
const { status, data } = await apiInstance.exportOrders(
|
|
227
|
+
project,
|
|
228
|
+
start,
|
|
229
|
+
end,
|
|
230
|
+
search
|
|
231
|
+
);
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Parameters
|
|
235
|
+
|
|
236
|
+
|Name | Type | Description | Notes|
|
|
237
|
+
|------------- | ------------- | ------------- | -------------|
|
|
238
|
+
| **project** | [**string**] | What project it is | defaults to undefined|
|
|
239
|
+
| **start** | [**string**] | Start of date range to filter by when orders were placed | defaults to undefined|
|
|
240
|
+
| **end** | [**string**] | End of date range | (optional) defaults to undefined|
|
|
241
|
+
| **search** | [**string**] | Search term to filter based on order reference, customer name and email | (optional) defaults to undefined|
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
### Return type
|
|
245
|
+
|
|
246
|
+
**File**
|
|
247
|
+
|
|
248
|
+
### Authorization
|
|
249
|
+
|
|
250
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
251
|
+
|
|
252
|
+
### HTTP request headers
|
|
253
|
+
|
|
254
|
+
- **Content-Type**: Not defined
|
|
255
|
+
- **Accept**: text/csv; charset=utf-8, application/json
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
### HTTP response details
|
|
259
|
+
| Status code | Description | Response headers |
|
|
260
|
+
|-------------|-------------|------------------|
|
|
261
|
+
|**200** | Returns the CSV export | - |
|
|
262
|
+
|**202** | Export started. When complete, the export will be available for download from a notification within PodOS Dashboard. | - |
|
|
263
|
+
|**400** | Failed validation | - |
|
|
264
|
+
|**401** | Not authorised to access this resource | - |
|
|
265
|
+
|**403** | Refuse to authorize | - |
|
|
266
|
+
|**500** | Unknown server error | - |
|
|
267
|
+
|
|
268
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
269
|
+
|
|
270
|
+
# **getOrder**
|
|
271
|
+
> Order getOrder()
|
|
272
|
+
|
|
273
|
+
Get an order by a given ID.
|
|
274
|
+
|
|
275
|
+
### Example
|
|
276
|
+
|
|
277
|
+
```typescript
|
|
278
|
+
import {
|
|
279
|
+
OrdersApi,
|
|
280
|
+
Configuration
|
|
281
|
+
} from '@teemill/orders';
|
|
282
|
+
|
|
283
|
+
const configuration = new Configuration();
|
|
284
|
+
const apiInstance = new OrdersApi(configuration);
|
|
285
|
+
|
|
286
|
+
let project: string; //What project it is (default to undefined)
|
|
287
|
+
let orderId: string; //Unique identifier of an order (default to undefined)
|
|
288
|
+
let fields: string; //Specifies which fields to return, separated by commas (optional) (default to undefined)
|
|
289
|
+
|
|
290
|
+
const { status, data } = await apiInstance.getOrder(
|
|
291
|
+
project,
|
|
292
|
+
orderId,
|
|
293
|
+
fields
|
|
294
|
+
);
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Parameters
|
|
298
|
+
|
|
299
|
+
|Name | Type | Description | Notes|
|
|
300
|
+
|------------- | ------------- | ------------- | -------------|
|
|
301
|
+
| **project** | [**string**] | What project it is | defaults to undefined|
|
|
302
|
+
| **orderId** | [**string**] | Unique identifier of an order | defaults to undefined|
|
|
303
|
+
| **fields** | [**string**] | Specifies which fields to return, separated by commas | (optional) defaults to undefined|
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
### Return type
|
|
307
|
+
|
|
308
|
+
**Order**
|
|
309
|
+
|
|
310
|
+
### Authorization
|
|
311
|
+
|
|
312
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
313
|
+
|
|
314
|
+
### HTTP request headers
|
|
315
|
+
|
|
316
|
+
- **Content-Type**: Not defined
|
|
317
|
+
- **Accept**: application/json
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
### HTTP response details
|
|
321
|
+
| Status code | Description | Response headers |
|
|
322
|
+
|-------------|-------------|------------------|
|
|
323
|
+
|**200** | Order schema | - |
|
|
324
|
+
|**400** | Failed validation | - |
|
|
325
|
+
|**401** | Not authorised to access this resource | - |
|
|
326
|
+
|**403** | Refuse to authorize | - |
|
|
327
|
+
|**404** | Resource not found | - |
|
|
328
|
+
|**500** | Unknown server error | - |
|
|
329
|
+
|
|
330
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
331
|
+
|
|
332
|
+
# **getOrders**
|
|
333
|
+
> OrdersResponse getOrders()
|
|
334
|
+
|
|
335
|
+
Lists all orders placed on this project, paginated into configurable chunks.
|
|
336
|
+
|
|
337
|
+
### Example
|
|
338
|
+
|
|
339
|
+
```typescript
|
|
340
|
+
import {
|
|
341
|
+
OrdersApi,
|
|
342
|
+
Configuration
|
|
343
|
+
} from '@teemill/orders';
|
|
344
|
+
|
|
345
|
+
const configuration = new Configuration();
|
|
346
|
+
const apiInstance = new OrdersApi(configuration);
|
|
347
|
+
|
|
348
|
+
let project: string; //What project it is (default to undefined)
|
|
349
|
+
let fields: string; //Specifies which fields to return, separated by commas (optional) (default to undefined)
|
|
350
|
+
let pageToken: number; //Page reference token (optional) (default to 1)
|
|
351
|
+
let pageSize: number; //Max page size. This is the maximum page size that will be returned, but it might be smaller. (optional) (default to 100)
|
|
352
|
+
let search: string; //Search term to filter based on order reference, customer name and email (optional) (default to undefined)
|
|
353
|
+
let ids: Array<string>; //Specify fulfillment IDs to list (optional) (default to undefined)
|
|
354
|
+
let statuses: Array<Status>; //Filter by fulfillment status (optional) (default to undefined)
|
|
355
|
+
let start: string; //Start of date range (optional) (default to undefined)
|
|
356
|
+
let end: string; //End of date range (optional) (default to undefined)
|
|
357
|
+
let dateFilterType: 'createdAt' | 'updatedAt' | 'statusChangedAt'; //Specifies the type of date range filter to apply. Determines which date field the `start` and `end` fields should query. (optional) (default to 'createdAt')
|
|
358
|
+
|
|
359
|
+
const { status, data } = await apiInstance.getOrders(
|
|
360
|
+
project,
|
|
361
|
+
fields,
|
|
362
|
+
pageToken,
|
|
363
|
+
pageSize,
|
|
364
|
+
search,
|
|
365
|
+
ids,
|
|
366
|
+
statuses,
|
|
367
|
+
start,
|
|
368
|
+
end,
|
|
369
|
+
dateFilterType
|
|
370
|
+
);
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
### Parameters
|
|
374
|
+
|
|
375
|
+
|Name | Type | Description | Notes|
|
|
376
|
+
|------------- | ------------- | ------------- | -------------|
|
|
377
|
+
| **project** | [**string**] | What project it is | defaults to undefined|
|
|
378
|
+
| **fields** | [**string**] | Specifies which fields to return, separated by commas | (optional) defaults to undefined|
|
|
379
|
+
| **pageToken** | [**number**] | Page reference token | (optional) defaults to 1|
|
|
380
|
+
| **pageSize** | [**number**] | Max page size. This is the maximum page size that will be returned, but it might be smaller. | (optional) defaults to 100|
|
|
381
|
+
| **search** | [**string**] | Search term to filter based on order reference, customer name and email | (optional) defaults to undefined|
|
|
382
|
+
| **ids** | **Array<string>** | Specify fulfillment IDs to list | (optional) defaults to undefined|
|
|
383
|
+
| **statuses** | **Array<Status>** | Filter by fulfillment status | (optional) defaults to undefined|
|
|
384
|
+
| **start** | [**string**] | Start of date range | (optional) defaults to undefined|
|
|
385
|
+
| **end** | [**string**] | End of date range | (optional) defaults to undefined|
|
|
386
|
+
| **dateFilterType** | [**'createdAt' | 'updatedAt' | 'statusChangedAt'**]**Array<'createdAt' | 'updatedAt' | 'statusChangedAt'>** | Specifies the type of date range filter to apply. Determines which date field the `start` and `end` fields should query. | (optional) defaults to 'createdAt'|
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
### Return type
|
|
390
|
+
|
|
391
|
+
**OrdersResponse**
|
|
392
|
+
|
|
393
|
+
### Authorization
|
|
394
|
+
|
|
395
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
396
|
+
|
|
397
|
+
### HTTP request headers
|
|
398
|
+
|
|
399
|
+
- **Content-Type**: Not defined
|
|
400
|
+
- **Accept**: application/json
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
### HTTP response details
|
|
404
|
+
| Status code | Description | Response headers |
|
|
405
|
+
|-------------|-------------|------------------|
|
|
406
|
+
|**200** | List of orders and pagination metadata | - |
|
|
407
|
+
|**400** | Failed validation | - |
|
|
408
|
+
|**401** | Not authorised to access this resource | - |
|
|
409
|
+
|**403** | Refuse to authorize | - |
|
|
410
|
+
|**500** | Unknown server error | - |
|
|
411
|
+
|
|
412
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
413
|
+
|
|
414
|
+
# **retryPlatformPayment**
|
|
415
|
+
> Order retryPlatformPayment()
|
|
416
|
+
|
|
417
|
+
Retries failed platform payment, so fulfillment can proceed.
|
|
418
|
+
|
|
419
|
+
### Example
|
|
420
|
+
|
|
421
|
+
```typescript
|
|
422
|
+
import {
|
|
423
|
+
OrdersApi,
|
|
424
|
+
Configuration
|
|
425
|
+
} from '@teemill/orders';
|
|
426
|
+
|
|
427
|
+
const configuration = new Configuration();
|
|
428
|
+
const apiInstance = new OrdersApi(configuration);
|
|
429
|
+
|
|
430
|
+
let project: string; //What project it is (default to undefined)
|
|
431
|
+
let orderId: string; //Unique identifier of an order (default to undefined)
|
|
432
|
+
let fields: string; //Specifies which fields to return, separated by commas (optional) (default to undefined)
|
|
433
|
+
|
|
434
|
+
const { status, data } = await apiInstance.retryPlatformPayment(
|
|
435
|
+
project,
|
|
436
|
+
orderId,
|
|
437
|
+
fields
|
|
438
|
+
);
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
### Parameters
|
|
442
|
+
|
|
443
|
+
|Name | Type | Description | Notes|
|
|
444
|
+
|------------- | ------------- | ------------- | -------------|
|
|
445
|
+
| **project** | [**string**] | What project it is | defaults to undefined|
|
|
446
|
+
| **orderId** | [**string**] | Unique identifier of an order | defaults to undefined|
|
|
447
|
+
| **fields** | [**string**] | Specifies which fields to return, separated by commas | (optional) defaults to undefined|
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
### Return type
|
|
451
|
+
|
|
452
|
+
**Order**
|
|
453
|
+
|
|
454
|
+
### Authorization
|
|
455
|
+
|
|
456
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
457
|
+
|
|
458
|
+
### HTTP request headers
|
|
459
|
+
|
|
460
|
+
- **Content-Type**: Not defined
|
|
461
|
+
- **Accept**: application/json
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
### HTTP response details
|
|
465
|
+
| Status code | Description | Response headers |
|
|
466
|
+
|-------------|-------------|------------------|
|
|
467
|
+
|**200** | Order schema | - |
|
|
468
|
+
|**400** | Failed validation | - |
|
|
469
|
+
|**401** | Not authorised to access this resource | - |
|
|
470
|
+
|**403** | Refuse to authorize | - |
|
|
471
|
+
|**404** | Resource not found | - |
|
|
472
|
+
|**500** | Unknown server error | - |
|
|
473
|
+
|
|
474
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
475
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# OrdersResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**orders** | [**Array<Order>**](Order.md) | | [optional] [default to undefined]
|
|
9
|
+
**nextPageToken** | **number** | The token referencing the next page number | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { OrdersResponse } from '@teemill/orders';
|
|
15
|
+
|
|
16
|
+
const instance: OrdersResponse = {
|
|
17
|
+
orders,
|
|
18
|
+
nextPageToken,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/Origin.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Origin
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**code** | **string** | | [optional] [default to undefined]
|
|
9
|
+
**isPaid** | **boolean** | | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { Origin } from '@teemill/orders';
|
|
15
|
+
|
|
16
|
+
const instance: Origin = {
|
|
17
|
+
code,
|
|
18
|
+
isPaid,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# PaymentAttempt
|
|
2
|
+
|
|
3
|
+
List of payment attempts for this order
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**paymentProvider** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**status** | **string** | | [optional] [default to undefined]
|
|
11
|
+
**transactionId** | **string** | | [optional] [default to undefined]
|
|
12
|
+
**message** | **string** | | [optional] [default to undefined]
|
|
13
|
+
**createdAt** | **string** | ISO 8601 Timestamp | [optional] [default to undefined]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { PaymentAttempt } from '@teemill/orders';
|
|
19
|
+
|
|
20
|
+
const instance: PaymentAttempt = {
|
|
21
|
+
paymentProvider,
|
|
22
|
+
status,
|
|
23
|
+
transactionId,
|
|
24
|
+
message,
|
|
25
|
+
createdAt,
|
|
26
|
+
};
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/Price.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Price
|
|
2
|
+
|
|
3
|
+
Standard price definition that defines the amount and currency.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**amount** | **string** | Price including tax in the specified currency. | [optional] [default to undefined]
|
|
10
|
+
**currencyCode** | **string** | Currency code for the currency the price is valued in. | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { Price } from '@teemill/orders';
|
|
16
|
+
|
|
17
|
+
const instance: Price = {
|
|
18
|
+
amount,
|
|
19
|
+
currencyCode,
|
|
20
|
+
};
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# ShippingMethod
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **string** | Unique object identifier | [optional] [default to undefined]
|
|
9
|
+
**name** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**description** | **string** | | [optional] [default to undefined]
|
|
11
|
+
**deliveryEstimates** | [**DeliveryEstimates**](DeliveryEstimates.md) | | [optional] [default to undefined]
|
|
12
|
+
**totalPrice** | [**Price**](Price.md) | | [optional] [default to undefined]
|
|
13
|
+
**taxPrice** | [**Price**](Price.md) | | [optional] [default to undefined]
|
|
14
|
+
**subtotalPrice** | [**Price**](Price.md) | | [optional] [default to undefined]
|
|
15
|
+
**discountPrice** | [**Price**](Price.md) | | [optional] [default to undefined]
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { ShippingMethod } from '@teemill/orders';
|
|
21
|
+
|
|
22
|
+
const instance: ShippingMethod = {
|
|
23
|
+
id,
|
|
24
|
+
name,
|
|
25
|
+
description,
|
|
26
|
+
deliveryEstimates,
|
|
27
|
+
totalPrice,
|
|
28
|
+
taxPrice,
|
|
29
|
+
subtotalPrice,
|
|
30
|
+
discountPrice,
|
|
31
|
+
};
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/Status.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Status
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Enum
|
|
5
|
+
|
|
6
|
+
* `New` (value: `'new'`)
|
|
7
|
+
|
|
8
|
+
* `Paid` (value: `'paid'`)
|
|
9
|
+
|
|
10
|
+
* `Processing` (value: `'processing'`)
|
|
11
|
+
|
|
12
|
+
* `Complete` (value: `'complete'`)
|
|
13
|
+
|
|
14
|
+
* `Refunded` (value: `'refunded'`)
|
|
15
|
+
|
|
16
|
+
* `Quote` (value: `'quote'`)
|
|
17
|
+
|
|
18
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# StatusHistoryItem
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**status** | [**Status**](Status.md) | | [optional] [default to undefined]
|
|
9
|
+
**createdAt** | **string** | ISO 8601 Timestamp | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { StatusHistoryItem } from '@teemill/orders';
|
|
15
|
+
|
|
16
|
+
const instance: StatusHistoryItem = {
|
|
17
|
+
status,
|
|
18
|
+
createdAt,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orders API
|
|
5
5
|
* 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.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.17.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|