@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.
- package/.openapi-generator/VERSION +1 -1
- package/README.md +2 -2
- package/dist/apis/OrdersApi.d.ts +16 -1
- package/dist/apis/OrdersApi.js +68 -1
- package/dist/models/Address.d.ts +1 -1
- package/dist/models/Address.js +25 -26
- package/dist/models/ApiError.d.ts +1 -1
- package/dist/models/ApiError.js +10 -14
- package/dist/models/ConfirmOrderFulfillment.d.ts +1 -1
- package/dist/models/ConfirmOrderFulfillment.js +11 -13
- package/dist/models/ConfirmOrderRequest.d.ts +1 -1
- package/dist/models/ConfirmOrderRequest.js +8 -11
- package/dist/models/ConfirmOrderValidationError.d.ts +1 -1
- package/dist/models/ConfirmOrderValidationError.js +11 -13
- package/dist/models/ContactInformation.d.ts +2 -2
- package/dist/models/ContactInformation.js +10 -14
- package/dist/models/DeliveryEstimates.d.ts +1 -1
- package/dist/models/DeliveryEstimates.js +9 -14
- package/dist/models/ExportOrders202Response.d.ts +1 -1
- package/dist/models/ExportOrders202Response.js +7 -12
- package/dist/models/Fulfillment.d.ts +4 -4
- package/dist/models/Fulfillment.js +19 -24
- package/dist/models/FulfillmentItem.d.ts +3 -3
- package/dist/models/FulfillmentItem.js +11 -16
- package/dist/models/Order.d.ts +2 -2
- package/dist/models/Order.js +41 -43
- package/dist/models/OrderItem.d.ts +3 -3
- package/dist/models/OrderItem.js +19 -22
- package/dist/models/OrderItemTaxPrice.d.ts +1 -1
- package/dist/models/OrderItemTaxPrice.js +9 -14
- package/dist/models/OrderTracking.d.ts +1 -1
- package/dist/models/OrderTracking.js +11 -16
- package/dist/models/OrdersResponse.d.ts +1 -1
- package/dist/models/OrdersResponse.js +9 -14
- package/dist/models/Origin.d.ts +1 -1
- package/dist/models/Origin.js +9 -14
- package/dist/models/Price.d.ts +1 -1
- package/dist/models/Price.js +9 -14
- package/dist/models/ShippingMethod.d.ts +1 -1
- package/dist/models/ShippingMethod.js +21 -26
- package/dist/models/Status.d.ts +1 -1
- package/dist/models/Status.js +1 -1
- package/dist/models/StatusHistoryItem.d.ts +1 -1
- package/dist/models/StatusHistoryItem.js +9 -14
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/package.json +1 -1
- package/src/apis/OrdersApi.ts +69 -1
- package/src/models/Address.ts +22 -27
- package/src/models/ApiError.ts +10 -15
- package/src/models/ConfirmOrderFulfillment.ts +10 -15
- package/src/models/ConfirmOrderRequest.ts +8 -13
- package/src/models/ConfirmOrderValidationError.ts +10 -15
- package/src/models/ContactInformation.ts +11 -16
- package/src/models/DeliveryEstimates.ts +10 -15
- package/src/models/ExportOrders202Response.ts +8 -13
- package/src/models/Fulfillment.ts +23 -28
- package/src/models/FulfillmentItem.ts +14 -19
- package/src/models/Order.ts +40 -45
- package/src/models/OrderItem.ts +20 -25
- package/src/models/OrderItemTaxPrice.ts +10 -15
- package/src/models/OrderTracking.ts +12 -17
- package/src/models/OrdersResponse.ts +10 -15
- package/src/models/Origin.ts +10 -15
- package/src/models/Price.ts +10 -15
- package/src/models/ShippingMethod.ts +22 -27
- package/src/models/Status.ts +1 -1
- package/src/models/StatusHistoryItem.ts +10 -15
- 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
|
+
* 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.
|
|
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
|
-
|
|
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 (
|
|
29
|
+
if (json == null) {
|
|
32
30
|
return json;
|
|
33
31
|
}
|
|
34
32
|
return {
|
|
35
|
-
'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
|
|
41
|
-
return
|
|
42
|
-
}
|
|
43
|
-
if (value === null) {
|
|
44
|
-
return null;
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
45
40
|
}
|
|
46
41
|
return {
|
|
47
|
-
'message': value
|
|
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
|
+
* 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
|
|
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
|
|
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.
|
|
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
|
-
|
|
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 (
|
|
33
|
+
if (json == null) {
|
|
36
34
|
return json;
|
|
37
35
|
}
|
|
38
36
|
return {
|
|
39
|
-
'id':
|
|
40
|
-
'status':
|
|
41
|
-
'items':
|
|
42
|
-
'tracking':
|
|
43
|
-
'shippingMethod':
|
|
44
|
-
'availableShippingMethods':
|
|
45
|
-
'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
|
|
51
|
-
return
|
|
52
|
-
}
|
|
53
|
-
if (value === null) {
|
|
54
|
-
return null;
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
55
50
|
}
|
|
56
51
|
return {
|
|
57
|
-
'id': value
|
|
58
|
-
'status': (0, Status_1.StatusToJSON)(value
|
|
59
|
-
'items': value
|
|
60
|
-
'tracking': (0, OrderTracking_1.OrderTrackingToJSON)(value
|
|
61
|
-
'shippingMethod': (0, ShippingMethod_1.ShippingMethodToJSON)(value
|
|
62
|
-
'availableShippingMethods': value
|
|
63
|
-
'packageWeight': value
|
|
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
|
+
* 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
|
|
19
|
+
* Unique fulfillment item id
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof FulfillmentItem
|
|
22
22
|
*/
|
|
23
23
|
id?: string;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
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.
|
|
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
|
-
|
|
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 (
|
|
29
|
+
if (json == null) {
|
|
32
30
|
return json;
|
|
33
31
|
}
|
|
34
32
|
return {
|
|
35
|
-
'id':
|
|
36
|
-
'itemId':
|
|
37
|
-
'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
|
|
43
|
-
return
|
|
44
|
-
}
|
|
45
|
-
if (value === null) {
|
|
46
|
-
return null;
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
47
42
|
}
|
|
48
43
|
return {
|
|
49
|
-
'id': value
|
|
50
|
-
'itemId': value
|
|
51
|
-
'quantity': value
|
|
44
|
+
'id': value['id'],
|
|
45
|
+
'itemId': value['itemId'],
|
|
46
|
+
'quantity': value['quantity'],
|
|
52
47
|
};
|
|
53
48
|
}
|
|
54
49
|
exports.FulfillmentItemToJSON = FulfillmentItemToJSON;
|
package/dist/models/Order.d.ts
CHANGED
|
@@ -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
|
+
* 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
|
|
73
|
+
merchantReference?: string;
|
|
74
74
|
/**
|
|
75
75
|
*
|
|
76
76
|
* @type {Array<Fulfillment>}
|
package/dist/models/Order.js
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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 (
|
|
43
|
+
if (json == null) {
|
|
43
44
|
return json;
|
|
44
45
|
}
|
|
45
46
|
return {
|
|
46
|
-
'id':
|
|
47
|
-
'ref':
|
|
48
|
-
'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':
|
|
52
|
-
'updatedAt':
|
|
53
|
-
'merchantReference':
|
|
54
|
-
'fulfillments':
|
|
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':
|
|
57
|
-
'taxPrice':
|
|
58
|
-
'subtotalPrice':
|
|
59
|
-
'discountPrice':
|
|
60
|
-
'shippingPrice':
|
|
61
|
-
'origin':
|
|
62
|
-
'statusHistory':
|
|
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
|
|
68
|
-
return
|
|
69
|
-
}
|
|
70
|
-
if (value === null) {
|
|
71
|
-
return null;
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
72
70
|
}
|
|
73
71
|
return {
|
|
74
|
-
'id': value
|
|
75
|
-
'ref': value
|
|
76
|
-
'status': (0, Status_1.StatusToJSON)(value
|
|
77
|
-
'contactInformation': (0, ContactInformation_1.ContactInformationToJSON)(value
|
|
78
|
-
'shippingAddress': (0, Address_1.AddressToJSON)(value
|
|
79
|
-
'createdAt': value
|
|
80
|
-
'updatedAt': value
|
|
81
|
-
'merchantReference': value
|
|
82
|
-
'items': (value
|
|
83
|
-
'totalPrice': (0, Price_1.PriceToJSON)(value
|
|
84
|
-
'taxPrice': (0, Price_1.PriceToJSON)(value
|
|
85
|
-
'subtotalPrice': (0, Price_1.PriceToJSON)(value
|
|
86
|
-
'discountPrice': (0, Price_1.PriceToJSON)(value
|
|
87
|
-
'shippingPrice': (0, Price_1.PriceToJSON)(value
|
|
88
|
-
'origin': (0, Origin_1.OriginToJSON)(value
|
|
89
|
-
'statusHistory': value
|
|
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
|
+
* 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
|
-
*
|
|
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
|
*/
|
package/dist/models/OrderItem.js
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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 (
|
|
35
|
+
if (json == null) {
|
|
36
36
|
return json;
|
|
37
37
|
}
|
|
38
38
|
return {
|
|
39
|
-
'id':
|
|
39
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
40
40
|
'variantRef': json['variantRef'],
|
|
41
41
|
'quantity': json['quantity'],
|
|
42
|
-
'totalPrice':
|
|
43
|
-
'taxPrice':
|
|
44
|
-
'subtotalPrice':
|
|
45
|
-
'discountPrice':
|
|
46
|
-
'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
|
|
52
|
-
return
|
|
53
|
-
}
|
|
54
|
-
if (value === null) {
|
|
55
|
-
return null;
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return value;
|
|
56
53
|
}
|
|
57
54
|
return {
|
|
58
|
-
'variantRef': value
|
|
59
|
-
'quantity': value
|
|
60
|
-
'taxPrice': (0, OrderItemTaxPrice_1.OrderItemTaxPriceToJSON)(value
|
|
61
|
-
'recipientCost': (0, Price_1.PriceToJSON)(value
|
|
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
|
+
* 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.
|
|
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
|
-
|
|
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 (
|
|
29
|
+
if (json == null) {
|
|
32
30
|
return json;
|
|
33
31
|
}
|
|
34
32
|
return {
|
|
35
|
-
'amount':
|
|
36
|
-
'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
|
|
42
|
-
return
|
|
43
|
-
}
|
|
44
|
-
if (value === null) {
|
|
45
|
-
return null;
|
|
39
|
+
if (value == null) {
|
|
40
|
+
return value;
|
|
46
41
|
}
|
|
47
42
|
return {
|
|
48
|
-
'amount': value
|
|
49
|
-
'currencyCode': value
|
|
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
|
+
* 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).
|