@teemill/orders 1.0.0 → 1.0.3

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 (90) hide show
  1. package/.openapi-generator/FILES +24 -6
  2. package/README.md +3 -3
  3. package/dist/apis/OrdersApi.d.ts +79 -0
  4. package/dist/apis/OrdersApi.js +319 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +19 -0
  7. package/dist/index.d.ts +3 -13
  8. package/dist/index.js +5 -15
  9. package/dist/models/Address.d.ts +73 -0
  10. package/dist/models/Address.js +68 -0
  11. package/dist/models/ApiError.d.ts +37 -0
  12. package/dist/models/ApiError.js +53 -0
  13. package/dist/models/ConfirmOrderFulfillment.d.ts +37 -0
  14. package/dist/models/ConfirmOrderFulfillment.js +53 -0
  15. package/dist/models/ConfirmOrderRequest.d.ts +32 -0
  16. package/dist/models/ConfirmOrderRequest.js +51 -0
  17. package/dist/models/ConfirmOrderValidationError.d.ts +47 -0
  18. package/dist/models/ConfirmOrderValidationError.js +62 -0
  19. package/dist/models/ContactInformation.d.ts +37 -0
  20. package/dist/models/ContactInformation.js +53 -0
  21. package/dist/models/DeliveryEstimates.d.ts +37 -0
  22. package/dist/models/DeliveryEstimates.js +52 -0
  23. package/dist/models/Fulfillment.d.ts +71 -0
  24. package/dist/models/Fulfillment.js +66 -0
  25. package/dist/models/FulfillmentItem.d.ts +43 -0
  26. package/dist/models/FulfillmentItem.js +54 -0
  27. package/dist/models/Order.d.ts +135 -0
  28. package/dist/models/Order.js +92 -0
  29. package/dist/models/OrderItem.d.ts +75 -0
  30. package/dist/models/OrderItem.js +64 -0
  31. package/dist/models/OrderItemTaxPrice.d.ts +37 -0
  32. package/dist/models/OrderItemTaxPrice.js +52 -0
  33. package/dist/models/OrderTracking.d.ts +43 -0
  34. package/dist/models/OrderTracking.js +54 -0
  35. package/dist/models/OrdersResponse.d.ts +38 -0
  36. package/dist/models/OrdersResponse.js +53 -0
  37. package/dist/models/Origin.d.ts +37 -0
  38. package/dist/models/Origin.js +52 -0
  39. package/dist/models/Price.d.ts +37 -0
  40. package/dist/models/Price.js +52 -0
  41. package/dist/models/ShippingMethod.d.ts +75 -0
  42. package/dist/models/ShippingMethod.js +66 -0
  43. package/dist/models/Status.d.ts +26 -0
  44. package/dist/models/Status.js +39 -0
  45. package/dist/models/StatusHistoryItem.d.ts +38 -0
  46. package/dist/models/StatusHistoryItem.js +53 -0
  47. package/dist/models/index.d.ts +19 -0
  48. package/dist/models/index.js +37 -0
  49. package/dist/runtime.d.ts +182 -0
  50. package/dist/runtime.js +562 -0
  51. package/package.json +3 -15
  52. package/src/apis/OrdersApi.ts +269 -0
  53. package/src/apis/index.ts +3 -0
  54. package/src/index.ts +5 -0
  55. package/src/models/Address.ts +125 -0
  56. package/src/models/ApiError.ts +74 -0
  57. package/src/models/ConfirmOrderFulfillment.ts +75 -0
  58. package/src/models/ConfirmOrderRequest.ts +73 -0
  59. package/src/models/ConfirmOrderValidationError.ts +88 -0
  60. package/src/models/ContactInformation.ts +74 -0
  61. package/src/models/DeliveryEstimates.ts +73 -0
  62. package/src/models/Fulfillment.ts +138 -0
  63. package/src/models/FulfillmentItem.ts +81 -0
  64. package/src/models/Order.ts +244 -0
  65. package/src/models/OrderItem.ts +132 -0
  66. package/src/models/OrderItemTaxPrice.ts +73 -0
  67. package/src/models/OrderTracking.ts +81 -0
  68. package/src/models/OrdersResponse.ts +80 -0
  69. package/src/models/Origin.ts +73 -0
  70. package/src/models/Price.ts +73 -0
  71. package/src/models/ShippingMethod.ts +134 -0
  72. package/src/models/Status.ts +41 -0
  73. package/src/models/StatusHistoryItem.ts +80 -0
  74. package/src/models/index.ts +21 -0
  75. package/src/runtime.ts +431 -0
  76. package/tsconfig.json +2 -3
  77. package/api.ts +0 -988
  78. package/base.ts +0 -72
  79. package/common.ts +0 -150
  80. package/configuration.ts +0 -101
  81. package/dist/api.d.ts +0 -750
  82. package/dist/api.js +0 -560
  83. package/dist/base.d.ts +0 -54
  84. package/dist/base.js +0 -80
  85. package/dist/common.d.ts +0 -65
  86. package/dist/common.js +0 -252
  87. package/dist/configuration.d.ts +0 -83
  88. package/dist/configuration.js +0 -44
  89. package/git_push.sh +0 -57
  90. package/index.ts +0 -18
