@teemill/orders 1.6.0 → 1.6.2

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 (103) hide show
  1. package/.openapi-generator/FILES +7 -25
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +3 -3
  4. package/api.ts +1539 -0
  5. package/base.ts +86 -0
  6. package/common.ts +150 -0
  7. package/configuration.ts +110 -0
  8. package/dist/api.d.ts +1116 -0
  9. package/dist/api.js +632 -0
  10. package/dist/base.d.ts +66 -0
  11. package/dist/base.js +65 -0
  12. package/dist/common.d.ts +65 -0
  13. package/dist/common.js +161 -0
  14. package/dist/configuration.d.ts +91 -0
  15. package/dist/configuration.js +43 -0
  16. package/dist/esm/api.d.ts +1116 -0
  17. package/dist/esm/api.js +625 -0
  18. package/dist/esm/base.d.ts +66 -0
  19. package/dist/esm/base.js +60 -0
  20. package/dist/esm/common.d.ts +65 -0
  21. package/dist/esm/common.js +149 -0
  22. package/dist/esm/configuration.d.ts +91 -0
  23. package/dist/esm/configuration.js +39 -0
  24. package/dist/{models/Status.d.ts → esm/index.d.ts} +3 -16
  25. package/dist/esm/index.js +15 -0
  26. package/dist/index.d.ts +13 -3
  27. package/dist/index.js +15 -5
  28. package/git_push.sh +57 -0
  29. package/{src/models/Status.ts → index.ts} +3 -26
  30. package/package.json +18 -4
  31. package/tsconfig.esm.json +7 -0
  32. package/tsconfig.json +4 -6
  33. package/dist/apis/OrdersApi.d.ts +0 -115
  34. package/dist/apis/OrdersApi.js +0 -531
  35. package/dist/apis/index.d.ts +0 -1
  36. package/dist/apis/index.js +0 -19
  37. package/dist/models/Address.d.ts +0 -73
  38. package/dist/models/Address.js +0 -67
  39. package/dist/models/ApiError.d.ts +0 -37
  40. package/dist/models/ApiError.js +0 -49
  41. package/dist/models/ConfirmOrderFulfillment.d.ts +0 -37
  42. package/dist/models/ConfirmOrderFulfillment.js +0 -51
  43. package/dist/models/ConfirmOrderRequest.d.ts +0 -32
  44. package/dist/models/ConfirmOrderRequest.js +0 -48
  45. package/dist/models/ConfirmOrderValidationError.d.ts +0 -47
  46. package/dist/models/ConfirmOrderValidationError.js +0 -60
  47. package/dist/models/ContactInformation.d.ts +0 -37
  48. package/dist/models/ContactInformation.js +0 -49
  49. package/dist/models/DeliveryEstimates.d.ts +0 -37
  50. package/dist/models/DeliveryEstimates.js +0 -47
  51. package/dist/models/ExportOrders202Response.d.ts +0 -31
  52. package/dist/models/ExportOrders202Response.js +0 -45
  53. package/dist/models/Fulfillment.d.ts +0 -71
  54. package/dist/models/Fulfillment.js +0 -61
  55. package/dist/models/FulfillmentItem.d.ts +0 -43
  56. package/dist/models/FulfillmentItem.js +0 -49
  57. package/dist/models/Order.d.ts +0 -135
  58. package/dist/models/Order.js +0 -90
  59. package/dist/models/OrderItem.d.ts +0 -75
  60. package/dist/models/OrderItem.js +0 -61
  61. package/dist/models/OrderItemTaxPrice.d.ts +0 -37
  62. package/dist/models/OrderItemTaxPrice.js +0 -47
  63. package/dist/models/OrderTracking.d.ts +0 -43
  64. package/dist/models/OrderTracking.js +0 -49
  65. package/dist/models/OrdersResponse.d.ts +0 -38
  66. package/dist/models/OrdersResponse.js +0 -48
  67. package/dist/models/Origin.d.ts +0 -37
  68. package/dist/models/Origin.js +0 -47
  69. package/dist/models/Price.d.ts +0 -37
  70. package/dist/models/Price.js +0 -47
  71. package/dist/models/ShippingMethod.d.ts +0 -75
  72. package/dist/models/ShippingMethod.js +0 -61
  73. package/dist/models/Status.js +0 -39
  74. package/dist/models/StatusHistoryItem.d.ts +0 -38
  75. package/dist/models/StatusHistoryItem.js +0 -48
  76. package/dist/models/index.d.ts +0 -20
  77. package/dist/models/index.js +0 -38
  78. package/dist/runtime.d.ts +0 -187
  79. package/dist/runtime.js +0 -565
  80. package/src/apis/OrdersApi.ts +0 -511
  81. package/src/apis/index.ts +0 -3
  82. package/src/index.ts +0 -5
  83. package/src/models/Address.ts +0 -120
  84. package/src/models/ApiError.ts +0 -69
  85. package/src/models/ConfirmOrderFulfillment.ts +0 -70
  86. package/src/models/ConfirmOrderRequest.ts +0 -68
  87. package/src/models/ConfirmOrderValidationError.ts +0 -83
  88. package/src/models/ContactInformation.ts +0 -69
  89. package/src/models/DeliveryEstimates.ts +0 -68
  90. package/src/models/ExportOrders202Response.ts +0 -60
  91. package/src/models/Fulfillment.ts +0 -133
  92. package/src/models/FulfillmentItem.ts +0 -76
  93. package/src/models/Order.ts +0 -239
  94. package/src/models/OrderItem.ts +0 -127
  95. package/src/models/OrderItemTaxPrice.ts +0 -68
  96. package/src/models/OrderTracking.ts +0 -76
  97. package/src/models/OrdersResponse.ts +0 -75
  98. package/src/models/Origin.ts +0 -68
  99. package/src/models/Price.ts +0 -68
  100. package/src/models/ShippingMethod.ts +0 -129
  101. package/src/models/StatusHistoryItem.ts +0 -75
  102. package/src/models/index.ts +0 -22
  103. package/src/runtime.ts +0 -441
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Orders API
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
- *
8
- * The version of the OpenAPI document: 1.6.0
9
- * Contact: hello@teemill.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.ExportOrders202ResponseToJSON = exports.ExportOrders202ResponseFromJSONTyped = exports.ExportOrders202ResponseFromJSON = exports.instanceOfExportOrders202Response = void 0;
17
- /**
18
- * Check if a given object implements the ExportOrders202Response interface.
19
- */
20
- function instanceOfExportOrders202Response(value) {
21
- return true;
22
- }
23
- exports.instanceOfExportOrders202Response = instanceOfExportOrders202Response;
24
- function ExportOrders202ResponseFromJSON(json) {
25
- return ExportOrders202ResponseFromJSONTyped(json, false);
26
- }
27
- exports.ExportOrders202ResponseFromJSON = ExportOrders202ResponseFromJSON;
28
- function ExportOrders202ResponseFromJSONTyped(json, ignoreDiscriminator) {
29
- if (json == null) {
30
- return json;
31
- }
32
- return {
33
- 'message': json['message'] == null ? undefined : json['message'],
34
- };
35
- }
36
- exports.ExportOrders202ResponseFromJSONTyped = ExportOrders202ResponseFromJSONTyped;
37
- function ExportOrders202ResponseToJSON(value) {
38
- if (value == null) {
39
- return value;
40
- }
41
- return {
42
- 'message': value['message'],
43
- };
44
- }
45
- exports.ExportOrders202ResponseToJSON = ExportOrders202ResponseToJSON;
@@ -1,71 +0,0 @@
1
- /**
2
- * Orders API
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
- *
5
- * The version of the OpenAPI document: 1.6.0
6
- * Contact: hello@teemill.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { FulfillmentItem } from './FulfillmentItem';
13
- import type { OrderTracking } from './OrderTracking';
14
- import type { ShippingMethod } from './ShippingMethod';
15
- import type { Status } from './Status';
16
- /**
17
- *
18
- * @export
19
- * @interface Fulfillment
20
- */
21
- export interface Fulfillment {
22
- /**
23
- * Unique fulfillment id
24
- * @type {string}
25
- * @memberof Fulfillment
26
- */
27
- id?: string;
28
- /**
29
- *
30
- * @type {Status}
31
- * @memberof Fulfillment
32
- */
33
- status?: Status;
34
- /**
35
- *
36
- * @type {Array<FulfillmentItem>}
37
- * @memberof Fulfillment
38
- */
39
- items?: Array<FulfillmentItem>;
40
- /**
41
- *
42
- * @type {OrderTracking}
43
- * @memberof Fulfillment
44
- */
45
- tracking?: OrderTracking;
46
- /**
47
- * Shipping method currently set
48
- * @type {ShippingMethod}
49
- * @memberof Fulfillment
50
- */
51
- shippingMethod?: ShippingMethod;
52
- /**
53
- * Shipping methods available for this fulfillment. One of these should be used to confirm the fulfillment.
54
- * @type {Array<ShippingMethod>}
55
- * @memberof Fulfillment
56
- */
57
- availableShippingMethods?: Array<ShippingMethod>;
58
- /**
59
- * Weight of the package being shipped in grams
60
- * @type {number}
61
- * @memberof Fulfillment
62
- */
63
- packageWeight?: number;
64
- }
65
- /**
66
- * Check if a given object implements the Fulfillment interface.
67
- */
68
- export declare function instanceOfFulfillment(value: object): boolean;
69
- export declare function FulfillmentFromJSON(json: any): Fulfillment;
70
- export declare function FulfillmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): Fulfillment;
71
- export declare function FulfillmentToJSON(value?: Fulfillment | null): any;
@@ -1,61 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Orders API
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
- *
8
- * The version of the OpenAPI document: 1.6.0
9
- * Contact: hello@teemill.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.FulfillmentToJSON = exports.FulfillmentFromJSONTyped = exports.FulfillmentFromJSON = exports.instanceOfFulfillment = void 0;
17
- var FulfillmentItem_1 = require("./FulfillmentItem");
18
- var OrderTracking_1 = require("./OrderTracking");
19
- var ShippingMethod_1 = require("./ShippingMethod");
20
- var Status_1 = require("./Status");
21
- /**
22
- * Check if a given object implements the Fulfillment interface.
23
- */
24
- function instanceOfFulfillment(value) {
25
- return true;
26
- }
27
- exports.instanceOfFulfillment = instanceOfFulfillment;
28
- function FulfillmentFromJSON(json) {
29
- return FulfillmentFromJSONTyped(json, false);
30
- }
31
- exports.FulfillmentFromJSON = FulfillmentFromJSON;
32
- function FulfillmentFromJSONTyped(json, ignoreDiscriminator) {
33
- if (json == null) {
34
- return json;
35
- }
36
- return {
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'],
44
- };
45
- }
46
- exports.FulfillmentFromJSONTyped = FulfillmentFromJSONTyped;
47
- function FulfillmentToJSON(value) {
48
- if (value == null) {
49
- return value;
50
- }
51
- return {
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'],
59
- };
60
- }
61
- exports.FulfillmentToJSON = FulfillmentToJSON;
@@ -1,43 +0,0 @@
1
- /**
2
- * Orders API
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
- *
5
- * The version of the OpenAPI document: 1.6.0
6
- * Contact: hello@teemill.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- /**
13
- *
14
- * @export
15
- * @interface FulfillmentItem
16
- */
17
- export interface FulfillmentItem {
18
- /**
19
- * Unique fulfillment item id
20
- * @type {string}
21
- * @memberof FulfillmentItem
22
- */
23
- id?: string;
24
- /**
25
- * Id of the order item being fulfilled
26
- * @type {string}
27
- * @memberof FulfillmentItem
28
- */
29
- itemId?: string;
30
- /**
31
- * Number of this item being fulfilled
32
- * @type {number}
33
- * @memberof FulfillmentItem
34
- */
35
- quantity?: number;
36
- }
37
- /**
38
- * Check if a given object implements the FulfillmentItem interface.
39
- */
40
- export declare function instanceOfFulfillmentItem(value: object): boolean;
41
- export declare function FulfillmentItemFromJSON(json: any): FulfillmentItem;
42
- export declare function FulfillmentItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): FulfillmentItem;
43
- export declare function FulfillmentItemToJSON(value?: FulfillmentItem | null): any;
@@ -1,49 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Orders API
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
- *
8
- * The version of the OpenAPI document: 1.6.0
9
- * Contact: hello@teemill.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.FulfillmentItemToJSON = exports.FulfillmentItemFromJSONTyped = exports.FulfillmentItemFromJSON = exports.instanceOfFulfillmentItem = void 0;
17
- /**
18
- * Check if a given object implements the FulfillmentItem interface.
19
- */
20
- function instanceOfFulfillmentItem(value) {
21
- return true;
22
- }
23
- exports.instanceOfFulfillmentItem = instanceOfFulfillmentItem;
24
- function FulfillmentItemFromJSON(json) {
25
- return FulfillmentItemFromJSONTyped(json, false);
26
- }
27
- exports.FulfillmentItemFromJSON = FulfillmentItemFromJSON;
28
- function FulfillmentItemFromJSONTyped(json, ignoreDiscriminator) {
29
- if (json == null) {
30
- return json;
31
- }
32
- return {
33
- 'id': json['id'] == null ? undefined : json['id'],
34
- 'itemId': json['itemId'] == null ? undefined : json['itemId'],
35
- 'quantity': json['quantity'] == null ? undefined : json['quantity'],
36
- };
37
- }
38
- exports.FulfillmentItemFromJSONTyped = FulfillmentItemFromJSONTyped;
39
- function FulfillmentItemToJSON(value) {
40
- if (value == null) {
41
- return value;
42
- }
43
- return {
44
- 'id': value['id'],
45
- 'itemId': value['itemId'],
46
- 'quantity': value['quantity'],
47
- };
48
- }
49
- exports.FulfillmentItemToJSON = FulfillmentItemToJSON;
@@ -1,135 +0,0 @@
1
- /**
2
- * Orders API
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
- *
5
- * The version of the OpenAPI document: 1.6.0
6
- * Contact: hello@teemill.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { Address } from './Address';
13
- import type { ContactInformation } from './ContactInformation';
14
- import type { Fulfillment } from './Fulfillment';
15
- import type { OrderItem } from './OrderItem';
16
- import type { Origin } from './Origin';
17
- import type { Price } from './Price';
18
- import type { Status } from './Status';
19
- import type { StatusHistoryItem } from './StatusHistoryItem';
20
- /**
21
- *
22
- * @export
23
- * @interface Order
24
- */
25
- export interface Order {
26
- /**
27
- * Unique object identifier
28
- * @type {string}
29
- * @memberof Order
30
- */
31
- id?: string;
32
- /**
33
- * A reference to the resource location
34
- * @type {string}
35
- * @memberof Order
36
- */
37
- ref?: string;
38
- /**
39
- *
40
- * @type {Status}
41
- * @memberof Order
42
- */
43
- status?: Status;
44
- /**
45
- *
46
- * @type {ContactInformation}
47
- * @memberof Order
48
- */
49
- contactInformation: ContactInformation;
50
- /**
51
- *
52
- * @type {Address}
53
- * @memberof Order
54
- */
55
- shippingAddress: Address;
56
- /**
57
- * ISO 8601 Timestamp
58
- * @type {Date}
59
- * @memberof Order
60
- */
61
- createdAt?: Date;
62
- /**
63
- * ISO 8601 Timestamp
64
- * @type {Date}
65
- * @memberof Order
66
- */
67
- updatedAt?: Date;
68
- /**
69
- * A custom reference to the merchant's order that will be displayed on the shipping label.
70
- * @type {string}
71
- * @memberof Order
72
- */
73
- merchantReference?: string;
74
- /**
75
- *
76
- * @type {Array<Fulfillment>}
77
- * @memberof Order
78
- */
79
- readonly fulfillments?: Array<Fulfillment>;
80
- /**
81
- *
82
- * @type {Array<OrderItem>}
83
- * @memberof Order
84
- */
85
- items: Array<OrderItem>;
86
- /**
87
- *
88
- * @type {Price}
89
- * @memberof Order
90
- */
91
- totalPrice?: Price;
92
- /**
93
- *
94
- * @type {Price}
95
- * @memberof Order
96
- */
97
- taxPrice?: Price;
98
- /**
99
- *
100
- * @type {Price}
101
- * @memberof Order
102
- */
103
- subtotalPrice?: Price;
104
- /**
105
- *
106
- * @type {Price}
107
- * @memberof Order
108
- */
109
- discountPrice?: Price;
110
- /**
111
- *
112
- * @type {Price}
113
- * @memberof Order
114
- */
115
- shippingPrice?: Price;
116
- /**
117
- *
118
- * @type {Origin}
119
- * @memberof Order
120
- */
121
- origin?: Origin;
122
- /**
123
- *
124
- * @type {Array<StatusHistoryItem>}
125
- * @memberof Order
126
- */
127
- statusHistory?: Array<StatusHistoryItem>;
128
- }
129
- /**
130
- * Check if a given object implements the Order interface.
131
- */
132
- export declare function instanceOfOrder(value: object): boolean;
133
- export declare function OrderFromJSON(json: any): Order;
134
- export declare function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Order;
135
- export declare function OrderToJSON(value?: Order | null): any;
@@ -1,90 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Orders API
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
- *
8
- * The version of the OpenAPI document: 1.6.0
9
- * Contact: hello@teemill.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.OrderToJSON = exports.OrderFromJSONTyped = exports.OrderFromJSON = exports.instanceOfOrder = void 0;
17
- var Address_1 = require("./Address");
18
- var ContactInformation_1 = require("./ContactInformation");
19
- var Fulfillment_1 = require("./Fulfillment");
20
- var OrderItem_1 = require("./OrderItem");
21
- var Origin_1 = require("./Origin");
22
- var Price_1 = require("./Price");
23
- var Status_1 = require("./Status");
24
- var StatusHistoryItem_1 = require("./StatusHistoryItem");
25
- /**
26
- * Check if a given object implements the Order interface.
27
- */
28
- function instanceOfOrder(value) {
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;
36
- }
37
- exports.instanceOfOrder = instanceOfOrder;
38
- function OrderFromJSON(json) {
39
- return OrderFromJSONTyped(json, false);
40
- }
41
- exports.OrderFromJSON = OrderFromJSON;
42
- function OrderFromJSONTyped(json, ignoreDiscriminator) {
43
- if (json == null) {
44
- return json;
45
- }
46
- return {
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']),
50
- 'contactInformation': (0, ContactInformation_1.ContactInformationFromJSON)(json['contactInformation']),
51
- 'shippingAddress': (0, Address_1.AddressFromJSON)(json['shippingAddress']),
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)),
56
- 'items': (json['items'].map(OrderItem_1.OrderItemFromJSON)),
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)),
64
- };
65
- }
66
- exports.OrderFromJSONTyped = OrderFromJSONTyped;
67
- function OrderToJSON(value) {
68
- if (value == null) {
69
- return value;
70
- }
71
- return {
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)),
88
- };
89
- }
90
- exports.OrderToJSON = OrderToJSON;
@@ -1,75 +0,0 @@
1
- /**
2
- * Orders API
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
- *
5
- * The version of the OpenAPI document: 1.6.0
6
- * Contact: hello@teemill.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { OrderItemTaxPrice } from './OrderItemTaxPrice';
13
- import type { Price } from './Price';
14
- /**
15
- *
16
- * @export
17
- * @interface OrderItem
18
- */
19
- export interface OrderItem {
20
- /**
21
- * Unique object identifier
22
- * @type {string}
23
- * @memberof OrderItem
24
- */
25
- readonly id?: string;
26
- /**
27
- * Reference URL to the order item variant
28
- * @type {string}
29
- * @memberof OrderItem
30
- */
31
- variantRef: string;
32
- /**
33
- *
34
- * @type {number}
35
- * @memberof OrderItem
36
- */
37
- quantity: number;
38
- /**
39
- *
40
- * @type {Price}
41
- * @memberof OrderItem
42
- */
43
- readonly totalPrice?: Price;
44
- /**
45
- *
46
- * @type {OrderItemTaxPrice}
47
- * @memberof OrderItem
48
- */
49
- taxPrice?: OrderItemTaxPrice;
50
- /**
51
- *
52
- * @type {Price}
53
- * @memberof OrderItem
54
- */
55
- readonly subtotalPrice?: Price;
56
- /**
57
- *
58
- * @type {Price}
59
- * @memberof OrderItem
60
- */
61
- readonly discountPrice?: Price;
62
- /**
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
- * @type {Price}
65
- * @memberof OrderItem
66
- */
67
- recipientCost?: Price;
68
- }
69
- /**
70
- * Check if a given object implements the OrderItem interface.
71
- */
72
- export declare function instanceOfOrderItem(value: object): boolean;
73
- export declare function OrderItemFromJSON(json: any): OrderItem;
74
- export declare function OrderItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderItem;
75
- export declare function OrderItemToJSON(value?: OrderItem | null): any;
@@ -1,61 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Orders API
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
- *
8
- * The version of the OpenAPI document: 1.6.0
9
- * Contact: hello@teemill.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.OrderItemToJSON = exports.OrderItemFromJSONTyped = exports.OrderItemFromJSON = exports.instanceOfOrderItem = void 0;
17
- var OrderItemTaxPrice_1 = require("./OrderItemTaxPrice");
18
- var Price_1 = require("./Price");
19
- /**
20
- * Check if a given object implements the OrderItem interface.
21
- */
22
- function instanceOfOrderItem(value) {
23
- if (!('variantRef' in value))
24
- return false;
25
- if (!('quantity' in value))
26
- return false;
27
- return true;
28
- }
29
- exports.instanceOfOrderItem = instanceOfOrderItem;
30
- function OrderItemFromJSON(json) {
31
- return OrderItemFromJSONTyped(json, false);
32
- }
33
- exports.OrderItemFromJSON = OrderItemFromJSON;
34
- function OrderItemFromJSONTyped(json, ignoreDiscriminator) {
35
- if (json == null) {
36
- return json;
37
- }
38
- return {
39
- 'id': json['id'] == null ? undefined : json['id'],
40
- 'variantRef': json['variantRef'],
41
- 'quantity': json['quantity'],
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
- };
48
- }
49
- exports.OrderItemFromJSONTyped = OrderItemFromJSONTyped;
50
- function OrderItemToJSON(value) {
51
- if (value == null) {
52
- return value;
53
- }
54
- return {
55
- 'variantRef': value['variantRef'],
56
- 'quantity': value['quantity'],
57
- 'taxPrice': (0, OrderItemTaxPrice_1.OrderItemTaxPriceToJSON)(value['taxPrice']),
58
- 'recipientCost': (0, Price_1.PriceToJSON)(value['recipientCost']),
59
- };
60
- }
61
- exports.OrderItemToJSON = OrderItemToJSON;
@@ -1,37 +0,0 @@
1
- /**
2
- * Orders API
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
- *
5
- * The version of the OpenAPI document: 1.6.0
6
- * Contact: hello@teemill.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- /**
13
- * This is an estimate until the order has been confirmed
14
- * @export
15
- * @interface OrderItemTaxPrice
16
- */
17
- export interface OrderItemTaxPrice {
18
- /**
19
- * Price including tax in the specified currency.
20
- * @type {string}
21
- * @memberof OrderItemTaxPrice
22
- */
23
- amount?: string;
24
- /**
25
- * Currency code for the currency the price is valued in.
26
- * @type {string}
27
- * @memberof OrderItemTaxPrice
28
- */
29
- currencyCode?: string;
30
- }
31
- /**
32
- * Check if a given object implements the OrderItemTaxPrice interface.
33
- */
34
- export declare function instanceOfOrderItemTaxPrice(value: object): boolean;
35
- export declare function OrderItemTaxPriceFromJSON(json: any): OrderItemTaxPrice;
36
- export declare function OrderItemTaxPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderItemTaxPrice;
37
- export declare function OrderItemTaxPriceToJSON(value?: OrderItemTaxPrice | null): any;