@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
@@ -1 +1 @@
1
- 7.3.0
1
+ 7.4.0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @teemill/orders@1.5.4
1
+ ## @teemill/orders@1.6.0
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @teemill/orders@1.5.4 --save
39
+ npm install @teemill/orders@1.6.0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -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).
@@ -11,6 +11,11 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import type { ConfirmOrderRequest, Order, OrdersResponse, Status } from '../models/index';
14
+ export interface CancelOrderRequest {
15
+ project: string;
16
+ orderId: string;
17
+ fields?: string;
18
+ }
14
19
  export interface ConfirmOrderOperationRequest {
15
20
  project: string;
16
21
  orderId: string;
@@ -47,6 +52,16 @@ export interface GetOrdersRequest {
47
52
  *
48
53
  */
49
54
  export declare class OrdersApi extends runtime.BaseAPI {
55
+ /**
56
+ * Cancels an order if it has not yet started processing.
57
+ * Cancel order
58
+ */
59
+ cancelOrderRaw(requestParameters: CancelOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
60
+ /**
61
+ * Cancels an order if it has not yet started processing.
62
+ * Cancel order
63
+ */
64
+ cancelOrder(project: string, orderId: string, optionalParameters?: runtime.OptionalOnly<CancelOrderRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
50
65
  /**
51
66
  * Confirms an order, and submits it as ready to take payment and begin processing.
52
67
  * Confirm order
@@ -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).
@@ -86,6 +86,73 @@ var OrdersApi = /** @class */ (function (_super) {
86
86
  function OrdersApi() {
87
87
  return _super !== null && _super.apply(this, arguments) || this;
88
88
  }
89
+ /**
90
+ * Cancels an order if it has not yet started processing.
91
+ * Cancel order
92
+ */
93
+ OrdersApi.prototype.cancelOrderRaw = function (requestParameters, initOverrides) {
94
+ return __awaiter(this, void 0, void 0, function () {
95
+ var queryParameters, headerParameters, _a, _b, response;
96
+ return __generator(this, function (_c) {
97
+ switch (_c.label) {
98
+ case 0:
99
+ if (requestParameters.project === null || requestParameters.project === undefined) {
100
+ throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling cancelOrder.');
101
+ }
102
+ if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
103
+ throw new runtime.RequiredError('orderId', 'Required parameter requestParameters.orderId was null or undefined when calling cancelOrder.');
104
+ }
105
+ queryParameters = {};
106
+ if (requestParameters.project !== undefined) {
107
+ queryParameters['project'] = requestParameters.project;
108
+ }
109
+ if (requestParameters.fields !== undefined) {
110
+ queryParameters['fields'] = requestParameters.fields;
111
+ }
112
+ headerParameters = {};
113
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
114
+ // oauth required
115
+ _a = headerParameters;
116
+ _b = "Authorization";
117
+ return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
118
+ case 1:
119
+ // oauth required
120
+ _a[_b] = _c.sent();
121
+ _c.label = 2;
122
+ case 2:
123
+ if (this.configuration && this.configuration.apiKey) {
124
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
125
+ }
126
+ return [4 /*yield*/, this.request({
127
+ path: "/v1/orders/{orderId}".replace("{".concat("orderId", "}"), encodeURIComponent(String(requestParameters.orderId))),
128
+ method: 'DELETE',
129
+ headers: headerParameters,
130
+ query: queryParameters,
131
+ }, initOverrides)];
132
+ case 3:
133
+ response = _c.sent();
134
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
135
+ }
136
+ });
137
+ });
138
+ };
139
+ /**
140
+ * Cancels an order if it has not yet started processing.
141
+ * Cancel order
142
+ */
143
+ OrdersApi.prototype.cancelOrder = function (project, orderId, optionalParameters, initOverrides) {
144
+ if (optionalParameters === void 0) { optionalParameters = {}; }
145
+ return __awaiter(this, void 0, void 0, function () {
146
+ return __generator(this, function (_a) {
147
+ switch (_a.label) {
148
+ case 0: return [4 /*yield*/, this.cancelOrderRaw(__assign({ project: project, orderId: orderId }, optionalParameters), initOverrides)];
149
+ case 1:
150
+ _a.sent();
151
+ return [2 /*return*/];
152
+ }
153
+ });
154
+ });
155
+ };
89
156
  /**
90
157
  * Confirms an order, and submits it as ready to take payment and begin processing.
91
158
  * Confirm order
@@ -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,17 +14,19 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.AddressToJSON = exports.AddressFromJSONTyped = exports.AddressFromJSON = exports.instanceOfAddress = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the Address interface.
20
19
  */
21
20
  function instanceOfAddress(value) {
22
- var isInstance = true;
23
- isInstance = isInstance && "contactName" in value;
24
- isInstance = isInstance && "line1" in value;
25
- isInstance = isInstance && "city" in value;
26
- isInstance = isInstance && "country" in value;
27
- return isInstance;
21
+ if (!('contactName' in value))
22
+ return false;
23
+ if (!('line1' in value))
24
+ return false;
25
+ if (!('city' in value))
26
+ return false;
27
+ if (!('country' in value))
28
+ return false;
29
+ return true;
28
30
  }
29
31
  exports.instanceOfAddress = instanceOfAddress;
30
32
  function AddressFromJSON(json) {
@@ -32,37 +34,34 @@ function AddressFromJSON(json) {
32
34
  }
33
35
  exports.AddressFromJSON = AddressFromJSON;
34
36
  function AddressFromJSONTyped(json, ignoreDiscriminator) {
35
- if ((json === undefined) || (json === null)) {
37
+ if (json == null) {
36
38
  return json;
37
39
  }
38
40
  return {
39
41
  'contactName': json['contactName'],
40
- 'company': !(0, runtime_1.exists)(json, 'company') ? undefined : json['company'],
42
+ 'company': json['company'] == null ? undefined : json['company'],
41
43
  'line1': json['line1'],
42
- 'line2': !(0, runtime_1.exists)(json, 'line2') ? undefined : json['line2'],
44
+ 'line2': json['line2'] == null ? undefined : json['line2'],
43
45
  'city': json['city'],
44
- 'postalCode': !(0, runtime_1.exists)(json, 'postalCode') ? undefined : json['postalCode'],
46
+ 'postalCode': json['postalCode'] == null ? undefined : json['postalCode'],
45
47
  'country': json['country'],
46
- 'state': !(0, runtime_1.exists)(json, 'state') ? undefined : json['state'],
48
+ 'state': json['state'] == null ? undefined : json['state'],
47
49
  };
48
50
  }
49
51
  exports.AddressFromJSONTyped = AddressFromJSONTyped;
50
52
  function AddressToJSON(value) {
51
- if (value === undefined) {
52
- return undefined;
53
- }
54
- if (value === null) {
55
- return null;
53
+ if (value == null) {
54
+ return value;
56
55
  }
57
56
  return {
58
- 'contactName': value.contactName,
59
- 'company': value.company,
60
- 'line1': value.line1,
61
- 'line2': value.line2,
62
- 'city': value.city,
63
- 'postalCode': value.postalCode,
64
- 'country': value.country,
65
- 'state': value.state,
57
+ 'contactName': value['contactName'],
58
+ 'company': value['company'],
59
+ 'line1': value['line1'],
60
+ 'line2': value['line2'],
61
+ 'city': value['city'],
62
+ 'postalCode': value['postalCode'],
63
+ 'country': value['country'],
64
+ 'state': value['state'],
66
65
  };
67
66
  }
68
67
  exports.AddressToJSON = AddressToJSON;
@@ -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,14 +14,13 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ApiErrorToJSON = exports.ApiErrorFromJSONTyped = exports.ApiErrorFromJSON = exports.instanceOfApiError = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the ApiError interface.
20
19
  */
21
20
  function instanceOfApiError(value) {
22
- var isInstance = true;
23
- isInstance = isInstance && "message" in value;
24
- return isInstance;
21
+ if (!('message' in value))
22
+ return false;
23
+ return true;
25
24
  }
26
25
  exports.instanceOfApiError = instanceOfApiError;
27
26
  function ApiErrorFromJSON(json) {
@@ -29,25 +28,22 @@ function ApiErrorFromJSON(json) {
29
28
  }
30
29
  exports.ApiErrorFromJSON = ApiErrorFromJSON;
31
30
  function ApiErrorFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
31
+ if (json == null) {
33
32
  return json;
34
33
  }
35
34
  return {
36
- 'code': !(0, runtime_1.exists)(json, 'code') ? undefined : json['code'],
35
+ 'code': json['code'] == null ? undefined : json['code'],
37
36
  'message': json['message'],
38
37
  };
39
38
  }
40
39
  exports.ApiErrorFromJSONTyped = ApiErrorFromJSONTyped;
41
40
  function ApiErrorToJSON(value) {
42
- if (value === undefined) {
43
- return undefined;
44
- }
45
- if (value === null) {
46
- return null;
41
+ if (value == null) {
42
+ return value;
47
43
  }
48
44
  return {
49
- 'code': value.code,
50
- 'message': value.message,
45
+ 'code': value['code'],
46
+ 'message': value['message'],
51
47
  };
52
48
  }
53
49
  exports.ApiErrorToJSON = ApiErrorToJSON;
@@ -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).
@@ -18,10 +18,11 @@ exports.ConfirmOrderFulfillmentToJSON = exports.ConfirmOrderFulfillmentFromJSONT
18
18
  * Check if a given object implements the ConfirmOrderFulfillment interface.
19
19
  */
20
20
  function instanceOfConfirmOrderFulfillment(value) {
21
- var isInstance = true;
22
- isInstance = isInstance && "fulfillmentId" in value;
23
- isInstance = isInstance && "shippingMethodId" in value;
24
- return isInstance;
21
+ if (!('fulfillmentId' in value))
22
+ return false;
23
+ if (!('shippingMethodId' in value))
24
+ return false;
25
+ return true;
25
26
  }
26
27
  exports.instanceOfConfirmOrderFulfillment = instanceOfConfirmOrderFulfillment;
27
28
  function ConfirmOrderFulfillmentFromJSON(json) {
@@ -29,7 +30,7 @@ function ConfirmOrderFulfillmentFromJSON(json) {
29
30
  }
30
31
  exports.ConfirmOrderFulfillmentFromJSON = ConfirmOrderFulfillmentFromJSON;
31
32
  function ConfirmOrderFulfillmentFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
33
+ if (json == null) {
33
34
  return json;
34
35
  }
35
36
  return {
@@ -39,15 +40,12 @@ function ConfirmOrderFulfillmentFromJSONTyped(json, ignoreDiscriminator) {
39
40
  }
40
41
  exports.ConfirmOrderFulfillmentFromJSONTyped = ConfirmOrderFulfillmentFromJSONTyped;
41
42
  function ConfirmOrderFulfillmentToJSON(value) {
42
- if (value === undefined) {
43
- return undefined;
44
- }
45
- if (value === null) {
46
- return null;
43
+ if (value == null) {
44
+ return value;
47
45
  }
48
46
  return {
49
- 'fulfillmentId': value.fulfillmentId,
50
- 'shippingMethodId': value.shippingMethodId,
47
+ 'fulfillmentId': value['fulfillmentId'],
48
+ 'shippingMethodId': value['shippingMethodId'],
51
49
  };
52
50
  }
53
51
  exports.ConfirmOrderFulfillmentToJSON = ConfirmOrderFulfillmentToJSON;
@@ -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).
@@ -19,9 +19,9 @@ var ConfirmOrderFulfillment_1 = require("./ConfirmOrderFulfillment");
19
19
  * Check if a given object implements the ConfirmOrderRequest interface.
20
20
  */
21
21
  function instanceOfConfirmOrderRequest(value) {
22
- var isInstance = true;
23
- isInstance = isInstance && "fulfillments" in value;
24
- return isInstance;
22
+ if (!('fulfillments' in value))
23
+ return false;
24
+ return true;
25
25
  }
26
26
  exports.instanceOfConfirmOrderRequest = instanceOfConfirmOrderRequest;
27
27
  function ConfirmOrderRequestFromJSON(json) {
@@ -29,7 +29,7 @@ function ConfirmOrderRequestFromJSON(json) {
29
29
  }
30
30
  exports.ConfirmOrderRequestFromJSON = ConfirmOrderRequestFromJSON;
31
31
  function ConfirmOrderRequestFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
32
+ if (json == null) {
33
33
  return json;
34
34
  }
35
35
  return {
@@ -38,14 +38,11 @@ function ConfirmOrderRequestFromJSONTyped(json, ignoreDiscriminator) {
38
38
  }
39
39
  exports.ConfirmOrderRequestFromJSONTyped = ConfirmOrderRequestFromJSONTyped;
40
40
  function ConfirmOrderRequestToJSON(value) {
41
- if (value === undefined) {
42
- return undefined;
43
- }
44
- if (value === null) {
45
- return null;
41
+ if (value == null) {
42
+ return value;
46
43
  }
47
44
  return {
48
- 'fulfillments': (value.fulfillments.map(ConfirmOrderFulfillment_1.ConfirmOrderFulfillmentToJSON)),
45
+ 'fulfillments': (value['fulfillments'].map(ConfirmOrderFulfillment_1.ConfirmOrderFulfillmentToJSON)),
49
46
  };
50
47
  }
51
48
  exports.ConfirmOrderRequestToJSON = ConfirmOrderRequestToJSON;
@@ -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).
@@ -27,10 +27,11 @@ exports.ConfirmOrderValidationErrorCodeEnum = {
27
27
  * Check if a given object implements the ConfirmOrderValidationError interface.
28
28
  */
29
29
  function instanceOfConfirmOrderValidationError(value) {
30
- var isInstance = true;
31
- isInstance = isInstance && "code" in value;
32
- isInstance = isInstance && "message" in value;
33
- return isInstance;
30
+ if (!('code' in value))
31
+ return false;
32
+ if (!('message' in value))
33
+ return false;
34
+ return true;
34
35
  }
35
36
  exports.instanceOfConfirmOrderValidationError = instanceOfConfirmOrderValidationError;
36
37
  function ConfirmOrderValidationErrorFromJSON(json) {
@@ -38,7 +39,7 @@ function ConfirmOrderValidationErrorFromJSON(json) {
38
39
  }
39
40
  exports.ConfirmOrderValidationErrorFromJSON = ConfirmOrderValidationErrorFromJSON;
40
41
  function ConfirmOrderValidationErrorFromJSONTyped(json, ignoreDiscriminator) {
41
- if ((json === undefined) || (json === null)) {
42
+ if (json == null) {
42
43
  return json;
43
44
  }
44
45
  return {
@@ -48,15 +49,12 @@ function ConfirmOrderValidationErrorFromJSONTyped(json, ignoreDiscriminator) {
48
49
  }
49
50
  exports.ConfirmOrderValidationErrorFromJSONTyped = ConfirmOrderValidationErrorFromJSONTyped;
50
51
  function ConfirmOrderValidationErrorToJSON(value) {
51
- if (value === undefined) {
52
- return undefined;
53
- }
54
- if (value === null) {
55
- return null;
52
+ if (value == null) {
53
+ return value;
56
54
  }
57
55
  return {
58
- 'code': value.code,
59
- 'message': value.message,
56
+ 'code': value['code'],
57
+ 'message': value['message'],
60
58
  };
61
59
  }
62
60
  exports.ConfirmOrderValidationErrorToJSON = ConfirmOrderValidationErrorToJSON;
@@ -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).
@@ -26,7 +26,7 @@ export interface ContactInformation {
26
26
  * @type {string}
27
27
  * @memberof ContactInformation
28
28
  */
29
- phone?: string | null;
29
+ phone?: string;
30
30
  }
31
31
  /**
32
32
  * Check if a given object implements the ContactInformation interface.
@@ -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,14 +14,13 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ContactInformationToJSON = exports.ContactInformationFromJSONTyped = exports.ContactInformationFromJSON = exports.instanceOfContactInformation = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the ContactInformation interface.
20
19
  */
21
20
  function instanceOfContactInformation(value) {
22
- var isInstance = true;
23
- isInstance = isInstance && "email" in value;
24
- return isInstance;
21
+ if (!('email' in value))
22
+ return false;
23
+ return true;
25
24
  }
26
25
  exports.instanceOfContactInformation = instanceOfContactInformation;
27
26
  function ContactInformationFromJSON(json) {
@@ -29,25 +28,22 @@ function ContactInformationFromJSON(json) {
29
28
  }
30
29
  exports.ContactInformationFromJSON = ContactInformationFromJSON;
31
30
  function ContactInformationFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
31
+ if (json == null) {
33
32
  return json;
34
33
  }
35
34
  return {
36
35
  'email': json['email'],
37
- 'phone': !(0, runtime_1.exists)(json, 'phone') ? undefined : json['phone'],
36
+ 'phone': json['phone'] == null ? undefined : json['phone'],
38
37
  };
39
38
  }
40
39
  exports.ContactInformationFromJSONTyped = ContactInformationFromJSONTyped;
41
40
  function ContactInformationToJSON(value) {
42
- if (value === undefined) {
43
- return undefined;
44
- }
45
- if (value === null) {
46
- return null;
41
+ if (value == null) {
42
+ return value;
47
43
  }
48
44
  return {
49
- 'email': value.email,
50
- 'phone': value.phone,
45
+ 'email': value['email'],
46
+ 'phone': value['phone'],
51
47
  };
52
48
  }
53
49
  exports.ContactInformationToJSON = ContactInformationToJSON;
@@ -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.DeliveryEstimatesToJSON = exports.DeliveryEstimatesFromJSONTyped = exports.DeliveryEstimatesFromJSON = exports.instanceOfDeliveryEstimates = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the DeliveryEstimates interface.
20
19
  */
21
20
  function instanceOfDeliveryEstimates(value) {
22
- var isInstance = true;
23
- return isInstance;
21
+ return true;
24
22
  }
25
23
  exports.instanceOfDeliveryEstimates = instanceOfDeliveryEstimates;
26
24
  function DeliveryEstimatesFromJSON(json) {
@@ -28,25 +26,22 @@ function DeliveryEstimatesFromJSON(json) {
28
26
  }
29
27
  exports.DeliveryEstimatesFromJSON = DeliveryEstimatesFromJSON;
30
28
  function DeliveryEstimatesFromJSONTyped(json, ignoreDiscriminator) {
31
- if ((json === undefined) || (json === null)) {
29
+ if (json == null) {
32
30
  return json;
33
31
  }
34
32
  return {
35
- 'min': !(0, runtime_1.exists)(json, 'min') ? undefined : (new Date(json['min'])),
36
- 'max': !(0, runtime_1.exists)(json, 'max') ? undefined : (new Date(json['max'])),
33
+ 'min': json['min'] == null ? undefined : (new Date(json['min'])),
34
+ 'max': json['max'] == null ? undefined : (new Date(json['max'])),
37
35
  };
38
36
  }
39
37
  exports.DeliveryEstimatesFromJSONTyped = DeliveryEstimatesFromJSONTyped;
40
38
  function DeliveryEstimatesToJSON(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
- 'min': value.min === undefined ? undefined : (value.min.toISOString()),
49
- 'max': value.max === undefined ? undefined : (value.max.toISOString()),
43
+ 'min': value['min'] == null ? undefined : ((value['min']).toISOString()),
44
+ 'max': value['max'] == null ? undefined : ((value['max']).toISOString()),
50
45
  };
51
46
  }
52
47
  exports.DeliveryEstimatesToJSON = DeliveryEstimatesToJSON;