@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
  import type { DeliveryEstimates } from './DeliveryEstimates';
17
17
  import {
18
18
  DeliveryEstimatesFromJSON,
@@ -86,9 +86,7 @@ export interface ShippingMethod {
86
86
  * Check if a given object implements the ShippingMethod interface.
87
87
  */
88
88
  export function instanceOfShippingMethod(value: object): boolean {
89
- let isInstance = true;
90
-
91
- return isInstance;
89
+ return true;
92
90
  }
93
91
 
94
92
  export function ShippingMethodFromJSON(json: any): ShippingMethod {
@@ -96,39 +94,36 @@ export function ShippingMethodFromJSON(json: any): ShippingMethod {
96
94
  }
97
95
 
98
96
  export function ShippingMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShippingMethod {
99
- if ((json === undefined) || (json === null)) {
97
+ if (json == null) {
100
98
  return json;
101
99
  }
102
100
  return {
103
101
 
104
- 'id': !exists(json, 'id') ? undefined : json['id'],
105
- 'name': !exists(json, 'name') ? undefined : json['name'],
106
- 'description': !exists(json, 'description') ? undefined : json['description'],
107
- 'deliveryEstimates': !exists(json, 'deliveryEstimates') ? undefined : DeliveryEstimatesFromJSON(json['deliveryEstimates']),
108
- 'totalPrice': !exists(json, 'totalPrice') ? undefined : PriceFromJSON(json['totalPrice']),
109
- 'taxPrice': !exists(json, 'taxPrice') ? undefined : PriceFromJSON(json['taxPrice']),
110
- 'subtotalPrice': !exists(json, 'subtotalPrice') ? undefined : PriceFromJSON(json['subtotalPrice']),
111
- 'discountPrice': !exists(json, 'discountPrice') ? undefined : PriceFromJSON(json['discountPrice']),
102
+ 'id': json['id'] == null ? undefined : json['id'],
103
+ 'name': json['name'] == null ? undefined : json['name'],
104
+ 'description': json['description'] == null ? undefined : json['description'],
105
+ 'deliveryEstimates': json['deliveryEstimates'] == null ? undefined : DeliveryEstimatesFromJSON(json['deliveryEstimates']),
106
+ 'totalPrice': json['totalPrice'] == null ? undefined : PriceFromJSON(json['totalPrice']),
107
+ 'taxPrice': json['taxPrice'] == null ? undefined : PriceFromJSON(json['taxPrice']),
108
+ 'subtotalPrice': json['subtotalPrice'] == null ? undefined : PriceFromJSON(json['subtotalPrice']),
109
+ 'discountPrice': json['discountPrice'] == null ? undefined : PriceFromJSON(json['discountPrice']),
112
110
  };
113
111
  }
114
112
 
115
113
  export function ShippingMethodToJSON(value?: ShippingMethod | null): any {
116
- if (value === undefined) {
117
- return undefined;
118
- }
119
- if (value === null) {
120
- return null;
114
+ if (value == null) {
115
+ return value;
121
116
  }
122
117
  return {
123
118
 
124
- 'id': value.id,
125
- 'name': value.name,
126
- 'description': value.description,
127
- 'deliveryEstimates': DeliveryEstimatesToJSON(value.deliveryEstimates),
128
- 'totalPrice': PriceToJSON(value.totalPrice),
129
- 'taxPrice': PriceToJSON(value.taxPrice),
130
- 'subtotalPrice': PriceToJSON(value.subtotalPrice),
131
- 'discountPrice': PriceToJSON(value.discountPrice),
119
+ 'id': value['id'],
120
+ 'name': value['name'],
121
+ 'description': value['description'],
122
+ 'deliveryEstimates': DeliveryEstimatesToJSON(value['deliveryEstimates']),
123
+ 'totalPrice': PriceToJSON(value['totalPrice']),
124
+ 'taxPrice': PriceToJSON(value['taxPrice']),
125
+ 'subtotalPrice': PriceToJSON(value['subtotalPrice']),
126
+ 'discountPrice': PriceToJSON(value['discountPrice']),
132
127
  };
133
128
  }
134
129
 
@@ -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).
@@ -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 { Status } from './Status';
17
17
  import {
18
18
  StatusFromJSON,
@@ -44,9 +44,7 @@ export interface StatusHistoryItem {
44
44
  * Check if a given object implements the StatusHistoryItem interface.
45
45
  */
46
46
  export function instanceOfStatusHistoryItem(value: object): boolean {
47
- let isInstance = true;
48
-
49
- return isInstance;
47
+ return true;
50
48
  }
51
49
 
52
50
  export function StatusHistoryItemFromJSON(json: any): StatusHistoryItem {
@@ -54,27 +52,24 @@ export function StatusHistoryItemFromJSON(json: any): StatusHistoryItem {
54
52
  }
55
53
 
56
54
  export function StatusHistoryItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): StatusHistoryItem {
57
- if ((json === undefined) || (json === null)) {
55
+ if (json == null) {
58
56
  return json;
59
57
  }
60
58
  return {
61
59
 
62
- 'status': !exists(json, 'status') ? undefined : StatusFromJSON(json['status']),
63
- 'createdAt': !exists(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
60
+ 'status': json['status'] == null ? undefined : StatusFromJSON(json['status']),
61
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
64
62
  };
65
63
  }
66
64
 
67
65
  export function StatusHistoryItemToJSON(value?: StatusHistoryItem | 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
- 'status': StatusToJSON(value.status),
77
- 'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
71
+ 'status': StatusToJSON(value['status']),
72
+ 'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
78
73
  };
79
74
  }
80
75
 
package/src/runtime.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.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).