@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
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * 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)
4
4
  *
5
- * The version of the OpenAPI document: 1.5.4
5
+ * The version of the OpenAPI document: 1.6.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
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
7
  *
8
- * The version of the OpenAPI document: 1.5.4
8
+ * The version of the OpenAPI document: 1.6.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,13 +14,11 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ExportOrders202ResponseToJSON = exports.ExportOrders202ResponseFromJSONTyped = exports.ExportOrders202ResponseFromJSON = exports.instanceOfExportOrders202Response = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the ExportOrders202Response interface.
20
19
  */
21
20
  function instanceOfExportOrders202Response(value) {
22
- var isInstance = true;
23
- return isInstance;
21
+ return true;
24
22
  }
25
23
  exports.instanceOfExportOrders202Response = instanceOfExportOrders202Response;
26
24
  function ExportOrders202ResponseFromJSON(json) {
@@ -28,23 +26,20 @@ function ExportOrders202ResponseFromJSON(json) {
28
26
  }
29
27
  exports.ExportOrders202ResponseFromJSON = ExportOrders202ResponseFromJSON;
30
28
  function ExportOrders202ResponseFromJSONTyped(json, ignoreDiscriminator) {
31
- if ((json === undefined) || (json === null)) {
29
+ if (json == null) {
32
30
  return json;
33
31
  }
34
32
  return {
35
- 'message': !(0, runtime_1.exists)(json, 'message') ? undefined : json['message'],
33
+ 'message': json['message'] == null ? undefined : json['message'],
36
34
  };
37
35
  }
38
36
  exports.ExportOrders202ResponseFromJSONTyped = ExportOrders202ResponseFromJSONTyped;
39
37
  function ExportOrders202ResponseToJSON(value) {
40
- if (value === undefined) {
41
- return undefined;
42
- }
43
- if (value === null) {
44
- return null;
38
+ if (value == null) {
39
+ return value;
45
40
  }
46
41
  return {
47
- 'message': value.message,
42
+ 'message': value['message'],
48
43
  };
49
44
  }
50
45
  exports.ExportOrders202ResponseToJSON = ExportOrders202ResponseToJSON;
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * 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)
4
4
  *
5
- * The version of the OpenAPI document: 1.5.4
5
+ * The version of the OpenAPI document: 1.6.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -20,7 +20,7 @@ import type { Status } from './Status';
20
20
  */
21
21
  export interface Fulfillment {
22
22
  /**
23
- * Unique object identifier
23
+ * Unique fulfillment id
24
24
  * @type {string}
25
25
  * @memberof Fulfillment
26
26
  */
@@ -42,9 +42,9 @@ export interface Fulfillment {
42
42
  * @type {OrderTracking}
43
43
  * @memberof Fulfillment
44
44
  */
45
- tracking?: OrderTracking | null;
45
+ tracking?: OrderTracking;
46
46
  /**
47
- *
47
+ * Shipping method currently set
48
48
  * @type {ShippingMethod}
49
49
  * @memberof Fulfillment
50
50
  */
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
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
7
  *
8
- * The version of the OpenAPI document: 1.5.4
8
+ * The version of the OpenAPI document: 1.6.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,7 +14,6 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.FulfillmentToJSON = exports.FulfillmentFromJSONTyped = exports.FulfillmentFromJSON = exports.instanceOfFulfillment = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  var FulfillmentItem_1 = require("./FulfillmentItem");
19
18
  var OrderTracking_1 = require("./OrderTracking");
20
19
  var ShippingMethod_1 = require("./ShippingMethod");
@@ -23,8 +22,7 @@ var Status_1 = require("./Status");
23
22
  * Check if a given object implements the Fulfillment interface.
24
23
  */
25
24
  function instanceOfFulfillment(value) {
26
- var isInstance = true;
27
- return isInstance;
25
+ return true;
28
26
  }
29
27
  exports.instanceOfFulfillment = instanceOfFulfillment;
30
28
  function FulfillmentFromJSON(json) {
@@ -32,35 +30,32 @@ function FulfillmentFromJSON(json) {
32
30
  }
33
31
  exports.FulfillmentFromJSON = FulfillmentFromJSON;
34
32
  function FulfillmentFromJSONTyped(json, ignoreDiscriminator) {
35
- if ((json === undefined) || (json === null)) {
33
+ if (json == null) {
36
34
  return json;
37
35
  }
38
36
  return {
39
- 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
40
- 'status': !(0, runtime_1.exists)(json, 'status') ? undefined : (0, Status_1.StatusFromJSON)(json['status']),
41
- 'items': !(0, runtime_1.exists)(json, 'items') ? undefined : (json['items'].map(FulfillmentItem_1.FulfillmentItemFromJSON)),
42
- 'tracking': !(0, runtime_1.exists)(json, 'tracking') ? undefined : (0, OrderTracking_1.OrderTrackingFromJSON)(json['tracking']),
43
- 'shippingMethod': !(0, runtime_1.exists)(json, 'shippingMethod') ? undefined : (0, ShippingMethod_1.ShippingMethodFromJSON)(json['shippingMethod']),
44
- 'availableShippingMethods': !(0, runtime_1.exists)(json, 'availableShippingMethods') ? undefined : (json['availableShippingMethods'].map(ShippingMethod_1.ShippingMethodFromJSON)),
45
- 'packageWeight': !(0, runtime_1.exists)(json, 'packageWeight') ? undefined : json['packageWeight'],
37
+ 'id': json['id'] == null ? undefined : json['id'],
38
+ 'status': json['status'] == null ? undefined : (0, Status_1.StatusFromJSON)(json['status']),
39
+ 'items': json['items'] == null ? undefined : (json['items'].map(FulfillmentItem_1.FulfillmentItemFromJSON)),
40
+ 'tracking': json['tracking'] == null ? undefined : (0, OrderTracking_1.OrderTrackingFromJSON)(json['tracking']),
41
+ 'shippingMethod': json['shippingMethod'] == null ? undefined : (0, ShippingMethod_1.ShippingMethodFromJSON)(json['shippingMethod']),
42
+ 'availableShippingMethods': json['availableShippingMethods'] == null ? undefined : (json['availableShippingMethods'].map(ShippingMethod_1.ShippingMethodFromJSON)),
43
+ 'packageWeight': json['packageWeight'] == null ? undefined : json['packageWeight'],
46
44
  };
47
45
  }
48
46
  exports.FulfillmentFromJSONTyped = FulfillmentFromJSONTyped;
49
47
  function FulfillmentToJSON(value) {
50
- if (value === undefined) {
51
- return undefined;
52
- }
53
- if (value === null) {
54
- return null;
48
+ if (value == null) {
49
+ return value;
55
50
  }
56
51
  return {
57
- 'id': value.id,
58
- 'status': (0, Status_1.StatusToJSON)(value.status),
59
- 'items': value.items === undefined ? undefined : (value.items.map(FulfillmentItem_1.FulfillmentItemToJSON)),
60
- 'tracking': (0, OrderTracking_1.OrderTrackingToJSON)(value.tracking),
61
- 'shippingMethod': (0, ShippingMethod_1.ShippingMethodToJSON)(value.shippingMethod),
62
- 'availableShippingMethods': value.availableShippingMethods === undefined ? undefined : (value.availableShippingMethods.map(ShippingMethod_1.ShippingMethodToJSON)),
63
- 'packageWeight': value.packageWeight,
52
+ 'id': value['id'],
53
+ 'status': (0, Status_1.StatusToJSON)(value['status']),
54
+ 'items': value['items'] == null ? undefined : (value['items'].map(FulfillmentItem_1.FulfillmentItemToJSON)),
55
+ 'tracking': (0, OrderTracking_1.OrderTrackingToJSON)(value['tracking']),
56
+ 'shippingMethod': (0, ShippingMethod_1.ShippingMethodToJSON)(value['shippingMethod']),
57
+ 'availableShippingMethods': value['availableShippingMethods'] == null ? undefined : (value['availableShippingMethods'].map(ShippingMethod_1.ShippingMethodToJSON)),
58
+ 'packageWeight': value['packageWeight'],
64
59
  };
65
60
  }
66
61
  exports.FulfillmentToJSON = FulfillmentToJSON;
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * 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)
4
4
  *
5
- * The version of the OpenAPI document: 1.5.4
5
+ * The version of the OpenAPI document: 1.6.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -16,13 +16,13 @@
16
16
  */
17
17
  export interface FulfillmentItem {
18
18
  /**
19
- * Unique object identifier
19
+ * Unique fulfillment item id
20
20
  * @type {string}
21
21
  * @memberof FulfillmentItem
22
22
  */
23
23
  id?: string;
24
24
  /**
25
- * Unique object identifier
25
+ * Id of the order item being fulfilled
26
26
  * @type {string}
27
27
  * @memberof FulfillmentItem
28
28
  */
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
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
7
  *
8
- * The version of the OpenAPI document: 1.5.4
8
+ * The version of the OpenAPI document: 1.6.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,13 +14,11 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.FulfillmentItemToJSON = exports.FulfillmentItemFromJSONTyped = exports.FulfillmentItemFromJSON = exports.instanceOfFulfillmentItem = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the FulfillmentItem interface.
20
19
  */
21
20
  function instanceOfFulfillmentItem(value) {
22
- var isInstance = true;
23
- return isInstance;
21
+ return true;
24
22
  }
25
23
  exports.instanceOfFulfillmentItem = instanceOfFulfillmentItem;
26
24
  function FulfillmentItemFromJSON(json) {
@@ -28,27 +26,24 @@ function FulfillmentItemFromJSON(json) {
28
26
  }
29
27
  exports.FulfillmentItemFromJSON = FulfillmentItemFromJSON;
30
28
  function FulfillmentItemFromJSONTyped(json, ignoreDiscriminator) {
31
- if ((json === undefined) || (json === null)) {
29
+ if (json == null) {
32
30
  return json;
33
31
  }
34
32
  return {
35
- 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
36
- 'itemId': !(0, runtime_1.exists)(json, 'itemId') ? undefined : json['itemId'],
37
- 'quantity': !(0, runtime_1.exists)(json, 'quantity') ? undefined : json['quantity'],
33
+ 'id': json['id'] == null ? undefined : json['id'],
34
+ 'itemId': json['itemId'] == null ? undefined : json['itemId'],
35
+ 'quantity': json['quantity'] == null ? undefined : json['quantity'],
38
36
  };
39
37
  }
40
38
  exports.FulfillmentItemFromJSONTyped = FulfillmentItemFromJSONTyped;
41
39
  function FulfillmentItemToJSON(value) {
42
- if (value === undefined) {
43
- return undefined;
44
- }
45
- if (value === null) {
46
- return null;
40
+ if (value == null) {
41
+ return value;
47
42
  }
48
43
  return {
49
- 'id': value.id,
50
- 'itemId': value.itemId,
51
- 'quantity': value.quantity,
44
+ 'id': value['id'],
45
+ 'itemId': value['itemId'],
46
+ 'quantity': value['quantity'],
52
47
  };
53
48
  }
54
49
  exports.FulfillmentItemToJSON = FulfillmentItemToJSON;
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * 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)
4
4
  *
5
- * The version of the OpenAPI document: 1.5.4
5
+ * The version of the OpenAPI document: 1.6.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -70,7 +70,7 @@ export interface Order {
70
70
  * @type {string}
71
71
  * @memberof Order
72
72
  */
73
- merchantReference?: string | null;
73
+ merchantReference?: string;
74
74
  /**
75
75
  *
76
76
  * @type {Array<Fulfillment>}
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
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
7
  *
8
- * The version of the OpenAPI document: 1.5.4
8
+ * The version of the OpenAPI document: 1.6.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,7 +14,6 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.OrderToJSON = exports.OrderFromJSONTyped = exports.OrderFromJSON = exports.instanceOfOrder = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  var Address_1 = require("./Address");
19
18
  var ContactInformation_1 = require("./ContactInformation");
20
19
  var Fulfillment_1 = require("./Fulfillment");
@@ -27,11 +26,13 @@ var StatusHistoryItem_1 = require("./StatusHistoryItem");
27
26
  * Check if a given object implements the Order interface.
28
27
  */
29
28
  function instanceOfOrder(value) {
30
- var isInstance = true;
31
- isInstance = isInstance && "contactInformation" in value;
32
- isInstance = isInstance && "shippingAddress" in value;
33
- isInstance = isInstance && "items" in value;
34
- return isInstance;
29
+ if (!('contactInformation' in value))
30
+ return false;
31
+ if (!('shippingAddress' in value))
32
+ return false;
33
+ if (!('items' in value))
34
+ return false;
35
+ return true;
35
36
  }
36
37
  exports.instanceOfOrder = instanceOfOrder;
37
38
  function OrderFromJSON(json) {
@@ -39,54 +40,51 @@ function OrderFromJSON(json) {
39
40
  }
40
41
  exports.OrderFromJSON = OrderFromJSON;
41
42
  function OrderFromJSONTyped(json, ignoreDiscriminator) {
42
- if ((json === undefined) || (json === null)) {
43
+ if (json == null) {
43
44
  return json;
44
45
  }
45
46
  return {
46
- 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
47
- 'ref': !(0, runtime_1.exists)(json, 'ref') ? undefined : json['ref'],
48
- 'status': !(0, runtime_1.exists)(json, 'status') ? undefined : (0, Status_1.StatusFromJSON)(json['status']),
47
+ 'id': json['id'] == null ? undefined : json['id'],
48
+ 'ref': json['ref'] == null ? undefined : json['ref'],
49
+ 'status': json['status'] == null ? undefined : (0, Status_1.StatusFromJSON)(json['status']),
49
50
  'contactInformation': (0, ContactInformation_1.ContactInformationFromJSON)(json['contactInformation']),
50
51
  'shippingAddress': (0, Address_1.AddressFromJSON)(json['shippingAddress']),
51
- 'createdAt': !(0, runtime_1.exists)(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
52
- 'updatedAt': !(0, runtime_1.exists)(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])),
53
- 'merchantReference': !(0, runtime_1.exists)(json, 'merchantReference') ? undefined : json['merchantReference'],
54
- 'fulfillments': !(0, runtime_1.exists)(json, 'fulfillments') ? undefined : (json['fulfillments'].map(Fulfillment_1.FulfillmentFromJSON)),
52
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
53
+ 'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
54
+ 'merchantReference': json['merchantReference'] == null ? undefined : json['merchantReference'],
55
+ 'fulfillments': json['fulfillments'] == null ? undefined : (json['fulfillments'].map(Fulfillment_1.FulfillmentFromJSON)),
55
56
  'items': (json['items'].map(OrderItem_1.OrderItemFromJSON)),
56
- 'totalPrice': !(0, runtime_1.exists)(json, 'totalPrice') ? undefined : (0, Price_1.PriceFromJSON)(json['totalPrice']),
57
- 'taxPrice': !(0, runtime_1.exists)(json, 'taxPrice') ? undefined : (0, Price_1.PriceFromJSON)(json['taxPrice']),
58
- 'subtotalPrice': !(0, runtime_1.exists)(json, 'subtotalPrice') ? undefined : (0, Price_1.PriceFromJSON)(json['subtotalPrice']),
59
- 'discountPrice': !(0, runtime_1.exists)(json, 'discountPrice') ? undefined : (0, Price_1.PriceFromJSON)(json['discountPrice']),
60
- 'shippingPrice': !(0, runtime_1.exists)(json, 'shippingPrice') ? undefined : (0, Price_1.PriceFromJSON)(json['shippingPrice']),
61
- 'origin': !(0, runtime_1.exists)(json, 'origin') ? undefined : (0, Origin_1.OriginFromJSON)(json['origin']),
62
- 'statusHistory': !(0, runtime_1.exists)(json, 'statusHistory') ? undefined : (json['statusHistory'].map(StatusHistoryItem_1.StatusHistoryItemFromJSON)),
57
+ 'totalPrice': json['totalPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['totalPrice']),
58
+ 'taxPrice': json['taxPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['taxPrice']),
59
+ 'subtotalPrice': json['subtotalPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['subtotalPrice']),
60
+ 'discountPrice': json['discountPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['discountPrice']),
61
+ 'shippingPrice': json['shippingPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['shippingPrice']),
62
+ 'origin': json['origin'] == null ? undefined : (0, Origin_1.OriginFromJSON)(json['origin']),
63
+ 'statusHistory': json['statusHistory'] == null ? undefined : (json['statusHistory'].map(StatusHistoryItem_1.StatusHistoryItemFromJSON)),
63
64
  };
64
65
  }
65
66
  exports.OrderFromJSONTyped = OrderFromJSONTyped;
66
67
  function OrderToJSON(value) {
67
- if (value === undefined) {
68
- return undefined;
69
- }
70
- if (value === null) {
71
- return null;
68
+ if (value == null) {
69
+ return value;
72
70
  }
73
71
  return {
74
- 'id': value.id,
75
- 'ref': value.ref,
76
- 'status': (0, Status_1.StatusToJSON)(value.status),
77
- 'contactInformation': (0, ContactInformation_1.ContactInformationToJSON)(value.contactInformation),
78
- 'shippingAddress': (0, Address_1.AddressToJSON)(value.shippingAddress),
79
- 'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
80
- 'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
81
- 'merchantReference': value.merchantReference,
82
- 'items': (value.items.map(OrderItem_1.OrderItemToJSON)),
83
- 'totalPrice': (0, Price_1.PriceToJSON)(value.totalPrice),
84
- 'taxPrice': (0, Price_1.PriceToJSON)(value.taxPrice),
85
- 'subtotalPrice': (0, Price_1.PriceToJSON)(value.subtotalPrice),
86
- 'discountPrice': (0, Price_1.PriceToJSON)(value.discountPrice),
87
- 'shippingPrice': (0, Price_1.PriceToJSON)(value.shippingPrice),
88
- 'origin': (0, Origin_1.OriginToJSON)(value.origin),
89
- 'statusHistory': value.statusHistory === undefined ? undefined : (value.statusHistory.map(StatusHistoryItem_1.StatusHistoryItemToJSON)),
72
+ 'id': value['id'],
73
+ 'ref': value['ref'],
74
+ 'status': (0, Status_1.StatusToJSON)(value['status']),
75
+ 'contactInformation': (0, ContactInformation_1.ContactInformationToJSON)(value['contactInformation']),
76
+ 'shippingAddress': (0, Address_1.AddressToJSON)(value['shippingAddress']),
77
+ 'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
78
+ 'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
79
+ 'merchantReference': value['merchantReference'],
80
+ 'items': (value['items'].map(OrderItem_1.OrderItemToJSON)),
81
+ 'totalPrice': (0, Price_1.PriceToJSON)(value['totalPrice']),
82
+ 'taxPrice': (0, Price_1.PriceToJSON)(value['taxPrice']),
83
+ 'subtotalPrice': (0, Price_1.PriceToJSON)(value['subtotalPrice']),
84
+ 'discountPrice': (0, Price_1.PriceToJSON)(value['discountPrice']),
85
+ 'shippingPrice': (0, Price_1.PriceToJSON)(value['shippingPrice']),
86
+ 'origin': (0, Origin_1.OriginToJSON)(value['origin']),
87
+ 'statusHistory': value['statusHistory'] == null ? undefined : (value['statusHistory'].map(StatusHistoryItem_1.StatusHistoryItemToJSON)),
90
88
  };
91
89
  }
92
90
  exports.OrderToJSON = OrderToJSON;
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * 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)
4
4
  *
5
- * The version of the OpenAPI document: 1.5.4
5
+ * The version of the OpenAPI document: 1.6.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -24,7 +24,7 @@ export interface OrderItem {
24
24
  */
25
25
  readonly id?: string;
26
26
  /**
27
- * A reference to the resource location
27
+ * Reference URL to the order item variant
28
28
  * @type {string}
29
29
  * @memberof OrderItem
30
30
  */
@@ -60,7 +60,7 @@ export interface OrderItem {
60
60
  */
61
61
  readonly discountPrice?: Price;
62
62
  /**
63
- *
63
+ * The price you charged the recipient for each item. It's highly recommended if you have international orders as it aids customs issues.
64
64
  * @type {Price}
65
65
  * @memberof OrderItem
66
66
  */
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
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
7
  *
8
- * The version of the OpenAPI document: 1.5.4
8
+ * The version of the OpenAPI document: 1.6.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,17 +14,17 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.OrderItemToJSON = exports.OrderItemFromJSONTyped = exports.OrderItemFromJSON = exports.instanceOfOrderItem = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  var OrderItemTaxPrice_1 = require("./OrderItemTaxPrice");
19
18
  var Price_1 = require("./Price");
20
19
  /**
21
20
  * Check if a given object implements the OrderItem interface.
22
21
  */
23
22
  function instanceOfOrderItem(value) {
24
- var isInstance = true;
25
- isInstance = isInstance && "variantRef" in value;
26
- isInstance = isInstance && "quantity" in value;
27
- return isInstance;
23
+ if (!('variantRef' in value))
24
+ return false;
25
+ if (!('quantity' in value))
26
+ return false;
27
+ return true;
28
28
  }
29
29
  exports.instanceOfOrderItem = instanceOfOrderItem;
30
30
  function OrderItemFromJSON(json) {
@@ -32,33 +32,30 @@ function OrderItemFromJSON(json) {
32
32
  }
33
33
  exports.OrderItemFromJSON = OrderItemFromJSON;
34
34
  function OrderItemFromJSONTyped(json, ignoreDiscriminator) {
35
- if ((json === undefined) || (json === null)) {
35
+ if (json == null) {
36
36
  return json;
37
37
  }
38
38
  return {
39
- 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
39
+ 'id': json['id'] == null ? undefined : json['id'],
40
40
  'variantRef': json['variantRef'],
41
41
  'quantity': json['quantity'],
42
- 'totalPrice': !(0, runtime_1.exists)(json, 'totalPrice') ? undefined : (0, Price_1.PriceFromJSON)(json['totalPrice']),
43
- 'taxPrice': !(0, runtime_1.exists)(json, 'taxPrice') ? undefined : (0, OrderItemTaxPrice_1.OrderItemTaxPriceFromJSON)(json['taxPrice']),
44
- 'subtotalPrice': !(0, runtime_1.exists)(json, 'subtotalPrice') ? undefined : (0, Price_1.PriceFromJSON)(json['subtotalPrice']),
45
- 'discountPrice': !(0, runtime_1.exists)(json, 'discountPrice') ? undefined : (0, Price_1.PriceFromJSON)(json['discountPrice']),
46
- 'recipientCost': !(0, runtime_1.exists)(json, 'recipientCost') ? undefined : (0, Price_1.PriceFromJSON)(json['recipientCost']),
42
+ 'totalPrice': json['totalPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['totalPrice']),
43
+ 'taxPrice': json['taxPrice'] == null ? undefined : (0, OrderItemTaxPrice_1.OrderItemTaxPriceFromJSON)(json['taxPrice']),
44
+ 'subtotalPrice': json['subtotalPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['subtotalPrice']),
45
+ 'discountPrice': json['discountPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['discountPrice']),
46
+ 'recipientCost': json['recipientCost'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['recipientCost']),
47
47
  };
48
48
  }
49
49
  exports.OrderItemFromJSONTyped = OrderItemFromJSONTyped;
50
50
  function OrderItemToJSON(value) {
51
- if (value === undefined) {
52
- return undefined;
53
- }
54
- if (value === null) {
55
- return null;
51
+ if (value == null) {
52
+ return value;
56
53
  }
57
54
  return {
58
- 'variantRef': value.variantRef,
59
- 'quantity': value.quantity,
60
- 'taxPrice': (0, OrderItemTaxPrice_1.OrderItemTaxPriceToJSON)(value.taxPrice),
61
- 'recipientCost': (0, Price_1.PriceToJSON)(value.recipientCost),
55
+ 'variantRef': value['variantRef'],
56
+ 'quantity': value['quantity'],
57
+ 'taxPrice': (0, OrderItemTaxPrice_1.OrderItemTaxPriceToJSON)(value['taxPrice']),
58
+ 'recipientCost': (0, Price_1.PriceToJSON)(value['recipientCost']),
62
59
  };
63
60
  }
64
61
  exports.OrderItemToJSON = OrderItemToJSON;
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * 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)
4
4
  *
5
- * The version of the OpenAPI document: 1.5.4
5
+ * The version of the OpenAPI document: 1.6.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
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
7
  *
8
- * The version of the OpenAPI document: 1.5.4
8
+ * The version of the OpenAPI document: 1.6.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,13 +14,11 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.OrderItemTaxPriceToJSON = exports.OrderItemTaxPriceFromJSONTyped = exports.OrderItemTaxPriceFromJSON = exports.instanceOfOrderItemTaxPrice = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the OrderItemTaxPrice interface.
20
19
  */
21
20
  function instanceOfOrderItemTaxPrice(value) {
22
- var isInstance = true;
23
- return isInstance;
21
+ return true;
24
22
  }
25
23
  exports.instanceOfOrderItemTaxPrice = instanceOfOrderItemTaxPrice;
26
24
  function OrderItemTaxPriceFromJSON(json) {
@@ -28,25 +26,22 @@ function OrderItemTaxPriceFromJSON(json) {
28
26
  }
29
27
  exports.OrderItemTaxPriceFromJSON = OrderItemTaxPriceFromJSON;
30
28
  function OrderItemTaxPriceFromJSONTyped(json, ignoreDiscriminator) {
31
- if ((json === undefined) || (json === null)) {
29
+ if (json == null) {
32
30
  return json;
33
31
  }
34
32
  return {
35
- 'amount': !(0, runtime_1.exists)(json, 'amount') ? undefined : json['amount'],
36
- 'currencyCode': !(0, runtime_1.exists)(json, 'currencyCode') ? undefined : json['currencyCode'],
33
+ 'amount': json['amount'] == null ? undefined : json['amount'],
34
+ 'currencyCode': json['currencyCode'] == null ? undefined : json['currencyCode'],
37
35
  };
38
36
  }
39
37
  exports.OrderItemTaxPriceFromJSONTyped = OrderItemTaxPriceFromJSONTyped;
40
38
  function OrderItemTaxPriceToJSON(value) {
41
- if (value === undefined) {
42
- return undefined;
43
- }
44
- if (value === null) {
45
- return null;
39
+ if (value == null) {
40
+ return value;
46
41
  }
47
42
  return {
48
- 'amount': value.amount,
49
- 'currencyCode': value.currencyCode,
43
+ 'amount': value['amount'],
44
+ 'currencyCode': value['currencyCode'],
50
45
  };
51
46
  }
52
47
  exports.OrderItemTaxPriceToJSON = OrderItemTaxPriceToJSON;
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * 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)
4
4
  *
5
- * The version of the OpenAPI document: 1.5.4
5
+ * The version of the OpenAPI document: 1.6.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).