@digital8/lighting-illusions-ts-sdk 0.0.2007 → 0.0.2009
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 +0 -2
- package/README.md +2 -3
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +1 -3
- package/dist/models/AddressResource.d.ts +2 -2
- package/dist/models/AddressResource.js +15 -11
- package/dist/models/AdminOrderResource.js +68 -68
- package/dist/models/CartCouponResource.js +2 -2
- package/dist/models/CartListResource.js +24 -24
- package/dist/models/CartOrderSource.d.ts +0 -4
- package/dist/models/CartOrderSource.js +1 -5
- package/dist/models/CartResource.js +50 -50
- package/dist/models/CreateCartRequest.d.ts +0 -4
- package/dist/models/CreateCartRequest.js +1 -5
- package/dist/models/CustomerListResource.js +4 -4
- package/dist/models/CustomerResource.js +4 -4
- package/dist/models/DiscountResource.js +10 -10
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +3 -1
- package/dist/models/LiAddressResource.js +6 -6
- package/dist/models/LiAdminUserLiteResource.js +4 -4
- package/dist/models/LineItemDiscountResource.js +4 -4
- package/dist/models/LineItemListResource.js +12 -12
- package/dist/models/OmnisendSyncLiteResource.js +4 -4
- package/dist/models/OrderListResource.d.ts +0 -24
- package/dist/models/OrderListResource.js +10 -22
- package/dist/models/OrderLiteResource.js +10 -10
- package/dist/models/OrderStatusLiteResource.js +2 -2
- package/dist/models/OrderStatusWithCountResource.js +4 -4
- package/dist/models/ProductChildCartLiteResource.js +6 -6
- package/dist/models/SearchTransactionsRequest.d.ts +10 -2
- package/dist/models/SearchTransactionsRequest.js +8 -1
- package/dist/models/StoreFrontendResource.d.ts +2 -2
- package/dist/models/StoreFrontendResource.js +2 -6
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +1 -3
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +3 -1
- package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateFrontendResource.js +3 -1
- package/dist/models/StoreTransactionResource.js +2 -2
- package/dist/models/TransactionLiteResource.js +10 -10
- package/dist/models/TransactionResource.js +20 -20
- package/dist/models/UpdateCartRequest.d.ts +0 -4
- package/dist/models/UpdateCartRequest.js +1 -5
- package/dist/models/UpdateOrderRequest.d.ts +0 -4
- package/dist/models/UpdateOrderRequest.js +1 -5
- package/dist/models/index.d.ts +0 -1
- package/dist/models/index.js +0 -1
- package/docs/OrderListResource.md +0 -8
- package/docs/StoreSpecialDateFrontendResource.md +1 -1
- package/package.json +1 -1
- package/src/models/AddressFrontendResource.ts +2 -3
- package/src/models/AddressResource.ts +15 -13
- package/src/models/AdminOrderResource.ts +68 -68
- package/src/models/CartCouponResource.ts +2 -2
- package/src/models/CartListResource.ts +24 -24
- package/src/models/CartOrderSource.ts +1 -5
- package/src/models/CartResource.ts +50 -50
- package/src/models/CreateCartRequest.ts +1 -5
- package/src/models/CustomerListResource.ts +4 -4
- package/src/models/CustomerResource.ts +4 -4
- package/src/models/DiscountResource.ts +10 -10
- package/src/models/ExternalApiLogResource.ts +3 -2
- package/src/models/LiAddressResource.ts +6 -6
- package/src/models/LiAdminUserLiteResource.ts +4 -4
- package/src/models/LineItemDiscountResource.ts +4 -4
- package/src/models/LineItemListResource.ts +12 -12
- package/src/models/OmnisendSyncLiteResource.ts +4 -4
- package/src/models/OrderListResource.ts +10 -44
- package/src/models/OrderLiteResource.ts +10 -10
- package/src/models/OrderStatusLiteResource.ts +2 -2
- package/src/models/OrderStatusWithCountResource.ts +4 -4
- package/src/models/ProductChildCartLiteResource.ts +6 -6
- package/src/models/SearchTransactionsRequest.ts +11 -2
- package/src/models/StoreFrontendResource.ts +4 -6
- package/src/models/StoreListResource.ts +2 -3
- package/src/models/StoreResource.ts +3 -2
- package/src/models/StoreSpecialDateFrontendResource.ts +4 -3
- package/src/models/StoreTransactionResource.ts +2 -2
- package/src/models/TransactionLiteResource.ts +10 -10
- package/src/models/TransactionResource.ts +20 -20
- package/src/models/UpdateCartRequest.ts +1 -5
- package/src/models/UpdateOrderRequest.ts +1 -5
- package/src/models/index.ts +0 -1
- package/dist/models/OrderOmnisendEvent.d.ts +0 -25
- package/dist/models/OrderOmnisendEvent.js +0 -51
- package/docs/OrderOmnisendEvent.md +0 -32
- package/src/models/OrderOmnisendEvent.ts +0 -53
|
@@ -26,6 +26,8 @@ function instanceOfStoreSpecialDateFrontendResource(value) {
|
|
|
26
26
|
return false;
|
|
27
27
|
if (!('hours' in value) || value['hours'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
+
if (!('date' in value) || value['date'] === undefined)
|
|
30
|
+
return false;
|
|
29
31
|
if (!('closed' in value) || value['closed'] === undefined)
|
|
30
32
|
return false;
|
|
31
33
|
if (!('displayStartDate' in value) || value['displayStartDate'] === undefined)
|
|
@@ -45,7 +47,7 @@ function StoreSpecialDateFrontendResourceFromJSONTyped(json, ignoreDiscriminator
|
|
|
45
47
|
'id': json['id'] == null ? undefined : json['id'],
|
|
46
48
|
'name': json['name'],
|
|
47
49
|
'hours': json['hours'],
|
|
48
|
-
'date': json['date']
|
|
50
|
+
'date': json['date'],
|
|
49
51
|
'closed': json['closed'],
|
|
50
52
|
'displayStartDate': json['displayStartDate'],
|
|
51
53
|
'displayEndDate': json['displayEndDate'],
|
|
@@ -38,7 +38,7 @@ function StoreTransactionResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
38
38
|
}
|
|
39
39
|
return {
|
|
40
40
|
'transaction': (0, TransactionResource_1.TransactionResourceFromJSON)(json['transaction']),
|
|
41
|
-
'orderId': json['
|
|
41
|
+
'orderId': json['orderId'],
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
function StoreTransactionResourceToJSON(json) {
|
|
@@ -51,6 +51,6 @@ function StoreTransactionResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
51
51
|
}
|
|
52
52
|
return {
|
|
53
53
|
'transaction': (0, TransactionResource_1.TransactionResourceToJSON)(value['transaction']),
|
|
54
|
-
'
|
|
54
|
+
'orderId': value['orderId'],
|
|
55
55
|
};
|
|
56
56
|
}
|
|
@@ -50,16 +50,16 @@ function TransactionLiteResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
50
|
return json;
|
|
51
51
|
}
|
|
52
52
|
return {
|
|
53
|
-
'paymentSource': json['
|
|
54
|
-
'paymentMethod': json['
|
|
55
|
-
'paymentMethodThumbnail': json['
|
|
53
|
+
'paymentSource': json['paymentSource'],
|
|
54
|
+
'paymentMethod': json['paymentMethod'],
|
|
55
|
+
'paymentMethodThumbnail': json['paymentMethodThumbnail'],
|
|
56
56
|
'type': json['type'],
|
|
57
57
|
'status': json['status'],
|
|
58
58
|
'amount': json['amount'],
|
|
59
59
|
'surcharge': json['surcharge'],
|
|
60
|
-
'totalAmount': json['
|
|
60
|
+
'totalAmount': json['totalAmount'],
|
|
61
61
|
'reference': json['reference'],
|
|
62
|
-
'createdAt': json['
|
|
62
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
function TransactionLiteResourceToJSON(json) {
|
|
@@ -71,15 +71,15 @@ function TransactionLiteResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
71
71
|
return value;
|
|
72
72
|
}
|
|
73
73
|
return {
|
|
74
|
-
'
|
|
75
|
-
'
|
|
76
|
-
'
|
|
74
|
+
'paymentSource': value['paymentSource'],
|
|
75
|
+
'paymentMethod': value['paymentMethod'],
|
|
76
|
+
'paymentMethodThumbnail': value['paymentMethodThumbnail'],
|
|
77
77
|
'type': value['type'],
|
|
78
78
|
'status': value['status'],
|
|
79
79
|
'amount': value['amount'],
|
|
80
80
|
'surcharge': value['surcharge'],
|
|
81
|
-
'
|
|
81
|
+
'totalAmount': value['totalAmount'],
|
|
82
82
|
'reference': value['reference'],
|
|
83
|
-
'
|
|
83
|
+
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
84
84
|
};
|
|
85
85
|
}
|
|
@@ -53,22 +53,22 @@ function TransactionResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
53
53
|
}
|
|
54
54
|
return {
|
|
55
55
|
'id': json['id'] == null ? undefined : json['id'],
|
|
56
|
-
'paymentSource': json['
|
|
57
|
-
'paymentMethod': json['
|
|
56
|
+
'paymentSource': json['paymentSource'],
|
|
57
|
+
'paymentMethod': json['paymentMethod'],
|
|
58
58
|
'type': json['type'],
|
|
59
59
|
'status': json['status'],
|
|
60
60
|
'amount': json['amount'],
|
|
61
61
|
'surcharge': json['surcharge'],
|
|
62
|
-
'totalAmount': json['
|
|
63
|
-
'refundedAmount': json['
|
|
64
|
-
'unrefundedAmount': json['
|
|
62
|
+
'totalAmount': json['totalAmount'],
|
|
63
|
+
'refundedAmount': json['refundedAmount'],
|
|
64
|
+
'unrefundedAmount': json['unrefundedAmount'],
|
|
65
65
|
'reference': json['reference'],
|
|
66
66
|
'description': json['description'] == null ? undefined : json['description'],
|
|
67
|
-
'extendedData': json['
|
|
68
|
-
'riskScore': json['
|
|
69
|
-
'fraudDecision': json['
|
|
70
|
-
'refundedTransactionId': json['
|
|
71
|
-
'createdAt': json['
|
|
67
|
+
'extendedData': json['extendedData'] == null ? undefined : json['extendedData'],
|
|
68
|
+
'riskScore': json['riskScore'] == null ? undefined : json['riskScore'],
|
|
69
|
+
'fraudDecision': json['fraudDecision'] == null ? undefined : json['fraudDecision'],
|
|
70
|
+
'refundedTransactionId': json['refundedTransactionId'] == null ? undefined : json['refundedTransactionId'],
|
|
71
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
function TransactionResourceToJSON(json) {
|
|
@@ -81,21 +81,21 @@ function TransactionResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
81
81
|
}
|
|
82
82
|
return {
|
|
83
83
|
'id': value['id'],
|
|
84
|
-
'
|
|
85
|
-
'
|
|
84
|
+
'paymentSource': value['paymentSource'],
|
|
85
|
+
'paymentMethod': value['paymentMethod'],
|
|
86
86
|
'type': value['type'],
|
|
87
87
|
'status': value['status'],
|
|
88
88
|
'amount': value['amount'],
|
|
89
89
|
'surcharge': value['surcharge'],
|
|
90
|
-
'
|
|
91
|
-
'
|
|
92
|
-
'
|
|
90
|
+
'totalAmount': value['totalAmount'],
|
|
91
|
+
'refundedAmount': value['refundedAmount'],
|
|
92
|
+
'unrefundedAmount': value['unrefundedAmount'],
|
|
93
93
|
'reference': value['reference'],
|
|
94
94
|
'description': value['description'],
|
|
95
|
-
'
|
|
96
|
-
'
|
|
97
|
-
'
|
|
98
|
-
'
|
|
99
|
-
'
|
|
95
|
+
'extendedData': value['extendedData'],
|
|
96
|
+
'riskScore': value['riskScore'],
|
|
97
|
+
'fraudDecision': value['fraudDecision'],
|
|
98
|
+
'refundedTransactionId': value['refundedTransactionId'],
|
|
99
|
+
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
100
100
|
};
|
|
101
101
|
}
|
|
@@ -114,10 +114,6 @@ export interface UpdateCartRequest {
|
|
|
114
114
|
export declare const UpdateCartRequestSourceEnum: {
|
|
115
115
|
readonly Checkout: "checkout";
|
|
116
116
|
readonly Admin: "admin";
|
|
117
|
-
readonly Phone: "phone";
|
|
118
|
-
readonly Email: "email";
|
|
119
|
-
readonly Ebay: "ebay";
|
|
120
|
-
readonly InStore: "in_store";
|
|
121
117
|
};
|
|
122
118
|
export type UpdateCartRequestSourceEnum = typeof UpdateCartRequestSourceEnum[keyof typeof UpdateCartRequestSourceEnum];
|
|
123
119
|
/**
|
|
@@ -26,11 +26,7 @@ var CreateCartRequestCustomer_1 = require("./CreateCartRequestCustomer");
|
|
|
26
26
|
*/
|
|
27
27
|
exports.UpdateCartRequestSourceEnum = {
|
|
28
28
|
Checkout: 'checkout',
|
|
29
|
-
Admin: 'admin'
|
|
30
|
-
Phone: 'phone',
|
|
31
|
-
Email: 'email',
|
|
32
|
-
Ebay: 'ebay',
|
|
33
|
-
InStore: 'in_store'
|
|
29
|
+
Admin: 'admin'
|
|
34
30
|
};
|
|
35
31
|
/**
|
|
36
32
|
* @export
|
|
@@ -101,10 +101,6 @@ export interface UpdateOrderRequest {
|
|
|
101
101
|
export declare const UpdateOrderRequestSourceEnum: {
|
|
102
102
|
readonly Checkout: "checkout";
|
|
103
103
|
readonly Admin: "admin";
|
|
104
|
-
readonly Phone: "phone";
|
|
105
|
-
readonly Email: "email";
|
|
106
|
-
readonly Ebay: "ebay";
|
|
107
|
-
readonly InStore: "in_store";
|
|
108
104
|
};
|
|
109
105
|
export type UpdateOrderRequestSourceEnum = typeof UpdateOrderRequestSourceEnum[keyof typeof UpdateOrderRequestSourceEnum];
|
|
110
106
|
/**
|
|
@@ -25,11 +25,7 @@ var CreateCartRequestShippingAddress_1 = require("./CreateCartRequestShippingAdd
|
|
|
25
25
|
*/
|
|
26
26
|
exports.UpdateOrderRequestSourceEnum = {
|
|
27
27
|
Checkout: 'checkout',
|
|
28
|
-
Admin: 'admin'
|
|
29
|
-
Phone: 'phone',
|
|
30
|
-
Email: 'email',
|
|
31
|
-
Ebay: 'ebay',
|
|
32
|
-
InStore: 'in_store'
|
|
28
|
+
Admin: 'admin'
|
|
33
29
|
};
|
|
34
30
|
/**
|
|
35
31
|
* @export
|
package/dist/models/index.d.ts
CHANGED
|
@@ -225,7 +225,6 @@ export * from './OrderListResource';
|
|
|
225
225
|
export * from './OrderListResourceArrayResponse';
|
|
226
226
|
export * from './OrderLiteResource';
|
|
227
227
|
export * from './OrderLiteResourceArrayResponse';
|
|
228
|
-
export * from './OrderOmnisendEvent';
|
|
229
228
|
export * from './OrderStatusLiteResource';
|
|
230
229
|
export * from './OrderStatusLiteResourceArrayResponse';
|
|
231
230
|
export * from './OrderStatusWithCountResource';
|
package/dist/models/index.js
CHANGED
|
@@ -243,7 +243,6 @@ __exportStar(require("./OrderListResource"), exports);
|
|
|
243
243
|
__exportStar(require("./OrderListResourceArrayResponse"), exports);
|
|
244
244
|
__exportStar(require("./OrderLiteResource"), exports);
|
|
245
245
|
__exportStar(require("./OrderLiteResourceArrayResponse"), exports);
|
|
246
|
-
__exportStar(require("./OrderOmnisendEvent"), exports);
|
|
247
246
|
__exportStar(require("./OrderStatusLiteResource"), exports);
|
|
248
247
|
__exportStar(require("./OrderStatusLiteResourceArrayResponse"), exports);
|
|
249
248
|
__exportStar(require("./OrderStatusWithCountResource"), exports);
|
|
@@ -7,16 +7,12 @@
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`id` | number
|
|
10
|
-
`cartId` | number
|
|
11
10
|
`placedAt` | Date
|
|
12
11
|
`createdAt` | Date
|
|
13
|
-
`updatedAt` | Date
|
|
14
12
|
`source` | string
|
|
15
13
|
`netsuiteId` | string
|
|
16
|
-
`isNetsuiteLocked` | boolean
|
|
17
14
|
`subtotal` | number
|
|
18
15
|
`finalTotalAmount` | number
|
|
19
|
-
`cartStatusContext` | string
|
|
20
16
|
`site` | [SiteLiteResource](SiteLiteResource.md)
|
|
21
17
|
`customer` | [CustomerListResource](CustomerListResource.md)
|
|
22
18
|
`status` | [OrderStatusLiteResource](OrderStatusLiteResource.md)
|
|
@@ -31,16 +27,12 @@ import type { OrderListResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
|
31
27
|
// TODO: Update the object below with actual values
|
|
32
28
|
const example = {
|
|
33
29
|
"id": null,
|
|
34
|
-
"cartId": null,
|
|
35
30
|
"placedAt": null,
|
|
36
31
|
"createdAt": null,
|
|
37
|
-
"updatedAt": null,
|
|
38
32
|
"source": null,
|
|
39
33
|
"netsuiteId": null,
|
|
40
|
-
"isNetsuiteLocked": null,
|
|
41
34
|
"subtotal": null,
|
|
42
35
|
"finalTotalAmount": null,
|
|
43
|
-
"cartStatusContext": null,
|
|
44
36
|
"site": null,
|
|
45
37
|
"customer": null,
|
|
46
38
|
"status": null,
|
package/package.json
CHANGED
|
@@ -36,7 +36,7 @@ export interface AddressFrontendResource {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof AddressFrontendResource
|
|
38
38
|
*/
|
|
39
|
-
line2
|
|
39
|
+
line2?: string | null;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
@@ -75,7 +75,6 @@ export interface AddressFrontendResource {
|
|
|
75
75
|
export function instanceOfAddressFrontendResource(value: object): value is AddressFrontendResource {
|
|
76
76
|
if (!('company' in value) || value['company'] === undefined) return false;
|
|
77
77
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
78
|
-
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
79
78
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
80
79
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
81
80
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -96,7 +95,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
96
95
|
|
|
97
96
|
'company': json['company'],
|
|
98
97
|
'line1': json['line1'],
|
|
99
|
-
'line2': json['line2'],
|
|
98
|
+
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
100
99
|
'postcode': json['postcode'],
|
|
101
100
|
'suburb': json['suburb'],
|
|
102
101
|
'country': json['country'],
|
|
@@ -42,7 +42,7 @@ export interface AddressResource {
|
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof AddressResource
|
|
44
44
|
*/
|
|
45
|
-
company
|
|
45
|
+
company: string;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {string}
|
|
@@ -54,7 +54,7 @@ export interface AddressResource {
|
|
|
54
54
|
* @type {string}
|
|
55
55
|
* @memberof AddressResource
|
|
56
56
|
*/
|
|
57
|
-
line2
|
|
57
|
+
line2: string;
|
|
58
58
|
/**
|
|
59
59
|
*
|
|
60
60
|
* @type {string}
|
|
@@ -92,7 +92,9 @@ export interface AddressResource {
|
|
|
92
92
|
*/
|
|
93
93
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
94
94
|
if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
|
|
95
|
+
if (!('company' in value) || value['company'] === undefined) return false;
|
|
95
96
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
97
|
+
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
96
98
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
97
99
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
98
100
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -112,16 +114,16 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
112
114
|
return {
|
|
113
115
|
|
|
114
116
|
'id': json['id'] == null ? undefined : json['id'],
|
|
115
|
-
'sourceAddressId': json['
|
|
116
|
-
'addresseeName': json['
|
|
117
|
-
'company': json['company']
|
|
118
|
-
'line1': json['
|
|
119
|
-
'line2': json['
|
|
117
|
+
'sourceAddressId': json['sourceAddressId'] == null ? undefined : json['sourceAddressId'],
|
|
118
|
+
'addresseeName': json['addresseeName'],
|
|
119
|
+
'company': json['company'],
|
|
120
|
+
'line1': json['line1'],
|
|
121
|
+
'line2': json['line2'],
|
|
120
122
|
'postcode': json['postcode'],
|
|
121
123
|
'suburb': json['suburb'],
|
|
122
124
|
'country': json['country'],
|
|
123
125
|
'state': json['state'],
|
|
124
|
-
'fullAddress': json['
|
|
126
|
+
'fullAddress': json['fullAddress'],
|
|
125
127
|
};
|
|
126
128
|
}
|
|
127
129
|
|
|
@@ -137,16 +139,16 @@ export function AddressResourceToJSONTyped(value?: AddressResource | null, ignor
|
|
|
137
139
|
return {
|
|
138
140
|
|
|
139
141
|
'id': value['id'],
|
|
140
|
-
'
|
|
141
|
-
'
|
|
142
|
+
'sourceAddressId': value['sourceAddressId'],
|
|
143
|
+
'addresseeName': value['addresseeName'],
|
|
142
144
|
'company': value['company'],
|
|
143
|
-
'
|
|
144
|
-
'
|
|
145
|
+
'line1': value['line1'],
|
|
146
|
+
'line2': value['line2'],
|
|
145
147
|
'postcode': value['postcode'],
|
|
146
148
|
'suburb': value['suburb'],
|
|
147
149
|
'country': value['country'],
|
|
148
150
|
'state': value['state'],
|
|
149
|
-
'
|
|
151
|
+
'fullAddress': value['fullAddress'],
|
|
150
152
|
};
|
|
151
153
|
}
|
|
152
154
|
|
|
@@ -420,50 +420,50 @@ export function AdminOrderResourceFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
420
420
|
return {
|
|
421
421
|
|
|
422
422
|
'id': json['id'],
|
|
423
|
-
'cartId': json['
|
|
424
|
-
'placedAt': (new Date(json['
|
|
425
|
-
'createdAt': json['
|
|
426
|
-
'updatedAt': json['
|
|
423
|
+
'cartId': json['cartId'] == null ? undefined : json['cartId'],
|
|
424
|
+
'placedAt': (new Date(json['placedAt'])),
|
|
425
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
426
|
+
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
427
427
|
'source': json['source'],
|
|
428
|
-
'paymentToken': json['
|
|
429
|
-
'shippingType': json['
|
|
430
|
-
'shippingSubtotal': json['
|
|
431
|
-
'overrideShipping': json['
|
|
432
|
-
'insuranceAmount': json['
|
|
433
|
-
'includeInsurance': json['
|
|
434
|
-
'overrideInsurance': json['
|
|
435
|
-
'useAsBillingAddress': json['
|
|
436
|
-
'netsuiteId': json['
|
|
437
|
-
'isNetsuiteLocked': json['
|
|
438
|
-
'isDisabled': json['
|
|
439
|
-
'omnisendId': json['
|
|
428
|
+
'paymentToken': json['paymentToken'] == null ? undefined : json['paymentToken'],
|
|
429
|
+
'shippingType': json['shippingType'],
|
|
430
|
+
'shippingSubtotal': json['shippingSubtotal'] == null ? undefined : json['shippingSubtotal'],
|
|
431
|
+
'overrideShipping': json['overrideShipping'],
|
|
432
|
+
'insuranceAmount': json['insuranceAmount'],
|
|
433
|
+
'includeInsurance': json['includeInsurance'],
|
|
434
|
+
'overrideInsurance': json['overrideInsurance'],
|
|
435
|
+
'useAsBillingAddress': json['useAsBillingAddress'],
|
|
436
|
+
'netsuiteId': json['netsuiteId'],
|
|
437
|
+
'isNetsuiteLocked': json['isNetsuiteLocked'],
|
|
438
|
+
'isDisabled': json['isDisabled'],
|
|
439
|
+
'omnisendId': json['omnisendId'],
|
|
440
440
|
'subtotal': json['subtotal'],
|
|
441
|
-
'productDiscountAmount': json['
|
|
442
|
-
'subtotalDiscountAmount': json['
|
|
443
|
-
'shippingDiscountAmount': json['
|
|
444
|
-
'shippingAmount': json['
|
|
441
|
+
'productDiscountAmount': json['productDiscountAmount'],
|
|
442
|
+
'subtotalDiscountAmount': json['subtotalDiscountAmount'],
|
|
443
|
+
'shippingDiscountAmount': json['shippingDiscountAmount'],
|
|
444
|
+
'shippingAmount': json['shippingAmount'],
|
|
445
445
|
'total': json['total'],
|
|
446
|
-
'discountAmount': json['
|
|
447
|
-
'finalTotalAmount': json['
|
|
448
|
-
'totalAmount': json['
|
|
449
|
-
'totalShipping': json['
|
|
450
|
-
'grandTotal': json['
|
|
451
|
-
'totalPaid': json['
|
|
452
|
-
'totalOutstanding': json['
|
|
453
|
-
'discountPreview': json['
|
|
454
|
-
'shippingEstimate': json['
|
|
455
|
-
'insuranceEstimate': json['
|
|
446
|
+
'discountAmount': json['discountAmount'],
|
|
447
|
+
'finalTotalAmount': json['finalTotalAmount'],
|
|
448
|
+
'totalAmount': json['totalAmount'],
|
|
449
|
+
'totalShipping': json['totalShipping'],
|
|
450
|
+
'grandTotal': json['grandTotal'],
|
|
451
|
+
'totalPaid': json['totalPaid'],
|
|
452
|
+
'totalOutstanding': json['totalOutstanding'],
|
|
453
|
+
'discountPreview': json['discountPreview'],
|
|
454
|
+
'shippingEstimate': json['shippingEstimate'],
|
|
455
|
+
'insuranceEstimate': json['insuranceEstimate'],
|
|
456
456
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
457
457
|
'customer': CustomerListResourceFromJSON(json['customer']),
|
|
458
458
|
'admin': LiAdminUserLiteResourceFromJSON(json['admin']),
|
|
459
459
|
'status': OrderStatusLiteResourceFromJSON(json['status']),
|
|
460
|
-
'lineItems': (json['
|
|
460
|
+
'lineItems': (json['lineItems'] == null ? null : (json['lineItems'] as Array<any>).map(LineItemListResourceFromJSON)),
|
|
461
461
|
'coupons': (json['coupons'] == null ? null : (json['coupons'] as Array<any>).map(CartCouponResourceFromJSON)),
|
|
462
462
|
'discounts': (json['discounts'] == null ? null : (json['discounts'] as Array<any>).map(DiscountResourceFromJSON)),
|
|
463
463
|
'transactions': (json['transactions'] == null ? null : (json['transactions'] as Array<any>).map(TransactionLiteResourceFromJSON)),
|
|
464
|
-
'shippingAddress': AddressResourceFromJSON(json['
|
|
465
|
-
'billingAddress': AddressResourceFromJSON(json['
|
|
466
|
-
'omnisendSync': OmnisendSyncLiteResourceFromJSON(json['
|
|
464
|
+
'shippingAddress': AddressResourceFromJSON(json['shippingAddress']),
|
|
465
|
+
'billingAddress': AddressResourceFromJSON(json['billingAddress']),
|
|
466
|
+
'omnisendSync': OmnisendSyncLiteResourceFromJSON(json['omnisendSync']),
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
469
|
|
|
@@ -479,50 +479,50 @@ export function AdminOrderResourceToJSONTyped(value?: AdminOrderResource | null,
|
|
|
479
479
|
return {
|
|
480
480
|
|
|
481
481
|
'id': value['id'],
|
|
482
|
-
'
|
|
483
|
-
'
|
|
484
|
-
'
|
|
485
|
-
'
|
|
482
|
+
'cartId': value['cartId'],
|
|
483
|
+
'placedAt': value['placedAt'].toISOString(),
|
|
484
|
+
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
485
|
+
'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
486
486
|
'source': value['source'],
|
|
487
|
-
'
|
|
488
|
-
'
|
|
489
|
-
'
|
|
490
|
-
'
|
|
491
|
-
'
|
|
492
|
-
'
|
|
493
|
-
'
|
|
494
|
-
'
|
|
495
|
-
'
|
|
496
|
-
'
|
|
497
|
-
'
|
|
498
|
-
'
|
|
487
|
+
'paymentToken': value['paymentToken'],
|
|
488
|
+
'shippingType': value['shippingType'],
|
|
489
|
+
'shippingSubtotal': value['shippingSubtotal'],
|
|
490
|
+
'overrideShipping': value['overrideShipping'],
|
|
491
|
+
'insuranceAmount': value['insuranceAmount'],
|
|
492
|
+
'includeInsurance': value['includeInsurance'],
|
|
493
|
+
'overrideInsurance': value['overrideInsurance'],
|
|
494
|
+
'useAsBillingAddress': value['useAsBillingAddress'],
|
|
495
|
+
'netsuiteId': value['netsuiteId'],
|
|
496
|
+
'isNetsuiteLocked': value['isNetsuiteLocked'],
|
|
497
|
+
'isDisabled': value['isDisabled'],
|
|
498
|
+
'omnisendId': value['omnisendId'],
|
|
499
499
|
'subtotal': value['subtotal'],
|
|
500
|
-
'
|
|
501
|
-
'
|
|
502
|
-
'
|
|
503
|
-
'
|
|
500
|
+
'productDiscountAmount': value['productDiscountAmount'],
|
|
501
|
+
'subtotalDiscountAmount': value['subtotalDiscountAmount'],
|
|
502
|
+
'shippingDiscountAmount': value['shippingDiscountAmount'],
|
|
503
|
+
'shippingAmount': value['shippingAmount'],
|
|
504
504
|
'total': value['total'],
|
|
505
|
-
'
|
|
506
|
-
'
|
|
507
|
-
'
|
|
508
|
-
'
|
|
509
|
-
'
|
|
510
|
-
'
|
|
511
|
-
'
|
|
512
|
-
'
|
|
513
|
-
'
|
|
514
|
-
'
|
|
505
|
+
'discountAmount': value['discountAmount'],
|
|
506
|
+
'finalTotalAmount': value['finalTotalAmount'],
|
|
507
|
+
'totalAmount': value['totalAmount'],
|
|
508
|
+
'totalShipping': value['totalShipping'],
|
|
509
|
+
'grandTotal': value['grandTotal'],
|
|
510
|
+
'totalPaid': value['totalPaid'],
|
|
511
|
+
'totalOutstanding': value['totalOutstanding'],
|
|
512
|
+
'discountPreview': value['discountPreview'],
|
|
513
|
+
'shippingEstimate': value['shippingEstimate'],
|
|
514
|
+
'insuranceEstimate': value['insuranceEstimate'],
|
|
515
515
|
'site': SiteLiteResourceToJSON(value['site']),
|
|
516
516
|
'customer': CustomerListResourceToJSON(value['customer']),
|
|
517
517
|
'admin': LiAdminUserLiteResourceToJSON(value['admin']),
|
|
518
518
|
'status': OrderStatusLiteResourceToJSON(value['status']),
|
|
519
|
-
'
|
|
519
|
+
'lineItems': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(LineItemListResourceToJSON)),
|
|
520
520
|
'coupons': (value['coupons'] == null ? null : (value['coupons'] as Array<any>).map(CartCouponResourceToJSON)),
|
|
521
521
|
'discounts': (value['discounts'] == null ? null : (value['discounts'] as Array<any>).map(DiscountResourceToJSON)),
|
|
522
522
|
'transactions': (value['transactions'] == null ? null : (value['transactions'] as Array<any>).map(TransactionLiteResourceToJSON)),
|
|
523
|
-
'
|
|
524
|
-
'
|
|
525
|
-
'
|
|
523
|
+
'shippingAddress': AddressResourceToJSON(value['shippingAddress']),
|
|
524
|
+
'billingAddress': AddressResourceToJSON(value['billingAddress']),
|
|
525
|
+
'omnisendSync': OmnisendSyncLiteResourceToJSON(value['omnisendSync']),
|
|
526
526
|
};
|
|
527
527
|
}
|
|
528
528
|
|
|
@@ -69,7 +69,7 @@ export function CartCouponResourceFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
69
69
|
'id': json['id'],
|
|
70
70
|
'code': json['code'],
|
|
71
71
|
'name': json['name'],
|
|
72
|
-
'discountTotal': json['
|
|
72
|
+
'discountTotal': json['discountTotal'],
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -87,7 +87,7 @@ export function CartCouponResourceToJSONTyped(value?: CartCouponResource | null,
|
|
|
87
87
|
'id': value['id'],
|
|
88
88
|
'code': value['code'],
|
|
89
89
|
'name': value['name'],
|
|
90
|
-
'
|
|
90
|
+
'discountTotal': value['discountTotal'],
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
|