@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
|
@@ -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.OrderTrackingToJSON = exports.OrderTrackingFromJSONTyped = exports.OrderTrackingFromJSON = exports.instanceOfOrderTracking = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
17
|
/**
|
|
19
18
|
* Check if a given object implements the OrderTracking interface.
|
|
20
19
|
*/
|
|
21
20
|
function instanceOfOrderTracking(value) {
|
|
22
|
-
|
|
23
|
-
return isInstance;
|
|
21
|
+
return true;
|
|
24
22
|
}
|
|
25
23
|
exports.instanceOfOrderTracking = instanceOfOrderTracking;
|
|
26
24
|
function OrderTrackingFromJSON(json) {
|
|
@@ -28,27 +26,24 @@ function OrderTrackingFromJSON(json) {
|
|
|
28
26
|
}
|
|
29
27
|
exports.OrderTrackingFromJSON = OrderTrackingFromJSON;
|
|
30
28
|
function OrderTrackingFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
-
if (
|
|
29
|
+
if (json == null) {
|
|
32
30
|
return json;
|
|
33
31
|
}
|
|
34
32
|
return {
|
|
35
|
-
'courier':
|
|
36
|
-
'code':
|
|
37
|
-
'url':
|
|
33
|
+
'courier': json['courier'] == null ? undefined : json['courier'],
|
|
34
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
35
|
+
'url': json['url'] == null ? undefined : json['url'],
|
|
38
36
|
};
|
|
39
37
|
}
|
|
40
38
|
exports.OrderTrackingFromJSONTyped = OrderTrackingFromJSONTyped;
|
|
41
39
|
function OrderTrackingToJSON(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
|
-
'courier': value
|
|
50
|
-
'code': value
|
|
51
|
-
'url': value
|
|
44
|
+
'courier': value['courier'],
|
|
45
|
+
'code': value['code'],
|
|
46
|
+
'url': value['url'],
|
|
52
47
|
};
|
|
53
48
|
}
|
|
54
49
|
exports.OrderTrackingToJSON = OrderTrackingToJSON;
|
|
@@ -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,14 +14,12 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.OrdersResponseToJSON = exports.OrdersResponseFromJSONTyped = exports.OrdersResponseFromJSON = exports.instanceOfOrdersResponse = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
17
|
var Order_1 = require("./Order");
|
|
19
18
|
/**
|
|
20
19
|
* Check if a given object implements the OrdersResponse interface.
|
|
21
20
|
*/
|
|
22
21
|
function instanceOfOrdersResponse(value) {
|
|
23
|
-
|
|
24
|
-
return isInstance;
|
|
22
|
+
return true;
|
|
25
23
|
}
|
|
26
24
|
exports.instanceOfOrdersResponse = instanceOfOrdersResponse;
|
|
27
25
|
function OrdersResponseFromJSON(json) {
|
|
@@ -29,25 +27,22 @@ function OrdersResponseFromJSON(json) {
|
|
|
29
27
|
}
|
|
30
28
|
exports.OrdersResponseFromJSON = OrdersResponseFromJSON;
|
|
31
29
|
function OrdersResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
-
if (
|
|
30
|
+
if (json == null) {
|
|
33
31
|
return json;
|
|
34
32
|
}
|
|
35
33
|
return {
|
|
36
|
-
'orders':
|
|
37
|
-
'nextPageToken':
|
|
34
|
+
'orders': json['orders'] == null ? undefined : (json['orders'].map(Order_1.OrderFromJSON)),
|
|
35
|
+
'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
|
|
38
36
|
};
|
|
39
37
|
}
|
|
40
38
|
exports.OrdersResponseFromJSONTyped = OrdersResponseFromJSONTyped;
|
|
41
39
|
function OrdersResponseToJSON(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
|
-
'orders': value
|
|
50
|
-
'nextPageToken': value
|
|
44
|
+
'orders': value['orders'] == null ? undefined : (value['orders'].map(Order_1.OrderToJSON)),
|
|
45
|
+
'nextPageToken': value['nextPageToken'],
|
|
51
46
|
};
|
|
52
47
|
}
|
|
53
48
|
exports.OrdersResponseToJSON = OrdersResponseToJSON;
|
package/dist/models/Origin.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).
|
package/dist/models/Origin.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,13 +14,11 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.OriginToJSON = exports.OriginFromJSONTyped = exports.OriginFromJSON = exports.instanceOfOrigin = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
17
|
/**
|
|
19
18
|
* Check if a given object implements the Origin interface.
|
|
20
19
|
*/
|
|
21
20
|
function instanceOfOrigin(value) {
|
|
22
|
-
|
|
23
|
-
return isInstance;
|
|
21
|
+
return true;
|
|
24
22
|
}
|
|
25
23
|
exports.instanceOfOrigin = instanceOfOrigin;
|
|
26
24
|
function OriginFromJSON(json) {
|
|
@@ -28,25 +26,22 @@ function OriginFromJSON(json) {
|
|
|
28
26
|
}
|
|
29
27
|
exports.OriginFromJSON = OriginFromJSON;
|
|
30
28
|
function OriginFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
-
if (
|
|
29
|
+
if (json == null) {
|
|
32
30
|
return json;
|
|
33
31
|
}
|
|
34
32
|
return {
|
|
35
|
-
'code':
|
|
36
|
-
'isPaid':
|
|
33
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
34
|
+
'isPaid': json['isPaid'] == null ? undefined : json['isPaid'],
|
|
37
35
|
};
|
|
38
36
|
}
|
|
39
37
|
exports.OriginFromJSONTyped = OriginFromJSONTyped;
|
|
40
38
|
function OriginToJSON(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
|
-
'code': value
|
|
49
|
-
'isPaid': value
|
|
43
|
+
'code': value['code'],
|
|
44
|
+
'isPaid': value['isPaid'],
|
|
50
45
|
};
|
|
51
46
|
}
|
|
52
47
|
exports.OriginToJSON = OriginToJSON;
|
package/dist/models/Price.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).
|
package/dist/models/Price.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,13 +14,11 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.PriceToJSON = exports.PriceFromJSONTyped = exports.PriceFromJSON = exports.instanceOfPrice = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
17
|
/**
|
|
19
18
|
* Check if a given object implements the Price interface.
|
|
20
19
|
*/
|
|
21
20
|
function instanceOfPrice(value) {
|
|
22
|
-
|
|
23
|
-
return isInstance;
|
|
21
|
+
return true;
|
|
24
22
|
}
|
|
25
23
|
exports.instanceOfPrice = instanceOfPrice;
|
|
26
24
|
function PriceFromJSON(json) {
|
|
@@ -28,25 +26,22 @@ function PriceFromJSON(json) {
|
|
|
28
26
|
}
|
|
29
27
|
exports.PriceFromJSON = PriceFromJSON;
|
|
30
28
|
function PriceFromJSONTyped(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.PriceFromJSONTyped = PriceFromJSONTyped;
|
|
40
38
|
function PriceToJSON(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.PriceToJSON = PriceToJSON;
|
|
@@ -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,15 +14,13 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.ShippingMethodToJSON = exports.ShippingMethodFromJSONTyped = exports.ShippingMethodFromJSON = exports.instanceOfShippingMethod = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
17
|
var DeliveryEstimates_1 = require("./DeliveryEstimates");
|
|
19
18
|
var Price_1 = require("./Price");
|
|
20
19
|
/**
|
|
21
20
|
* Check if a given object implements the ShippingMethod interface.
|
|
22
21
|
*/
|
|
23
22
|
function instanceOfShippingMethod(value) {
|
|
24
|
-
|
|
25
|
-
return isInstance;
|
|
23
|
+
return true;
|
|
26
24
|
}
|
|
27
25
|
exports.instanceOfShippingMethod = instanceOfShippingMethod;
|
|
28
26
|
function ShippingMethodFromJSON(json) {
|
|
@@ -30,37 +28,34 @@ function ShippingMethodFromJSON(json) {
|
|
|
30
28
|
}
|
|
31
29
|
exports.ShippingMethodFromJSON = ShippingMethodFromJSON;
|
|
32
30
|
function ShippingMethodFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
-
if (
|
|
31
|
+
if (json == null) {
|
|
34
32
|
return json;
|
|
35
33
|
}
|
|
36
34
|
return {
|
|
37
|
-
'id':
|
|
38
|
-
'name':
|
|
39
|
-
'description':
|
|
40
|
-
'deliveryEstimates':
|
|
41
|
-
'totalPrice':
|
|
42
|
-
'taxPrice':
|
|
43
|
-
'subtotalPrice':
|
|
44
|
-
'discountPrice':
|
|
35
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
36
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
37
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
38
|
+
'deliveryEstimates': json['deliveryEstimates'] == null ? undefined : (0, DeliveryEstimates_1.DeliveryEstimatesFromJSON)(json['deliveryEstimates']),
|
|
39
|
+
'totalPrice': json['totalPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['totalPrice']),
|
|
40
|
+
'taxPrice': json['taxPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['taxPrice']),
|
|
41
|
+
'subtotalPrice': json['subtotalPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['subtotalPrice']),
|
|
42
|
+
'discountPrice': json['discountPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['discountPrice']),
|
|
45
43
|
};
|
|
46
44
|
}
|
|
47
45
|
exports.ShippingMethodFromJSONTyped = ShippingMethodFromJSONTyped;
|
|
48
46
|
function ShippingMethodToJSON(value) {
|
|
49
|
-
if (value
|
|
50
|
-
return
|
|
51
|
-
}
|
|
52
|
-
if (value === null) {
|
|
53
|
-
return null;
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
54
49
|
}
|
|
55
50
|
return {
|
|
56
|
-
'id': value
|
|
57
|
-
'name': value
|
|
58
|
-
'description': value
|
|
59
|
-
'deliveryEstimates': (0, DeliveryEstimates_1.DeliveryEstimatesToJSON)(value
|
|
60
|
-
'totalPrice': (0, Price_1.PriceToJSON)(value
|
|
61
|
-
'taxPrice': (0, Price_1.PriceToJSON)(value
|
|
62
|
-
'subtotalPrice': (0, Price_1.PriceToJSON)(value
|
|
63
|
-
'discountPrice': (0, Price_1.PriceToJSON)(value
|
|
51
|
+
'id': value['id'],
|
|
52
|
+
'name': value['name'],
|
|
53
|
+
'description': value['description'],
|
|
54
|
+
'deliveryEstimates': (0, DeliveryEstimates_1.DeliveryEstimatesToJSON)(value['deliveryEstimates']),
|
|
55
|
+
'totalPrice': (0, Price_1.PriceToJSON)(value['totalPrice']),
|
|
56
|
+
'taxPrice': (0, Price_1.PriceToJSON)(value['taxPrice']),
|
|
57
|
+
'subtotalPrice': (0, Price_1.PriceToJSON)(value['subtotalPrice']),
|
|
58
|
+
'discountPrice': (0, Price_1.PriceToJSON)(value['discountPrice']),
|
|
64
59
|
};
|
|
65
60
|
}
|
|
66
61
|
exports.ShippingMethodToJSON = ShippingMethodToJSON;
|
package/dist/models/Status.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).
|
package/dist/models/Status.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).
|
|
@@ -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,14 +14,12 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.StatusHistoryItemToJSON = exports.StatusHistoryItemFromJSONTyped = exports.StatusHistoryItemFromJSON = exports.instanceOfStatusHistoryItem = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
17
|
var Status_1 = require("./Status");
|
|
19
18
|
/**
|
|
20
19
|
* Check if a given object implements the StatusHistoryItem interface.
|
|
21
20
|
*/
|
|
22
21
|
function instanceOfStatusHistoryItem(value) {
|
|
23
|
-
|
|
24
|
-
return isInstance;
|
|
22
|
+
return true;
|
|
25
23
|
}
|
|
26
24
|
exports.instanceOfStatusHistoryItem = instanceOfStatusHistoryItem;
|
|
27
25
|
function StatusHistoryItemFromJSON(json) {
|
|
@@ -29,25 +27,22 @@ function StatusHistoryItemFromJSON(json) {
|
|
|
29
27
|
}
|
|
30
28
|
exports.StatusHistoryItemFromJSON = StatusHistoryItemFromJSON;
|
|
31
29
|
function StatusHistoryItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
-
if (
|
|
30
|
+
if (json == null) {
|
|
33
31
|
return json;
|
|
34
32
|
}
|
|
35
33
|
return {
|
|
36
|
-
'status':
|
|
37
|
-
'createdAt':
|
|
34
|
+
'status': json['status'] == null ? undefined : (0, Status_1.StatusFromJSON)(json['status']),
|
|
35
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
38
36
|
};
|
|
39
37
|
}
|
|
40
38
|
exports.StatusHistoryItemFromJSONTyped = StatusHistoryItemFromJSONTyped;
|
|
41
39
|
function StatusHistoryItemToJSON(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
|
-
'status': (0, Status_1.StatusToJSON)(value
|
|
50
|
-
'createdAt': value
|
|
44
|
+
'status': (0, Status_1.StatusToJSON)(value['status']),
|
|
45
|
+
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
51
46
|
};
|
|
52
47
|
}
|
|
53
48
|
exports.StatusHistoryItemToJSON = StatusHistoryItemToJSON;
|
package/dist/runtime.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).
|
package/dist/runtime.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).
|
package/package.json
CHANGED
package/src/apis/OrdersApi.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orders API
|
|
5
5
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.6.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -40,6 +40,12 @@ import {
|
|
|
40
40
|
StatusToJSON,
|
|
41
41
|
} from '../models/index';
|
|
42
42
|
|
|
43
|
+
export interface CancelOrderRequest {
|
|
44
|
+
project: string;
|
|
45
|
+
orderId: string;
|
|
46
|
+
fields?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
43
49
|
export interface ConfirmOrderOperationRequest {
|
|
44
50
|
project: string;
|
|
45
51
|
orderId: string;
|
|
@@ -82,6 +88,68 @@ export interface GetOrdersRequest {
|
|
|
82
88
|
*/
|
|
83
89
|
export class OrdersApi extends runtime.BaseAPI {
|
|
84
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Cancels an order if it has not yet started processing.
|
|
93
|
+
* Cancel order
|
|
94
|
+
*/
|
|
95
|
+
async cancelOrderRaw(requestParameters: CancelOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
96
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
97
|
+
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling cancelOrder.');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
|
|
101
|
+
throw new runtime.RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling cancelOrder.');
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const queryParameters: any = {};
|
|
105
|
+
|
|
106
|
+
if (requestParameters.project !== undefined) {
|
|
107
|
+
queryParameters['project'] = requestParameters.project;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (requestParameters.fields !== undefined) {
|
|
111
|
+
queryParameters['fields'] = requestParameters.fields;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
115
|
+
|
|
116
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
117
|
+
// oauth required
|
|
118
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
122
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const response = await this.request({
|
|
126
|
+
path: `/v1/orders/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters.orderId))),
|
|
127
|
+
method: 'DELETE',
|
|
128
|
+
headers: headerParameters,
|
|
129
|
+
query: queryParameters,
|
|
130
|
+
}, initOverrides);
|
|
131
|
+
|
|
132
|
+
return new runtime.VoidApiResponse(response);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Cancels an order if it has not yet started processing.
|
|
137
|
+
* Cancel order
|
|
138
|
+
*/
|
|
139
|
+
async cancelOrder(
|
|
140
|
+
project: string, orderId: string,
|
|
141
|
+
optionalParameters: runtime.OptionalOnly<CancelOrderRequest> = {},
|
|
142
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
143
|
+
): Promise<void> {
|
|
144
|
+
await this.cancelOrderRaw(
|
|
145
|
+
{
|
|
146
|
+
project: project,orderId: orderId,
|
|
147
|
+
...optionalParameters,
|
|
148
|
+
},
|
|
149
|
+
initOverrides
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
85
153
|
/**
|
|
86
154
|
* Confirms an order, and submits it as ready to take payment and begin processing.
|
|
87
155
|
* Confirm order
|