@teemill/orders 1.5.4 → 1.6.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/.openapi-generator/VERSION +1 -1
- package/README.md +2 -2
- package/dist/apis/OrdersApi.d.ts +16 -1
- package/dist/apis/OrdersApi.js +68 -1
- package/dist/models/Address.d.ts +1 -1
- package/dist/models/Address.js +25 -26
- package/dist/models/ApiError.d.ts +1 -1
- package/dist/models/ApiError.js +10 -14
- package/dist/models/ConfirmOrderFulfillment.d.ts +1 -1
- package/dist/models/ConfirmOrderFulfillment.js +11 -13
- package/dist/models/ConfirmOrderRequest.d.ts +1 -1
- package/dist/models/ConfirmOrderRequest.js +8 -11
- package/dist/models/ConfirmOrderValidationError.d.ts +1 -1
- package/dist/models/ConfirmOrderValidationError.js +11 -13
- package/dist/models/ContactInformation.d.ts +2 -2
- package/dist/models/ContactInformation.js +10 -14
- package/dist/models/DeliveryEstimates.d.ts +1 -1
- package/dist/models/DeliveryEstimates.js +9 -14
- package/dist/models/ExportOrders202Response.d.ts +1 -1
- package/dist/models/ExportOrders202Response.js +7 -12
- package/dist/models/Fulfillment.d.ts +4 -4
- package/dist/models/Fulfillment.js +19 -24
- package/dist/models/FulfillmentItem.d.ts +3 -3
- package/dist/models/FulfillmentItem.js +11 -16
- package/dist/models/Order.d.ts +2 -2
- package/dist/models/Order.js +41 -43
- package/dist/models/OrderItem.d.ts +3 -3
- package/dist/models/OrderItem.js +19 -22
- package/dist/models/OrderItemTaxPrice.d.ts +1 -1
- package/dist/models/OrderItemTaxPrice.js +9 -14
- package/dist/models/OrderTracking.d.ts +1 -1
- package/dist/models/OrderTracking.js +11 -16
- package/dist/models/OrdersResponse.d.ts +1 -1
- package/dist/models/OrdersResponse.js +9 -14
- package/dist/models/Origin.d.ts +1 -1
- package/dist/models/Origin.js +9 -14
- package/dist/models/Price.d.ts +1 -1
- package/dist/models/Price.js +9 -14
- package/dist/models/ShippingMethod.d.ts +1 -1
- package/dist/models/ShippingMethod.js +21 -26
- package/dist/models/Status.d.ts +1 -1
- package/dist/models/Status.js +1 -1
- package/dist/models/StatusHistoryItem.d.ts +1 -1
- package/dist/models/StatusHistoryItem.js +9 -14
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/package.json +1 -1
- package/src/apis/OrdersApi.ts +69 -1
- package/src/models/Address.ts +22 -27
- package/src/models/ApiError.ts +10 -15
- package/src/models/ConfirmOrderFulfillment.ts +10 -15
- package/src/models/ConfirmOrderRequest.ts +8 -13
- package/src/models/ConfirmOrderValidationError.ts +10 -15
- package/src/models/ContactInformation.ts +11 -16
- package/src/models/DeliveryEstimates.ts +10 -15
- package/src/models/ExportOrders202Response.ts +8 -13
- package/src/models/Fulfillment.ts +23 -28
- package/src/models/FulfillmentItem.ts +14 -19
- package/src/models/Order.ts +40 -45
- package/src/models/OrderItem.ts +20 -25
- package/src/models/OrderItemTaxPrice.ts +10 -15
- package/src/models/OrderTracking.ts +12 -17
- package/src/models/OrdersResponse.ts +10 -15
- package/src/models/Origin.ts +10 -15
- package/src/models/Price.ts +10 -15
- package/src/models/ShippingMethod.ts +22 -27
- package/src/models/Status.ts +1 -1
- package/src/models/StatusHistoryItem.ts +10 -15
- package/src/runtime.ts +1 -1
|
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.6.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
@@ -20,13 +20,13 @@ import { exists, mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface FulfillmentItem {
|
|
22
22
|
/**
|
|
23
|
-
* Unique
|
|
23
|
+
* Unique fulfillment item id
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof FulfillmentItem
|
|
26
26
|
*/
|
|
27
27
|
id?: string;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Id of the order item being fulfilled
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof FulfillmentItem
|
|
32
32
|
*/
|
|
@@ -43,9 +43,7 @@ export interface FulfillmentItem {
|
|
|
43
43
|
* Check if a given object implements the FulfillmentItem interface.
|
|
44
44
|
*/
|
|
45
45
|
export function instanceOfFulfillmentItem(value: object): boolean {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return isInstance;
|
|
46
|
+
return true;
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
export function FulfillmentItemFromJSON(json: any): FulfillmentItem {
|
|
@@ -53,29 +51,26 @@ export function FulfillmentItemFromJSON(json: any): FulfillmentItem {
|
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
export function FulfillmentItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): FulfillmentItem {
|
|
56
|
-
if (
|
|
54
|
+
if (json == null) {
|
|
57
55
|
return json;
|
|
58
56
|
}
|
|
59
57
|
return {
|
|
60
58
|
|
|
61
|
-
'id':
|
|
62
|
-
'itemId':
|
|
63
|
-
'quantity':
|
|
59
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
60
|
+
'itemId': json['itemId'] == null ? undefined : json['itemId'],
|
|
61
|
+
'quantity': json['quantity'] == null ? undefined : json['quantity'],
|
|
64
62
|
};
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
export function FulfillmentItemToJSON(value?: FulfillmentItem | null): any {
|
|
68
|
-
if (value
|
|
69
|
-
return
|
|
70
|
-
}
|
|
71
|
-
if (value === null) {
|
|
72
|
-
return null;
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
73
68
|
}
|
|
74
69
|
return {
|
|
75
70
|
|
|
76
|
-
'id': value
|
|
77
|
-
'itemId': value
|
|
78
|
-
'quantity': value
|
|
71
|
+
'id': value['id'],
|
|
72
|
+
'itemId': value['itemId'],
|
|
73
|
+
'quantity': value['quantity'],
|
|
79
74
|
};
|
|
80
75
|
}
|
|
81
76
|
|
package/src/models/Order.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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.6.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
16
|
import type { Address } from './Address';
|
|
17
17
|
import {
|
|
18
18
|
AddressFromJSON,
|
|
@@ -115,7 +115,7 @@ export interface Order {
|
|
|
115
115
|
* @type {string}
|
|
116
116
|
* @memberof Order
|
|
117
117
|
*/
|
|
118
|
-
merchantReference?: string
|
|
118
|
+
merchantReference?: string;
|
|
119
119
|
/**
|
|
120
120
|
*
|
|
121
121
|
* @type {Array<Fulfillment>}
|
|
@@ -176,12 +176,10 @@ export interface Order {
|
|
|
176
176
|
* Check if a given object implements the Order interface.
|
|
177
177
|
*/
|
|
178
178
|
export function instanceOfOrder(value: object): boolean {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
return isInstance;
|
|
179
|
+
if (!('contactInformation' in value)) return false;
|
|
180
|
+
if (!('shippingAddress' in value)) return false;
|
|
181
|
+
if (!('items' in value)) return false;
|
|
182
|
+
return true;
|
|
185
183
|
}
|
|
186
184
|
|
|
187
185
|
export function OrderFromJSON(json: any): Order {
|
|
@@ -189,56 +187,53 @@ export function OrderFromJSON(json: any): Order {
|
|
|
189
187
|
}
|
|
190
188
|
|
|
191
189
|
export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Order {
|
|
192
|
-
if (
|
|
190
|
+
if (json == null) {
|
|
193
191
|
return json;
|
|
194
192
|
}
|
|
195
193
|
return {
|
|
196
194
|
|
|
197
|
-
'id':
|
|
198
|
-
'ref':
|
|
199
|
-
'status':
|
|
195
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
196
|
+
'ref': json['ref'] == null ? undefined : json['ref'],
|
|
197
|
+
'status': json['status'] == null ? undefined : StatusFromJSON(json['status']),
|
|
200
198
|
'contactInformation': ContactInformationFromJSON(json['contactInformation']),
|
|
201
199
|
'shippingAddress': AddressFromJSON(json['shippingAddress']),
|
|
202
|
-
'createdAt':
|
|
203
|
-
'updatedAt':
|
|
204
|
-
'merchantReference':
|
|
205
|
-
'fulfillments':
|
|
200
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
201
|
+
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
202
|
+
'merchantReference': json['merchantReference'] == null ? undefined : json['merchantReference'],
|
|
203
|
+
'fulfillments': json['fulfillments'] == null ? undefined : ((json['fulfillments'] as Array<any>).map(FulfillmentFromJSON)),
|
|
206
204
|
'items': ((json['items'] as Array<any>).map(OrderItemFromJSON)),
|
|
207
|
-
'totalPrice':
|
|
208
|
-
'taxPrice':
|
|
209
|
-
'subtotalPrice':
|
|
210
|
-
'discountPrice':
|
|
211
|
-
'shippingPrice':
|
|
212
|
-
'origin':
|
|
213
|
-
'statusHistory':
|
|
205
|
+
'totalPrice': json['totalPrice'] == null ? undefined : PriceFromJSON(json['totalPrice']),
|
|
206
|
+
'taxPrice': json['taxPrice'] == null ? undefined : PriceFromJSON(json['taxPrice']),
|
|
207
|
+
'subtotalPrice': json['subtotalPrice'] == null ? undefined : PriceFromJSON(json['subtotalPrice']),
|
|
208
|
+
'discountPrice': json['discountPrice'] == null ? undefined : PriceFromJSON(json['discountPrice']),
|
|
209
|
+
'shippingPrice': json['shippingPrice'] == null ? undefined : PriceFromJSON(json['shippingPrice']),
|
|
210
|
+
'origin': json['origin'] == null ? undefined : OriginFromJSON(json['origin']),
|
|
211
|
+
'statusHistory': json['statusHistory'] == null ? undefined : ((json['statusHistory'] as Array<any>).map(StatusHistoryItemFromJSON)),
|
|
214
212
|
};
|
|
215
213
|
}
|
|
216
214
|
|
|
217
215
|
export function OrderToJSON(value?: Order | null): any {
|
|
218
|
-
if (value
|
|
219
|
-
return
|
|
220
|
-
}
|
|
221
|
-
if (value === null) {
|
|
222
|
-
return null;
|
|
216
|
+
if (value == null) {
|
|
217
|
+
return value;
|
|
223
218
|
}
|
|
224
219
|
return {
|
|
225
220
|
|
|
226
|
-
'id': value
|
|
227
|
-
'ref': value
|
|
228
|
-
'status': StatusToJSON(value
|
|
229
|
-
'contactInformation': ContactInformationToJSON(value
|
|
230
|
-
'shippingAddress': AddressToJSON(value
|
|
231
|
-
'createdAt': value
|
|
232
|
-
'updatedAt': value
|
|
233
|
-
'merchantReference': value
|
|
234
|
-
'items': ((value
|
|
235
|
-
'totalPrice': PriceToJSON(value
|
|
236
|
-
'taxPrice': PriceToJSON(value
|
|
237
|
-
'subtotalPrice': PriceToJSON(value
|
|
238
|
-
'discountPrice': PriceToJSON(value
|
|
239
|
-
'shippingPrice': PriceToJSON(value
|
|
240
|
-
'origin': OriginToJSON(value
|
|
241
|
-
'statusHistory': value
|
|
221
|
+
'id': value['id'],
|
|
222
|
+
'ref': value['ref'],
|
|
223
|
+
'status': StatusToJSON(value['status']),
|
|
224
|
+
'contactInformation': ContactInformationToJSON(value['contactInformation']),
|
|
225
|
+
'shippingAddress': AddressToJSON(value['shippingAddress']),
|
|
226
|
+
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
227
|
+
'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
|
|
228
|
+
'merchantReference': value['merchantReference'],
|
|
229
|
+
'items': ((value['items'] as Array<any>).map(OrderItemToJSON)),
|
|
230
|
+
'totalPrice': PriceToJSON(value['totalPrice']),
|
|
231
|
+
'taxPrice': PriceToJSON(value['taxPrice']),
|
|
232
|
+
'subtotalPrice': PriceToJSON(value['subtotalPrice']),
|
|
233
|
+
'discountPrice': PriceToJSON(value['discountPrice']),
|
|
234
|
+
'shippingPrice': PriceToJSON(value['shippingPrice']),
|
|
235
|
+
'origin': OriginToJSON(value['origin']),
|
|
236
|
+
'statusHistory': value['statusHistory'] == null ? undefined : ((value['statusHistory'] as Array<any>).map(StatusHistoryItemToJSON)),
|
|
242
237
|
};
|
|
243
238
|
}
|
|
244
239
|
|
package/src/models/OrderItem.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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.6.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
16
|
import type { OrderItemTaxPrice } from './OrderItemTaxPrice';
|
|
17
17
|
import {
|
|
18
18
|
OrderItemTaxPriceFromJSON,
|
|
@@ -39,7 +39,7 @@ export interface OrderItem {
|
|
|
39
39
|
*/
|
|
40
40
|
readonly id?: string;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Reference URL to the order item variant
|
|
43
43
|
* @type {string}
|
|
44
44
|
* @memberof OrderItem
|
|
45
45
|
*/
|
|
@@ -75,7 +75,7 @@ export interface OrderItem {
|
|
|
75
75
|
*/
|
|
76
76
|
readonly discountPrice?: Price;
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
78
|
+
* The price you charged the recipient for each item. It's highly recommended if you have international orders as it aids customs issues.
|
|
79
79
|
* @type {Price}
|
|
80
80
|
* @memberof OrderItem
|
|
81
81
|
*/
|
|
@@ -86,11 +86,9 @@ export interface OrderItem {
|
|
|
86
86
|
* Check if a given object implements the OrderItem interface.
|
|
87
87
|
*/
|
|
88
88
|
export function instanceOfOrderItem(value: object): boolean {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return isInstance;
|
|
89
|
+
if (!('variantRef' in value)) return false;
|
|
90
|
+
if (!('quantity' in value)) return false;
|
|
91
|
+
return true;
|
|
94
92
|
}
|
|
95
93
|
|
|
96
94
|
export function OrderItemFromJSON(json: any): OrderItem {
|
|
@@ -98,35 +96,32 @@ export function OrderItemFromJSON(json: any): OrderItem {
|
|
|
98
96
|
}
|
|
99
97
|
|
|
100
98
|
export function OrderItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderItem {
|
|
101
|
-
if (
|
|
99
|
+
if (json == null) {
|
|
102
100
|
return json;
|
|
103
101
|
}
|
|
104
102
|
return {
|
|
105
103
|
|
|
106
|
-
'id':
|
|
104
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
107
105
|
'variantRef': json['variantRef'],
|
|
108
106
|
'quantity': json['quantity'],
|
|
109
|
-
'totalPrice':
|
|
110
|
-
'taxPrice':
|
|
111
|
-
'subtotalPrice':
|
|
112
|
-
'discountPrice':
|
|
113
|
-
'recipientCost':
|
|
107
|
+
'totalPrice': json['totalPrice'] == null ? undefined : PriceFromJSON(json['totalPrice']),
|
|
108
|
+
'taxPrice': json['taxPrice'] == null ? undefined : OrderItemTaxPriceFromJSON(json['taxPrice']),
|
|
109
|
+
'subtotalPrice': json['subtotalPrice'] == null ? undefined : PriceFromJSON(json['subtotalPrice']),
|
|
110
|
+
'discountPrice': json['discountPrice'] == null ? undefined : PriceFromJSON(json['discountPrice']),
|
|
111
|
+
'recipientCost': json['recipientCost'] == null ? undefined : PriceFromJSON(json['recipientCost']),
|
|
114
112
|
};
|
|
115
113
|
}
|
|
116
114
|
|
|
117
115
|
export function OrderItemToJSON(value?: OrderItem | null): any {
|
|
118
|
-
if (value
|
|
119
|
-
return
|
|
120
|
-
}
|
|
121
|
-
if (value === null) {
|
|
122
|
-
return null;
|
|
116
|
+
if (value == null) {
|
|
117
|
+
return value;
|
|
123
118
|
}
|
|
124
119
|
return {
|
|
125
120
|
|
|
126
|
-
'variantRef': value
|
|
127
|
-
'quantity': value
|
|
128
|
-
'taxPrice': OrderItemTaxPriceToJSON(value
|
|
129
|
-
'recipientCost': PriceToJSON(value
|
|
121
|
+
'variantRef': value['variantRef'],
|
|
122
|
+
'quantity': value['quantity'],
|
|
123
|
+
'taxPrice': OrderItemTaxPriceToJSON(value['taxPrice']),
|
|
124
|
+
'recipientCost': PriceToJSON(value['recipientCost']),
|
|
130
125
|
};
|
|
131
126
|
}
|
|
132
127
|
|
|
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.6.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
16
|
/**
|
|
17
17
|
* This is an estimate until the order has been confirmed
|
|
18
18
|
* @export
|
|
@@ -37,9 +37,7 @@ export interface OrderItemTaxPrice {
|
|
|
37
37
|
* Check if a given object implements the OrderItemTaxPrice interface.
|
|
38
38
|
*/
|
|
39
39
|
export function instanceOfOrderItemTaxPrice(value: object): boolean {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return isInstance;
|
|
40
|
+
return true;
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
export function OrderItemTaxPriceFromJSON(json: any): OrderItemTaxPrice {
|
|
@@ -47,27 +45,24 @@ export function OrderItemTaxPriceFromJSON(json: any): OrderItemTaxPrice {
|
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
export function OrderItemTaxPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderItemTaxPrice {
|
|
50
|
-
if (
|
|
48
|
+
if (json == null) {
|
|
51
49
|
return json;
|
|
52
50
|
}
|
|
53
51
|
return {
|
|
54
52
|
|
|
55
|
-
'amount':
|
|
56
|
-
'currencyCode':
|
|
53
|
+
'amount': json['amount'] == null ? undefined : json['amount'],
|
|
54
|
+
'currencyCode': json['currencyCode'] == null ? undefined : json['currencyCode'],
|
|
57
55
|
};
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
export function OrderItemTaxPriceToJSON(value?: OrderItemTaxPrice | null): any {
|
|
61
|
-
if (value
|
|
62
|
-
return
|
|
63
|
-
}
|
|
64
|
-
if (value === null) {
|
|
65
|
-
return null;
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
66
61
|
}
|
|
67
62
|
return {
|
|
68
63
|
|
|
69
|
-
'amount': value
|
|
70
|
-
'currencyCode': value
|
|
64
|
+
'amount': value['amount'],
|
|
65
|
+
'currencyCode': value['currencyCode'],
|
|
71
66
|
};
|
|
72
67
|
}
|
|
73
68
|
|
|
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.6.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
@@ -43,9 +43,7 @@ export interface OrderTracking {
|
|
|
43
43
|
* Check if a given object implements the OrderTracking interface.
|
|
44
44
|
*/
|
|
45
45
|
export function instanceOfOrderTracking(value: object): boolean {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return isInstance;
|
|
46
|
+
return true;
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
export function OrderTrackingFromJSON(json: any): OrderTracking {
|
|
@@ -53,29 +51,26 @@ export function OrderTrackingFromJSON(json: any): OrderTracking {
|
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
export function OrderTrackingFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderTracking {
|
|
56
|
-
if (
|
|
54
|
+
if (json == null) {
|
|
57
55
|
return json;
|
|
58
56
|
}
|
|
59
57
|
return {
|
|
60
58
|
|
|
61
|
-
'courier':
|
|
62
|
-
'code':
|
|
63
|
-
'url':
|
|
59
|
+
'courier': json['courier'] == null ? undefined : json['courier'],
|
|
60
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
61
|
+
'url': json['url'] == null ? undefined : json['url'],
|
|
64
62
|
};
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
export function OrderTrackingToJSON(value?: OrderTracking | null): any {
|
|
68
|
-
if (value
|
|
69
|
-
return
|
|
70
|
-
}
|
|
71
|
-
if (value === null) {
|
|
72
|
-
return null;
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
73
68
|
}
|
|
74
69
|
return {
|
|
75
70
|
|
|
76
|
-
'courier': value
|
|
77
|
-
'code': value
|
|
78
|
-
'url': value
|
|
71
|
+
'courier': value['courier'],
|
|
72
|
+
'code': value['code'],
|
|
73
|
+
'url': value['url'],
|
|
79
74
|
};
|
|
80
75
|
}
|
|
81
76
|
|
|
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.6.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
16
|
import type { Order } from './Order';
|
|
17
17
|
import {
|
|
18
18
|
OrderFromJSON,
|
|
@@ -44,9 +44,7 @@ export interface OrdersResponse {
|
|
|
44
44
|
* Check if a given object implements the OrdersResponse interface.
|
|
45
45
|
*/
|
|
46
46
|
export function instanceOfOrdersResponse(value: object): boolean {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return isInstance;
|
|
47
|
+
return true;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
export function OrdersResponseFromJSON(json: any): OrdersResponse {
|
|
@@ -54,27 +52,24 @@ export function OrdersResponseFromJSON(json: any): OrdersResponse {
|
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
export function OrdersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrdersResponse {
|
|
57
|
-
if (
|
|
55
|
+
if (json == null) {
|
|
58
56
|
return json;
|
|
59
57
|
}
|
|
60
58
|
return {
|
|
61
59
|
|
|
62
|
-
'orders':
|
|
63
|
-
'nextPageToken':
|
|
60
|
+
'orders': json['orders'] == null ? undefined : ((json['orders'] as Array<any>).map(OrderFromJSON)),
|
|
61
|
+
'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
|
|
64
62
|
};
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
export function OrdersResponseToJSON(value?: OrdersResponse | null): any {
|
|
68
|
-
if (value
|
|
69
|
-
return
|
|
70
|
-
}
|
|
71
|
-
if (value === null) {
|
|
72
|
-
return null;
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
73
68
|
}
|
|
74
69
|
return {
|
|
75
70
|
|
|
76
|
-
'orders': value
|
|
77
|
-
'nextPageToken': value
|
|
71
|
+
'orders': value['orders'] == null ? undefined : ((value['orders'] as Array<any>).map(OrderToJSON)),
|
|
72
|
+
'nextPageToken': value['nextPageToken'],
|
|
78
73
|
};
|
|
79
74
|
}
|
|
80
75
|
|
package/src/models/Origin.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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.6.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
@@ -37,9 +37,7 @@ export interface Origin {
|
|
|
37
37
|
* Check if a given object implements the Origin interface.
|
|
38
38
|
*/
|
|
39
39
|
export function instanceOfOrigin(value: object): boolean {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return isInstance;
|
|
40
|
+
return true;
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
export function OriginFromJSON(json: any): Origin {
|
|
@@ -47,27 +45,24 @@ export function OriginFromJSON(json: any): Origin {
|
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
export function OriginFromJSONTyped(json: any, ignoreDiscriminator: boolean): Origin {
|
|
50
|
-
if (
|
|
48
|
+
if (json == null) {
|
|
51
49
|
return json;
|
|
52
50
|
}
|
|
53
51
|
return {
|
|
54
52
|
|
|
55
|
-
'code':
|
|
56
|
-
'isPaid':
|
|
53
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
54
|
+
'isPaid': json['isPaid'] == null ? undefined : json['isPaid'],
|
|
57
55
|
};
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
export function OriginToJSON(value?: Origin | null): any {
|
|
61
|
-
if (value
|
|
62
|
-
return
|
|
63
|
-
}
|
|
64
|
-
if (value === null) {
|
|
65
|
-
return null;
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
66
61
|
}
|
|
67
62
|
return {
|
|
68
63
|
|
|
69
|
-
'code': value
|
|
70
|
-
'isPaid': value
|
|
64
|
+
'code': value['code'],
|
|
65
|
+
'isPaid': value['isPaid'],
|
|
71
66
|
};
|
|
72
67
|
}
|
|
73
68
|
|
package/src/models/Price.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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.6.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
16
|
/**
|
|
17
17
|
* Standard price definition that defines the amount and currency.
|
|
18
18
|
* @export
|
|
@@ -37,9 +37,7 @@ export interface Price {
|
|
|
37
37
|
* Check if a given object implements the Price interface.
|
|
38
38
|
*/
|
|
39
39
|
export function instanceOfPrice(value: object): boolean {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return isInstance;
|
|
40
|
+
return true;
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
export function PriceFromJSON(json: any): Price {
|
|
@@ -47,27 +45,24 @@ export function PriceFromJSON(json: any): Price {
|
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
export function PriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Price {
|
|
50
|
-
if (
|
|
48
|
+
if (json == null) {
|
|
51
49
|
return json;
|
|
52
50
|
}
|
|
53
51
|
return {
|
|
54
52
|
|
|
55
|
-
'amount':
|
|
56
|
-
'currencyCode':
|
|
53
|
+
'amount': json['amount'] == null ? undefined : json['amount'],
|
|
54
|
+
'currencyCode': json['currencyCode'] == null ? undefined : json['currencyCode'],
|
|
57
55
|
};
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
export function PriceToJSON(value?: Price | null): any {
|
|
61
|
-
if (value
|
|
62
|
-
return
|
|
63
|
-
}
|
|
64
|
-
if (value === null) {
|
|
65
|
-
return null;
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
66
61
|
}
|
|
67
62
|
return {
|
|
68
63
|
|
|
69
|
-
'amount': value
|
|
70
|
-
'currencyCode': value
|
|
64
|
+
'amount': value['amount'],
|
|
65
|
+
'currencyCode': value['currencyCode'],
|
|
71
66
|
};
|
|
72
67
|
}
|
|
73
68
|
|