@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.
Files changed (69) hide show
  1. package/.openapi-generator/VERSION +1 -1
  2. package/README.md +2 -2
  3. package/dist/apis/OrdersApi.d.ts +16 -1
  4. package/dist/apis/OrdersApi.js +68 -1
  5. package/dist/models/Address.d.ts +1 -1
  6. package/dist/models/Address.js +25 -26
  7. package/dist/models/ApiError.d.ts +1 -1
  8. package/dist/models/ApiError.js +10 -14
  9. package/dist/models/ConfirmOrderFulfillment.d.ts +1 -1
  10. package/dist/models/ConfirmOrderFulfillment.js +11 -13
  11. package/dist/models/ConfirmOrderRequest.d.ts +1 -1
  12. package/dist/models/ConfirmOrderRequest.js +8 -11
  13. package/dist/models/ConfirmOrderValidationError.d.ts +1 -1
  14. package/dist/models/ConfirmOrderValidationError.js +11 -13
  15. package/dist/models/ContactInformation.d.ts +2 -2
  16. package/dist/models/ContactInformation.js +10 -14
  17. package/dist/models/DeliveryEstimates.d.ts +1 -1
  18. package/dist/models/DeliveryEstimates.js +9 -14
  19. package/dist/models/ExportOrders202Response.d.ts +1 -1
  20. package/dist/models/ExportOrders202Response.js +7 -12
  21. package/dist/models/Fulfillment.d.ts +4 -4
  22. package/dist/models/Fulfillment.js +19 -24
  23. package/dist/models/FulfillmentItem.d.ts +3 -3
  24. package/dist/models/FulfillmentItem.js +11 -16
  25. package/dist/models/Order.d.ts +2 -2
  26. package/dist/models/Order.js +41 -43
  27. package/dist/models/OrderItem.d.ts +3 -3
  28. package/dist/models/OrderItem.js +19 -22
  29. package/dist/models/OrderItemTaxPrice.d.ts +1 -1
  30. package/dist/models/OrderItemTaxPrice.js +9 -14
  31. package/dist/models/OrderTracking.d.ts +1 -1
  32. package/dist/models/OrderTracking.js +11 -16
  33. package/dist/models/OrdersResponse.d.ts +1 -1
  34. package/dist/models/OrdersResponse.js +9 -14
  35. package/dist/models/Origin.d.ts +1 -1
  36. package/dist/models/Origin.js +9 -14
  37. package/dist/models/Price.d.ts +1 -1
  38. package/dist/models/Price.js +9 -14
  39. package/dist/models/ShippingMethod.d.ts +1 -1
  40. package/dist/models/ShippingMethod.js +21 -26
  41. package/dist/models/Status.d.ts +1 -1
  42. package/dist/models/Status.js +1 -1
  43. package/dist/models/StatusHistoryItem.d.ts +1 -1
  44. package/dist/models/StatusHistoryItem.js +9 -14
  45. package/dist/runtime.d.ts +1 -1
  46. package/dist/runtime.js +1 -1
  47. package/package.json +1 -1
  48. package/src/apis/OrdersApi.ts +69 -1
  49. package/src/models/Address.ts +22 -27
  50. package/src/models/ApiError.ts +10 -15
  51. package/src/models/ConfirmOrderFulfillment.ts +10 -15
  52. package/src/models/ConfirmOrderRequest.ts +8 -13
  53. package/src/models/ConfirmOrderValidationError.ts +10 -15
  54. package/src/models/ContactInformation.ts +11 -16
  55. package/src/models/DeliveryEstimates.ts +10 -15
  56. package/src/models/ExportOrders202Response.ts +8 -13
  57. package/src/models/Fulfillment.ts +23 -28
  58. package/src/models/FulfillmentItem.ts +14 -19
  59. package/src/models/Order.ts +40 -45
  60. package/src/models/OrderItem.ts +20 -25
  61. package/src/models/OrderItemTaxPrice.ts +10 -15
  62. package/src/models/OrderTracking.ts +12 -17
  63. package/src/models/OrdersResponse.ts +10 -15
  64. package/src/models/Origin.ts +10 -15
  65. package/src/models/Price.ts +10 -15
  66. package/src/models/ShippingMethod.ts +22 -27
  67. package/src/models/Status.ts +1 -1
  68. package/src/models/StatusHistoryItem.ts +10 -15
  69. 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.5.4
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 { exists, mapValues } from '../runtime';
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 object identifier
23
+ * Unique fulfillment item id
24
24
  * @type {string}