@@ -0,0 +1,132 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Orders API
5
+ * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.3
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { OrderItemTaxPrice } from './OrderItemTaxPrice';
17
+ import {
18
+ OrderItemTaxPriceFromJSON,
19
+ OrderItemTaxPriceFromJSONTyped,
20
+ OrderItemTaxPriceToJSON,
21
+ } from './OrderItemTaxPrice';
22
+ import type { Price } from './Price';
23
+ import {
24
+ PriceFromJSON,
25
+ PriceFromJSONTyped,
26
+ PriceToJSON,
27
+ } from './Price';
28
+
29
+ /**
30
+ *
31
+ * @export
32
+ * @interface OrderItem
33
+ */
34
+ export interface OrderItem {
35
+ /**
36
+ * Unique object identifier
37
+ * @type {string}
38
+ * @memberof OrderItem
39
+ */
40
+ readonly id?: string;
41
+ /**
42
+ * A reference to the resource location
43
+ * @type {string}
44
+ * @memberof OrderItem
45
+ */
46
+ variantRef: string;
47
+ /**
48
+ *
49
+ * @type {number}
50
+ * @memberof OrderItem
51
+ */
52
+ quantity: number;
53
+ /**
54
+ *
55
+ * @type {Price}
56
+ * @memberof OrderItem
57
+ */
58
+ readonly totalPrice?: Price;
59
+ /**
60
+ *
61
+ * @type {OrderItemTaxPrice}
62
+ * @memberof OrderItem
63
+ */
64
+ taxPrice?: OrderItemTaxPrice;
65
+ /**
66
+ *
67
+ * @type {Price}
68
+ * @memberof OrderItem
69
+ */
70
+ readonly subtotalPrice?: Price;
71
+ /**
72
+ *
73
+ * @type {Price}
74
+ * @memberof OrderItem
75
+ */
76
+ readonly discountPrice?: Price;
77
+ /**
78
+ *
79
+ * @type {Price}
80
+ * @memberof OrderItem
81
+ */
82
+ recipientCost?: Price;
83
+ }
84
+
85
+ /**
86
+ * Check if a given object implements the OrderItem interface.
87
+ */
88
+ export function instanceOfOrderItem(value: object): boolean {
89
+ let isInstance = true;
90
+ isInstance = isInstance && "variantRef" in value;
91
+ isInstance = isInstance && "quantity" in value;
92
+
93
+ return isInstance;
94
+ }
95
+
96
+ export function OrderItemFromJSON(json: any): OrderItem {
97
+ return OrderItemFromJSONTyped(json, false);
98
+ }
99
+
100
+ export function OrderItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderItem {
101
+ if ((json === undefined) || (json === null)) {
102
+ return json;
103
+ }
104
+ return {
105
+
106
+ 'id': !exists(json, 'id') ? undefined : json['id'],
107
+ 'variantRef': json['variantRef'],
108
+ 'quantity': json['quantity'],
109
+ 'totalPrice': !exists(json, 'totalPrice') ? undefined : PriceFromJSON(json['totalPrice']),
110
+ 'taxPrice': !exists(json, 'taxPrice') ? undefined : OrderItemTaxPriceFromJSON(json['taxPrice']),
111
+ 'subtotalPrice': !exists(json, 'subtotalPrice') ? undefined : PriceFromJSON(json['subtotalPrice']),
112
+ 'discountPrice': !exists(json, 'discountPrice') ? undefined : PriceFromJSON(json['discountPrice']),
113
+ 'recipientCost': !exists(json, 'recipientCost') ? undefined : PriceFromJSON(json['recipientCost']),
114
+ };
115
+ }
116
+
117
+ export function OrderItemToJSON(value?: OrderItem | null): any {
118
+ if (value === undefined) {
119
+ return undefined;
120
+ }
121
+ if (value === null) {
122
+ return null;
123
+ }
124
+ return {
125
+
126
+ 'variantRef': value.variantRef,
127
+ 'quantity': value.quantity,
128
+ 'taxPrice': OrderItemTaxPriceToJSON(value.taxPrice),
129
+ 'recipientCost': PriceToJSON(value.recipientCost),
130
+ };
131
+ }
132
+
@@ -0,0 +1,73 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Orders API
5
+ * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.3
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ * This is an estimate until the order has been confirmed
18
+ * @export
19
+ * @interface OrderItemTaxPrice
20
+ */
21
+ export interface OrderItemTaxPrice {
22
+ /**
23
+ * Price including tax in the specified currency.
24
+ * @type {string}
25
+ * @memberof OrderItemTaxPrice
26
+ */
27
+ amount?: string;
28
+ /**
29
+ * Currency code for the currency the price is valued in.
30
+ * @type {string}
31
+ * @memberof OrderItemTaxPrice
32
+ */
33
+ currencyCode?: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the OrderItemTaxPrice interface.
38
+ */
39
+ export function instanceOfOrderItemTaxPrice(value: object): boolean {
40
+ let isInstance = true;
41
+
42
+ return isInstance;
43
+ }
44
+
45
+ export function OrderItemTaxPriceFromJSON(json: any): OrderItemTaxPrice {
46
+ return OrderItemTaxPriceFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function OrderItemTaxPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderItemTaxPrice {
50
+ if ((json === undefined) || (json === null)) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'amount': !exists(json, 'amount') ? undefined : json['amount'],
56
+ 'currencyCode': !exists(json, 'currencyCode') ? undefined : json['currencyCode'],
57
+ };
58
+ }
59
+
60
+ export function OrderItemTaxPriceToJSON(value?: OrderItemTaxPrice | null): any {
61
+ if (value === undefined) {
62
+ return undefined;
63
+ }
64
+ if (value === null) {
65
+ return null;
66
+ }
67
+ return {
68
+
69
+ 'amount': value.amount,
70
+ 'currencyCode': value.currencyCode,
71
+ };
72
+ }
73
+
@@ -0,0 +1,81 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Orders API
5
+ * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.3
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface OrderTracking
20
+ */
21
+ export interface OrderTracking {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof OrderTracking
26
+ */
27
+ courier?: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof OrderTracking
32
+ */
33
+ code?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof OrderTracking
38
+ */
39
+ url?: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the OrderTracking interface.
44
+ */
45
+ export function instanceOfOrderTracking(value: object): boolean {
46
+ let isInstance = true;
47
+
48
+ return isInstance;
49
+ }
50
+
51
+ export function OrderTrackingFromJSON(json: any): OrderTracking {
52
+ return OrderTrackingFromJSONTyped(json, false);
53
+ }
54
+
55
+ export function OrderTrackingFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderTracking {
56
+ if ((json === undefined) || (json === null)) {
57
+ return json;
58
+ }
59
+ return {
60
+
61
+ 'courier': !exists(json, 'courier') ? undefined : json['courier'],
62
+ 'code': !exists(json, 'code') ? undefined : json['code'],
63
+ 'url': !exists(json, 'url') ? undefined : json['url'],
64
+ };
65
+ }
66
+
67
+ export function OrderTrackingToJSON(value?: OrderTracking | null): any {
68
+ if (value === undefined) {
69
+ return undefined;
70
+ }
71
+ if (value === null) {
72
+ return null;
73
+ }
74
+ return {
75
+
76
+ 'courier': value.courier,
77
+ 'code': value.code,
78
+ 'url': value.url,
79
+ };
80
+ }
81
+
@@ -0,0 +1,80 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Orders API
5
+ * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.3
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { Order } from './Order';
17
+ import {
18
+ OrderFromJSON,
19
+ OrderFromJSONTyped,
20
+ OrderToJSON,
21
+ } from './Order';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface OrdersResponse
27
+ */
28
+ export interface OrdersResponse {
29
+ /**
30
+ *
31
+ * @type {Array<Order>}
32
+ * @memberof OrdersResponse
33
+ */
34
+ orders?: Array<Order>;
35
+ /**
36
+ *
37
+ * @type {number}
38
+ * @memberof OrdersResponse
39
+ */
40
+ nextPageToken?: number;
41
+ }
42
+
43
+ /**
44
+ * Check if a given object implements the OrdersResponse interface.
45
+ */
46
+ export function instanceOfOrdersResponse(value: object): boolean {
47
+ let isInstance = true;
48
+
49
+ return isInstance;
50
+ }
51
+
52
+ export function OrdersResponseFromJSON(json: any): OrdersResponse {
53
+ return OrdersResponseFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function OrdersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrdersResponse {
57
+ if ((json === undefined) || (json === null)) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'orders': !exists(json, 'orders') ? undefined : ((json['orders'] as Array<any>).map(OrderFromJSON)),
63
+ 'nextPageToken': !exists(json, 'nextPageToken') ? undefined : json['nextPageToken'],
64
+ };
65
+ }
66
+
67
+ export function OrdersResponseToJSON(value?: OrdersResponse | null): any {
68
+ if (value === undefined) {
69
+ return undefined;
70
+ }
71
+ if (value === null) {
72
+ return null;
73
+ }
74
+ return {
75
+
76
+ 'orders': value.orders === undefined ? undefined : ((value.orders as Array<any>).map(OrderToJSON)),
77
+ 'nextPageToken': value.nextPageToken,
78
+ };
79
+ }
80
+
@@ -0,0 +1,73 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Orders API
5
+ * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.3
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface Origin
20
+ */
21
+ export interface Origin {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof Origin
26
+ */
27
+ code?: string;
28
+ /**
29
+ *
30
+ * @type {boolean}
31
+ * @memberof Origin
32
+ */
33
+ isPaid?: boolean;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the Origin interface.
38
+ */
39
+ export function instanceOfOrigin(value: object): boolean {
40
+ let isInstance = true;
41
+
42
+ return isInstance;
43
+ }
44
+
45
+ export function OriginFromJSON(json: any): Origin {
46
+ return OriginFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function OriginFromJSONTyped(json: any, ignoreDiscriminator: boolean): Origin {
50
+ if ((json === undefined) || (json === null)) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'code': !exists(json, 'code') ? undefined : json['code'],
56
+ 'isPaid': !exists(json, 'isPaid') ? undefined : json['isPaid'],
57
+ };
58
+ }
59
+
60
+ export function OriginToJSON(value?: Origin | null): any {
61
+ if (value === undefined) {
62
+ return undefined;
63
+ }
64
+ if (value === null) {
65
+ return null;
66
+ }
67
+ return {
68
+
69
+ 'code': value.code,
70
+ 'isPaid': value.isPaid,
71
+ };
72
+ }
73
+
@@ -0,0 +1,73 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Orders API
5
+ * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.3
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ * Standard price definition that defines the amount and currency.
18
+ * @export
19
+ * @interface Price
20
+ */
21
+ export interface Price {
22
+ /**
23
+ * Price including tax in the specified currency.
24
+ * @type {string}
25
+ * @memberof Price
26
+ */
27
+ amount?: string;
28
+ /**
29
+ * Currency code for the currency the price is valued in.
30
+ * @type {string}
31
+ * @memberof Price
32
+ */
33
+ currencyCode?: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the Price interface.
38
+ */
39
+ export function instanceOfPrice(value: object): boolean {
40
+ let isInstance = true;
41
+
42
+ return isInstance;
43
+ }
44
+
45
+ export function PriceFromJSON(json: any): Price {
46
+ return PriceFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function PriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Price {
50
+ if ((json === undefined) || (json === null)) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'amount': !exists(json, 'amount') ? undefined : json['amount'],
56
+ 'currencyCode': !exists(json, 'currencyCode') ? undefined : json['currencyCode'],
57
+ };
58
+ }
59
+
60
+ export function PriceToJSON(value?: Price | null): any {
61
+ if (value === undefined) {
62
+ return undefined;
63
+ }
64
+ if (value === null) {
65
+ return null;
66
+ }
67
+ return {
68
+
69
+ 'amount': value.amount,
70
+ 'currencyCode': value.currencyCode,
71
+ };
72
+ }
73
+
@@ -0,0 +1,134 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Orders API
5
+ * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.3
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { DeliveryEstimates } from './DeliveryEstimates';
17
+ import {
18
+ DeliveryEstimatesFromJSON,
19
+ DeliveryEstimatesFromJSONTyped,
20
+ DeliveryEstimatesToJSON,
21
+ } from './DeliveryEstimates';
22
+ import type { Price } from './Price';
23
+ import {
24
+ PriceFromJSON,
25
+ PriceFromJSONTyped,
26
+ PriceToJSON,
27
+ } from './Price';
28
+
29
+ /**
30
+ *
31
+ * @export
32
+ * @interface ShippingMethod
33
+ */
34
+ export interface ShippingMethod {
35
+ /**
36
+ * Unique object identifier
37
+ * @type {string}
38
+ * @memberof ShippingMethod
39
+ */
40
+ id?: string;
41
+ /**
42
+ *
43
+ * @type {string}
44
+ * @memberof ShippingMethod
45
+ */
46
+ name?: string;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof ShippingMethod
51
+ */
52
+ description?: string;
53
+ /**
54
+ *
55
+ * @type {DeliveryEstimates}
56
+ * @memberof ShippingMethod
57
+ */
58
+ deliveryEstimates?: DeliveryEstimates;
59
+ /**
60
+ *
61
+ * @type {Price}
62
+ * @memberof ShippingMethod
63
+ */
64
+ totalPrice?: Price;
65
+ /**
66
+ *
67
+ * @type {Price}
68
+ * @memberof ShippingMethod
69
+ */
70
+ taxPrice?: Price;
71
+ /**
72
+ *
73
+ * @type {Price}
74
+ * @memberof ShippingMethod
75
+ */
76
+ subtotalPrice?: Price;
77
+ /**
78
+ *
79
+ * @type {Price}
80
+ * @memberof ShippingMethod
81
+ */
82
+ discountPrice?: Price;
83
+ }
84
+
85
+ /**
86
+ * Check if a given object implements the ShippingMethod interface.
87
+ */
88
+ export function instanceOfShippingMethod(value: object): boolean {
89
+ let isInstance = true;
90
+
91
+ return isInstance;
92
+ }
93
+
94
+ export function ShippingMethodFromJSON(json: any): ShippingMethod {
95
+ return ShippingMethodFromJSONTyped(json, false);
96
+ }
97
+
98
+ export function ShippingMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShippingMethod {
99
+ if ((json === undefined) || (json === null)) {
100
+ return json;
101
+ }
102
+ return {
103
+
104
+ 'id': !exists(json, 'id') ? undefined : json['id'],
105
+ 'name': !exists(json, 'name') ? undefined : json['name'],
106
+ 'description': !exists(json, 'description') ? undefined : json['description'],
107
+ 'deliveryEstimates': !exists(json, 'deliveryEstimates') ? undefined : DeliveryEstimatesFromJSON(json['deliveryEstimates']),
108
+ 'totalPrice': !exists(json, 'totalPrice') ? undefined : PriceFromJSON(json['totalPrice']),
109
+ 'taxPrice': !exists(json, 'taxPrice') ? undefined : PriceFromJSON(json['taxPrice']),
110
+ 'subtotalPrice': !exists(json, 'subtotalPrice') ? undefined : PriceFromJSON(json['subtotalPrice']),
111
+ 'discountPrice': !exists(json, 'discountPrice') ? undefined : PriceFromJSON(json['discountPrice']),
112
+ };
113
+ }
114
+
115
+ export function ShippingMethodToJSON(value?: ShippingMethod | null): any {
116
+ if (value === undefined) {
117
+ return undefined;
118
+ }
119
+ if (value === null) {
120
+ return null;
121
+ }
122
+ return {
123
+
124
+ 'id': value.id,
125
+ 'name': value.name,
126
+ 'description': value.description,
127
+ 'deliveryEstimates': DeliveryEstimatesToJSON(value.deliveryEstimates),
128
+ 'totalPrice': PriceToJSON(value.totalPrice),
129
+ 'taxPrice': PriceToJSON(value.taxPrice),
130
+ 'subtotalPrice': PriceToJSON(value.subtotalPrice),
131
+ 'discountPrice': PriceToJSON(value.discountPrice),
132
+ };
133
+ }
134
+
@@ -0,0 +1,41 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Orders API
5
+ * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.3
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ /**
17
+ *
18
+ * @export
19
+ */
20
+ export const Status = {
21
+ New: 'new',
22
+ Paid: 'paid',
23
+ Processing: 'processing',
24
+ Complete: 'complete',
25
+ Refunded: 'refunded'
26
+ } as const;
27
+ export type Status = typeof Status[keyof typeof Status];
28
+
29
+
30
+ export function StatusFromJSON(json: any): Status {
31
+ return StatusFromJSONTyped(json, false);
32
+ }
33
+
34
+ export function StatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): Status {
35
+ return json as Status;
36
+ }
37
+
38
+ export function StatusToJSON(value?: Status | null): any {
39
+ return value as any;
40
+ }
41
+