@teemill/orders 1.5.5 → 1.6.1
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/FILES +7 -25
- package/.openapi-generator/VERSION +1 -1
- package/README.md +3 -3
- package/api.ts +1526 -0
- package/base.ts +86 -0
- package/common.ts +150 -0
- package/configuration.ts +110 -0
- package/dist/api.d.ts +1103 -0
- package/dist/api.js +632 -0
- package/dist/base.d.ts +66 -0
- package/dist/base.js +65 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +161 -0
- package/dist/configuration.d.ts +91 -0
- package/dist/configuration.js +43 -0
- package/dist/esm/api.d.ts +1103 -0
- package/dist/esm/api.js +625 -0
- package/dist/esm/base.d.ts +66 -0
- package/dist/esm/base.js +60 -0
- package/dist/esm/common.d.ts +65 -0
- package/dist/esm/common.js +149 -0
- package/dist/esm/configuration.d.ts +91 -0
- package/dist/esm/configuration.js +39 -0
- package/dist/{models/Status.d.ts → esm/index.d.ts} +3 -16
- package/dist/esm/index.js +15 -0
- package/dist/index.d.ts +13 -3
- package/dist/index.js +15 -5
- package/git_push.sh +57 -0
- package/{src/models/Status.ts → index.ts} +3 -26
- package/package.json +18 -4
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +4 -6
- package/dist/apis/OrdersApi.d.ts +0 -100
- package/dist/apis/OrdersApi.js +0 -464
- package/dist/apis/index.d.ts +0 -1
- package/dist/apis/index.js +0 -19
- package/dist/models/Address.d.ts +0 -73
- package/dist/models/Address.js +0 -68
- package/dist/models/ApiError.d.ts +0 -37
- package/dist/models/ApiError.js +0 -53
- package/dist/models/ConfirmOrderFulfillment.d.ts +0 -37
- package/dist/models/ConfirmOrderFulfillment.js +0 -53
- package/dist/models/ConfirmOrderRequest.d.ts +0 -32
- package/dist/models/ConfirmOrderRequest.js +0 -51
- package/dist/models/ConfirmOrderValidationError.d.ts +0 -47
- package/dist/models/ConfirmOrderValidationError.js +0 -62
- package/dist/models/ContactInformation.d.ts +0 -37
- package/dist/models/ContactInformation.js +0 -53
- package/dist/models/DeliveryEstimates.d.ts +0 -37
- package/dist/models/DeliveryEstimates.js +0 -52
- package/dist/models/ExportOrders202Response.d.ts +0 -31
- package/dist/models/ExportOrders202Response.js +0 -50
- package/dist/models/Fulfillment.d.ts +0 -71
- package/dist/models/Fulfillment.js +0 -66
- package/dist/models/FulfillmentItem.d.ts +0 -43
- package/dist/models/FulfillmentItem.js +0 -54
- package/dist/models/Order.d.ts +0 -135
- package/dist/models/Order.js +0 -92
- package/dist/models/OrderItem.d.ts +0 -75
- package/dist/models/OrderItem.js +0 -64
- package/dist/models/OrderItemTaxPrice.d.ts +0 -37
- package/dist/models/OrderItemTaxPrice.js +0 -52
- package/dist/models/OrderTracking.d.ts +0 -43
- package/dist/models/OrderTracking.js +0 -54
- package/dist/models/OrdersResponse.d.ts +0 -38
- package/dist/models/OrdersResponse.js +0 -53
- package/dist/models/Origin.d.ts +0 -37
- package/dist/models/Origin.js +0 -52
- package/dist/models/Price.d.ts +0 -37
- package/dist/models/Price.js +0 -52
- package/dist/models/ShippingMethod.d.ts +0 -75
- package/dist/models/ShippingMethod.js +0 -66
- package/dist/models/Status.js +0 -39
- package/dist/models/StatusHistoryItem.d.ts +0 -38
- package/dist/models/StatusHistoryItem.js +0 -53
- package/dist/models/index.d.ts +0 -20
- package/dist/models/index.js +0 -38
- package/dist/runtime.d.ts +0 -187
- package/dist/runtime.js +0 -565
- package/src/apis/OrdersApi.ts +0 -443
- package/src/apis/index.ts +0 -3
- package/src/index.ts +0 -5
- package/src/models/Address.ts +0 -125
- package/src/models/ApiError.ts +0 -74
- package/src/models/ConfirmOrderFulfillment.ts +0 -75
- package/src/models/ConfirmOrderRequest.ts +0 -73
- package/src/models/ConfirmOrderValidationError.ts +0 -88
- package/src/models/ContactInformation.ts +0 -74
- package/src/models/DeliveryEstimates.ts +0 -73
- package/src/models/ExportOrders202Response.ts +0 -65
- package/src/models/Fulfillment.ts +0 -138
- package/src/models/FulfillmentItem.ts +0 -81
- package/src/models/Order.ts +0 -244
- package/src/models/OrderItem.ts +0 -132
- package/src/models/OrderItemTaxPrice.ts +0 -73
- package/src/models/OrderTracking.ts +0 -81
- package/src/models/OrdersResponse.ts +0 -80
- package/src/models/Origin.ts +0 -73
- package/src/models/Price.ts +0 -73
- package/src/models/ShippingMethod.ts +0 -134
- package/src/models/StatusHistoryItem.ts +0 -80
- package/src/models/index.ts +0 -22
- package/src/runtime.ts +0 -441
package/src/models/Order.ts
DELETED
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Orders API
|
|
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
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.5.5
|
|
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 { Address } from './Address';
|
|
17
|
-
import {
|
|
18
|
-
AddressFromJSON,
|
|
19
|
-
AddressFromJSONTyped,
|
|
20
|
-
AddressToJSON,
|
|
21
|
-
} from './Address';
|
|
22
|
-
import type { ContactInformation } from './ContactInformation';
|
|
23
|
-
import {
|
|
24
|
-
ContactInformationFromJSON,
|
|
25
|
-
ContactInformationFromJSONTyped,
|
|
26
|
-
ContactInformationToJSON,
|
|
27
|
-
} from './ContactInformation';
|
|
28
|
-
import type { Fulfillment } from './Fulfillment';
|
|
29
|
-
import {
|
|
30
|
-
FulfillmentFromJSON,
|
|
31
|
-
FulfillmentFromJSONTyped,
|
|
32
|
-
FulfillmentToJSON,
|
|
33
|
-
} from './Fulfillment';
|
|
34
|
-
import type { OrderItem } from './OrderItem';
|
|
35
|
-
import {
|
|
36
|
-
OrderItemFromJSON,
|
|
37
|
-
OrderItemFromJSONTyped,
|
|
38
|
-
OrderItemToJSON,
|
|
39
|
-
} from './OrderItem';
|
|
40
|
-
import type { Origin } from './Origin';
|
|
41
|
-
import {
|
|
42
|
-
OriginFromJSON,
|
|
43
|
-
OriginFromJSONTyped,
|
|
44
|
-
OriginToJSON,
|
|
45
|
-
} from './Origin';
|
|
46
|
-
import type { Price } from './Price';
|
|
47
|
-
import {
|
|
48
|
-
PriceFromJSON,
|
|
49
|
-
PriceFromJSONTyped,
|
|
50
|
-
PriceToJSON,
|
|
51
|
-
} from './Price';
|
|
52
|
-
import type { Status } from './Status';
|
|
53
|
-
import {
|
|
54
|
-
StatusFromJSON,
|
|
55
|
-
StatusFromJSONTyped,
|
|
56
|
-
StatusToJSON,
|
|
57
|
-
} from './Status';
|
|
58
|
-
import type { StatusHistoryItem } from './StatusHistoryItem';
|
|
59
|
-
import {
|
|
60
|
-
StatusHistoryItemFromJSON,
|
|
61
|
-
StatusHistoryItemFromJSONTyped,
|
|
62
|
-
StatusHistoryItemToJSON,
|
|
63
|
-
} from './StatusHistoryItem';
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
* @export
|
|
68
|
-
* @interface Order
|
|
69
|
-
*/
|
|
70
|
-
export interface Order {
|
|
71
|
-
/**
|
|
72
|
-
* Unique object identifier
|
|
73
|
-
* @type {string}
|
|
74
|
-
* @memberof Order
|
|
75
|
-
*/
|
|
76
|
-
id?: string;
|
|
77
|
-
/**
|
|
78
|
-
* A reference to the resource location
|
|
79
|
-
* @type {string}
|
|
80
|
-
* @memberof Order
|
|
81
|
-
*/
|
|
82
|
-
ref?: string;
|
|
83
|
-
/**
|
|
84
|
-
*
|
|
85
|
-
* @type {Status}
|
|
86
|
-
* @memberof Order
|
|
87
|
-
*/
|
|
88
|
-
status?: Status;
|
|
89
|
-
/**
|
|
90
|
-
*
|
|
91
|
-
* @type {ContactInformation}
|
|
92
|
-
* @memberof Order
|
|
93
|
-
*/
|
|
94
|
-
contactInformation: ContactInformation;
|
|
95
|
-
/**
|
|
96
|
-
*
|
|
97
|
-
* @type {Address}
|
|
98
|
-
* @memberof Order
|
|
99
|
-
*/
|
|
100
|
-
shippingAddress: Address;
|
|
101
|
-
/**
|
|
102
|
-
* ISO 8601 Timestamp
|
|
103
|
-
* @type {Date}
|
|
104
|
-
* @memberof Order
|
|
105
|
-
*/
|
|
106
|
-
createdAt?: Date;
|
|
107
|
-
/**
|
|
108
|
-
* ISO 8601 Timestamp
|
|
109
|
-
* @type {Date}
|
|
110
|
-
* @memberof Order
|
|
111
|
-
*/
|
|
112
|
-
updatedAt?: Date;
|
|
113
|
-
/**
|
|
114
|
-
* A custom reference to the merchant's order that will be displayed on the shipping label.
|
|
115
|
-
* @type {string}
|
|
116
|
-
* @memberof Order
|
|
117
|
-
*/
|
|
118
|
-
merchantReference?: string | null;
|
|
119
|
-
/**
|
|
120
|
-
*
|
|
121
|
-
* @type {Array<Fulfillment>}
|
|
122
|
-
* @memberof Order
|
|
123
|
-
*/
|
|
124
|
-
readonly fulfillments?: Array<Fulfillment>;
|
|
125
|
-
/**
|
|
126
|
-
*
|
|
127
|
-
* @type {Array<OrderItem>}
|
|
128
|
-
* @memberof Order
|
|
129
|
-
*/
|
|
130
|
-
items: Array<OrderItem>;
|
|
131
|
-
/**
|
|
132
|
-
*
|
|
133
|
-
* @type {Price}
|
|
134
|
-
* @memberof Order
|
|
135
|
-
*/
|
|
136
|
-
totalPrice?: Price;
|
|
137
|
-
/**
|
|
138
|
-
*
|
|
139
|
-
* @type {Price}
|
|
140
|
-
* @memberof Order
|
|
141
|
-
*/
|
|
142
|
-
taxPrice?: Price;
|
|
143
|
-
/**
|
|
144
|
-
*
|
|
145
|
-
* @type {Price}
|
|
146
|
-
* @memberof Order
|
|
147
|
-
*/
|
|
148
|
-
subtotalPrice?: Price;
|
|
149
|
-
/**
|
|
150
|
-
*
|
|
151
|
-
* @type {Price}
|
|
152
|
-
* @memberof Order
|
|
153
|
-
*/
|
|
154
|
-
discountPrice?: Price;
|
|
155
|
-
/**
|
|
156
|
-
*
|
|
157
|
-
* @type {Price}
|
|
158
|
-
* @memberof Order
|
|
159
|
-
*/
|
|
160
|
-
shippingPrice?: Price;
|
|
161
|
-
/**
|
|
162
|
-
*
|
|
163
|
-
* @type {Origin}
|
|
164
|
-
* @memberof Order
|
|
165
|
-
*/
|
|
166
|
-
origin?: Origin;
|
|
167
|
-
/**
|
|
168
|
-
*
|
|
169
|
-
* @type {Array<StatusHistoryItem>}
|
|
170
|
-
* @memberof Order
|
|
171
|
-
*/
|
|
172
|
-
statusHistory?: Array<StatusHistoryItem>;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Check if a given object implements the Order interface.
|
|
177
|
-
*/
|
|
178
|
-
export function instanceOfOrder(value: object): boolean {
|
|
179
|
-
let isInstance = true;
|
|
180
|
-
isInstance = isInstance && "contactInformation" in value;
|
|
181
|
-
isInstance = isInstance && "shippingAddress" in value;
|
|
182
|
-
isInstance = isInstance && "items" in value;
|
|
183
|
-
|
|
184
|
-
return isInstance;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export function OrderFromJSON(json: any): Order {
|
|
188
|
-
return OrderFromJSONTyped(json, false);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Order {
|
|
192
|
-
if ((json === undefined) || (json === null)) {
|
|
193
|
-
return json;
|
|
194
|
-
}
|
|
195
|
-
return {
|
|
196
|
-
|
|
197
|
-
'id': !exists(json, 'id') ? undefined : json['id'],
|
|
198
|
-
'ref': !exists(json, 'ref') ? undefined : json['ref'],
|
|
199
|
-
'status': !exists(json, 'status') ? undefined : StatusFromJSON(json['status']),
|
|
200
|
-
'contactInformation': ContactInformationFromJSON(json['contactInformation']),
|
|
201
|
-
'shippingAddress': AddressFromJSON(json['shippingAddress']),
|
|
202
|
-
'createdAt': !exists(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
|
|
203
|
-
'updatedAt': !exists(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])),
|
|
204
|
-
'merchantReference': !exists(json, 'merchantReference') ? undefined : json['merchantReference'],
|
|
205
|
-
'fulfillments': !exists(json, 'fulfillments') ? undefined : ((json['fulfillments'] as Array<any>).map(FulfillmentFromJSON)),
|
|
206
|
-
'items': ((json['items'] as Array<any>).map(OrderItemFromJSON)),
|
|
207
|
-
'totalPrice': !exists(json, 'totalPrice') ? undefined : PriceFromJSON(json['totalPrice']),
|
|
208
|
-
'taxPrice': !exists(json, 'taxPrice') ? undefined : PriceFromJSON(json['taxPrice']),
|
|
209
|
-
'subtotalPrice': !exists(json, 'subtotalPrice') ? undefined : PriceFromJSON(json['subtotalPrice']),
|
|
210
|
-
'discountPrice': !exists(json, 'discountPrice') ? undefined : PriceFromJSON(json['discountPrice']),
|
|
211
|
-
'shippingPrice': !exists(json, 'shippingPrice') ? undefined : PriceFromJSON(json['shippingPrice']),
|
|
212
|
-
'origin': !exists(json, 'origin') ? undefined : OriginFromJSON(json['origin']),
|
|
213
|
-
'statusHistory': !exists(json, 'statusHistory') ? undefined : ((json['statusHistory'] as Array<any>).map(StatusHistoryItemFromJSON)),
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
export function OrderToJSON(value?: Order | null): any {
|
|
218
|
-
if (value === undefined) {
|
|
219
|
-
return undefined;
|
|
220
|
-
}
|
|
221
|
-
if (value === null) {
|
|
222
|
-
return null;
|
|
223
|
-
}
|
|
224
|
-
return {
|
|
225
|
-
|
|
226
|
-
'id': value.id,
|
|
227
|
-
'ref': value.ref,
|
|
228
|
-
'status': StatusToJSON(value.status),
|
|
229
|
-
'contactInformation': ContactInformationToJSON(value.contactInformation),
|
|
230
|
-
'shippingAddress': AddressToJSON(value.shippingAddress),
|
|
231
|
-
'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
|
|
232
|
-
'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
|
|
233
|
-
'merchantReference': value.merchantReference,
|
|
234
|
-
'items': ((value.items as Array<any>).map(OrderItemToJSON)),
|
|
235
|
-
'totalPrice': PriceToJSON(value.totalPrice),
|
|
236
|
-
'taxPrice': PriceToJSON(value.taxPrice),
|
|
237
|
-
'subtotalPrice': PriceToJSON(value.subtotalPrice),
|
|
238
|
-
'discountPrice': PriceToJSON(value.discountPrice),
|
|
239
|
-
'shippingPrice': PriceToJSON(value.shippingPrice),
|
|
240
|
-
'origin': OriginToJSON(value.origin),
|
|
241
|
-
'statusHistory': value.statusHistory === undefined ? undefined : ((value.statusHistory as Array<any>).map(StatusHistoryItemToJSON)),
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
|
package/src/models/OrderItem.ts
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Orders API
|
|
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
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.5.5
|
|
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
|
-
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Orders API
|
|
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
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.5.5
|
|
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
|
-
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Orders API
|
|
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
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.5.5
|
|
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
|
-
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Orders API
|
|
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
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.5.5
|
|
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
|
-
|
package/src/models/Origin.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Orders API
|
|
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
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.5.5
|
|
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
|
-
|