25
25
  * @memberof FulfillmentItem
26
26
  */
27
27
  id?: string;
28
28
  /**
29
- * Unique object identifier
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
- let isInstance = true;
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 ((json === undefined) || (json === null)) {
54
+ if (json == null) {
57
55
  return json;
58
56
  }
59
57
  return {
60
58
 
61
- 'id': !exists(json, 'id') ? undefined : json['id'],
62
- 'itemId': !exists(json, 'itemId') ? undefined : json['itemId'],
63
- 'quantity': !exists(json, 'quantity') ? undefined : json['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 === undefined) {
69
- return undefined;
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.id,
77
- 'itemId': value.itemId,
78
- 'quantity': value.quantity,
71
+ 'id': value['id'],
72
+ 'itemId': value['itemId'],
73
+ 'quantity': value['quantity'],
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.5.4
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 { exists, mapValues } from '../runtime';
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 | null;
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
- let isInstance = true;
180
- isInstance = isInstance && "contactInformation" in value;
181
- isInstance = isInstance && "shippingAddress" in value;
182
- isInstance = isInstance && "items" in value;
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 ((json === undefined) || (json === null)) {
190
+ if (json == null) {
193
191
  return json;
194
192
  }
195
193
  return {
196
194
 
197
- 'id': !exists(json, 'id') ? undefined : json['id'],
198
- 'ref': !exists(json, 'ref') ? undefined : json['ref'],
199
- 'status': !exists(json, 'status') ? undefined : StatusFromJSON(json['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': !exists(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
203
- 'updatedAt': !exists(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])),
204
- 'merchantReference': !exists(json, 'merchantReference') ? undefined : json['merchantReference'],
205
- 'fulfillments': !exists(json, 'fulfillments') ? undefined : ((json['fulfillments'] as Array<any>).map(FulfillmentFromJSON)),
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': !exists(json, 'totalPrice') ? undefined : PriceFromJSON(json['totalPrice']),
208
- 'taxPrice': !exists(json, 'taxPrice') ? undefined : PriceFromJSON(json['taxPrice']),
209
- 'subtotalPrice': !exists(json, 'subtotalPrice') ? undefined : PriceFromJSON(json['subtotalPrice']),
210
- 'discountPrice': !exists(json, 'discountPrice') ? undefined : PriceFromJSON(json['discountPrice']),
211
- 'shippingPrice': !exists(json, 'shippingPrice') ? undefined : PriceFromJSON(json['shippingPrice']),
212
- 'origin': !exists(json, 'origin') ? undefined : OriginFromJSON(json['origin']),
213
- 'statusHistory': !exists(json, 'statusHistory') ? undefined : ((json['statusHistory'] as Array<any>).map(StatusHistoryItemFromJSON)),
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 === undefined) {
219
- return undefined;
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.id,
227
- 'ref': value.ref,
228
- 'status': StatusToJSON(value.status),
229
- 'contactInformation': ContactInformationToJSON(value.contactInformation),
230
- 'shippingAddress': AddressToJSON(value.shippingAddress),
231
- 'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
232
- 'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
233
- 'merchantReference': value.merchantReference,
234
- 'items': ((value.items as Array<any>).map(OrderItemToJSON)),
235
- 'totalPrice': PriceToJSON(value.totalPrice),
236
- 'taxPrice': PriceToJSON(value.taxPrice),
237
- 'subtotalPrice': PriceToJSON(value.subtotalPrice),
238
- 'discountPrice': PriceToJSON(value.discountPrice),
239
- 'shippingPrice': PriceToJSON(value.shippingPrice),
240
- 'origin': OriginToJSON(value.origin),
241
- 'statusHistory': value.statusHistory === undefined ? undefined : ((value.statusHistory as Array<any>).map(StatusHistoryItemToJSON)),
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
 
@@ -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.5.4
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 { exists, mapValues } from '../runtime';
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
- * A reference to the resource location
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
- let isInstance = true;
90
- isInstance = isInstance && "variantRef" in value;
91
- isInstance = isInstance && "quantity" in value;
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 ((json === undefined) || (json === null)) {
99
+ if (json == null) {
102
100
  return json;
103
101
  }
104
102
  return {
105
103
 
106
- 'id': !exists(json, 'id') ? undefined : json['id'],
104
+ 'id': json['id'] == null ? undefined : json['id'],
107
105
  'variantRef': json['variantRef'],
108
106
  'quantity': json['quantity'],
109
- 'totalPrice': !exists(json, 'totalPrice') ? undefined : PriceFromJSON(json['totalPrice']),
110
- 'taxPrice': !exists(json, 'taxPrice') ? undefined : OrderItemTaxPriceFromJSON(json['taxPrice']),
111
- 'subtotalPrice': !exists(json, 'subtotalPrice') ? undefined : PriceFromJSON(json['subtotalPrice']),
112
- 'discountPrice': !exists(json, 'discountPrice') ? undefined : PriceFromJSON(json['discountPrice']),
113
- 'recipientCost': !exists(json, 'recipientCost') ? undefined : PriceFromJSON(json['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 === undefined) {
119
- return undefined;
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.variantRef,
127
- 'quantity': value.quantity,
128
- 'taxPrice': OrderItemTaxPriceToJSON(value.taxPrice),
129
- 'recipientCost': PriceToJSON(value.recipientCost),
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.5.4
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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
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 ((json === undefined) || (json === null)) {
48
+ if (json == null) {
51
49
  return json;
52
50
  }
53
51
  return {
54
52
 
55
- 'amount': !exists(json, 'amount') ? undefined : json['amount'],
56
- 'currencyCode': !exists(json, 'currencyCode') ? undefined : json['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 === undefined) {
62
- return undefined;
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.amount,
70
- 'currencyCode': value.currencyCode,
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.5.4
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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
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 ((json === undefined) || (json === null)) {
54
+ if (json == null) {
57
55
  return json;
58
56
  }
59
57
  return {
60
58
 
61
- 'courier': !exists(json, 'courier') ? undefined : json['courier'],
62
- 'code': !exists(json, 'code') ? undefined : json['code'],
63
- 'url': !exists(json, 'url') ? undefined : json['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 === undefined) {
69
- return undefined;
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.courier,
77
- 'code': value.code,
78
- 'url': value.url,
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.5.4
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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
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 ((json === undefined) || (json === null)) {
55
+ if (json == null) {
58
56
  return json;
59
57
  }
60
58
  return {
61
59
 
62
- 'orders': !exists(json, 'orders') ? undefined : ((json['orders'] as Array<any>).map(OrderFromJSON)),
63
- 'nextPageToken': !exists(json, 'nextPageToken') ? undefined : json['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 === undefined) {
69
- return undefined;
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.orders === undefined ? undefined : ((value.orders as Array<any>).map(OrderToJSON)),
77
- 'nextPageToken': value.nextPageToken,
71
+ 'orders': value['orders'] == null ? undefined : ((value['orders'] as Array<any>).map(OrderToJSON)),
72
+ 'nextPageToken': value['nextPageToken'],
78
73
  };
79
74
  }
80
75
 
@@ -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.5.4
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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
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 ((json === undefined) || (json === null)) {
48
+ if (json == null) {
51
49
  return json;
52
50
  }
53
51
  return {
54
52
 
55
- 'code': !exists(json, 'code') ? undefined : json['code'],
56
- 'isPaid': !exists(json, 'isPaid') ? undefined : json['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 === undefined) {
62
- return undefined;
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.code,
70
- 'isPaid': value.isPaid,
64
+ 'code': value['code'],
65
+ 'isPaid': value['isPaid'],
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.5.4
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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
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 ((json === undefined) || (json === null)) {
48
+ if (json == null) {
51
49
  return json;
52
50
  }
53
51
  return {
54
52
 
55
- 'amount': !exists(json, 'amount') ? undefined : json['amount'],
56
- 'currencyCode': !exists(json, 'currencyCode') ? undefined : json['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 === undefined) {
62
- return undefined;
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.amount,
70
- 'currencyCode': value.currencyCode,
64
+ 'amount': value['amount'],
65
+ 'currencyCode': value['currencyCode'],
71
66
  };
72
67
  }
73
68