@digital8/lighting-illusions-ts-sdk 0.0.1839 → 0.0.1840
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 +10 -10
- package/README.md +8 -8
- package/dist/apis/CartsApi.d.ts +6 -6
- package/dist/apis/CartsApi.js +5 -3
- package/dist/apis/CouponsApi.d.ts +33 -0
- package/dist/apis/CouponsApi.js +138 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +3 -1
- package/dist/models/AdminCartResource.d.ts +4 -34
- package/dist/models/AdminCartResource.js +10 -32
- package/dist/models/AttachCouponCartRequest.d.ts +2 -2
- package/dist/models/AttachCouponCartRequest.js +3 -3
- package/dist/models/FrontendCartResource.d.ts +0 -12
- package/dist/models/FrontendCartResource.js +0 -8
- package/dist/models/LineItemListResource.d.ts +3 -27
- package/dist/models/LineItemListResource.js +3 -19
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +1 -3
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +3 -1
- package/dist/models/StoreResource.d.ts +2 -2
- package/dist/models/StoreResource.js +2 -6
- package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateFrontendResource.js +1 -3
- package/dist/models/VerifyCouponRequest.d.ts +63 -0
- package/dist/models/VerifyCouponRequest.js +64 -0
- package/dist/models/VerifyCouponRequestProductsInner.d.ts +38 -0
- package/dist/models/VerifyCouponRequestProductsInner.js +51 -0
- package/dist/models/VerifyCouponResource.d.ts +38 -0
- package/dist/models/VerifyCouponResource.js +55 -0
- package/dist/models/VerifyCouponResourceArrayResponse.d.ts +33 -0
- package/dist/models/VerifyCouponResourceArrayResponse.js +50 -0
- package/dist/models/index.d.ts +4 -5
- package/dist/models/index.js +4 -5
- package/docs/AdminCartResource.md +6 -16
- package/docs/AttachCouponCartRequest.md +2 -2
- package/docs/CartsApi.md +8 -8
- package/docs/CouponsApi.md +74 -0
- package/docs/FrontendCartResource.md +0 -4
- package/docs/LineItemListResource.md +1 -9
- package/docs/StoreSpecialDateFrontendResource.md +1 -1
- package/docs/VerifyCouponRequest.md +44 -0
- package/docs/{DiscountValueType.md → VerifyCouponRequestProductsInner.md} +8 -4
- package/docs/{DetachCouponCartRequest.md → VerifyCouponResource.md} +8 -6
- package/docs/{DiscountType.md → VerifyCouponResourceArrayResponse.md} +6 -4
- package/package.json +1 -1
- package/src/apis/CartsApi.ts +14 -12
- package/src/apis/CouponsApi.ts +77 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AddressResource.ts +3 -2
- package/src/models/AdminCartResource.ts +14 -60
- package/src/models/AttachCouponCartRequest.ts +5 -5
- package/src/models/FrontendCartResource.ts +0 -18
- package/src/models/LineItemListResource.ts +10 -46
- package/src/models/StoreFrontendResource.ts +2 -3
- package/src/models/StoreListResource.ts +3 -2
- package/src/models/StoreResource.ts +4 -6
- package/src/models/StoreSpecialDateFrontendResource.ts +3 -4
- package/src/models/VerifyCouponRequest.ts +115 -0
- package/src/models/VerifyCouponRequestProductsInner.ts +73 -0
- package/src/models/VerifyCouponResource.ts +75 -0
- package/src/models/VerifyCouponResourceArrayResponse.ts +73 -0
- package/src/models/index.ts +4 -5
- package/dist/models/DetachCouponCartRequest.d.ts +0 -32
- package/dist/models/DetachCouponCartRequest.js +0 -51
- package/dist/models/DiscountType.d.ts +0 -26
- package/dist/models/DiscountType.js +0 -52
- package/dist/models/DiscountValueType.d.ts +0 -25
- package/dist/models/DiscountValueType.js +0 -51
- package/dist/models/ProductChildCartLiteResource.d.ts +0 -70
- package/dist/models/ProductChildCartLiteResource.js +0 -77
- package/dist/models/ProductChildCartLiteResourceArrayResponse.d.ts +0 -33
- package/dist/models/ProductChildCartLiteResourceArrayResponse.js +0 -50
- package/docs/ProductChildCartLiteResource.md +0 -46
- package/docs/ProductChildCartLiteResourceArrayResponse.md +0 -34
- package/src/models/DetachCouponCartRequest.ts +0 -66
- package/src/models/DiscountType.ts +0 -54
- package/src/models/DiscountValueType.ts +0 -53
- package/src/models/ProductChildCartLiteResource.ts +0 -135
- package/src/models/ProductChildCartLiteResourceArrayResponse.ts +0 -73
|
@@ -42,7 +42,7 @@ export interface AddressResource {
|
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof AddressResource
|
|
44
44
|
*/
|
|
45
|
-
line2
|
|
45
|
+
line2: string;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {string}
|
|
@@ -80,6 +80,7 @@ export interface AddressResource {
|
|
|
80
80
|
*/
|
|
81
81
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
82
82
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
83
|
+
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
83
84
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
84
85
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
85
86
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -101,7 +102,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
101
102
|
'id': json['id'] == null ? undefined : json['id'],
|
|
102
103
|
'company': json['company'] == null ? undefined : json['company'],
|
|
103
104
|
'line1': json['line_1'],
|
|
104
|
-
'line2': json['line_2']
|
|
105
|
+
'line2': json['line_2'],
|
|
105
106
|
'postcode': json['postcode'],
|
|
106
107
|
'suburb': json['suburb'],
|
|
107
108
|
'country': json['country'],
|
|
@@ -137,7 +137,7 @@ export interface AdminCartResource {
|
|
|
137
137
|
* @type {number}
|
|
138
138
|
* @memberof AdminCartResource
|
|
139
139
|
*/
|
|
140
|
-
insuranceAmount
|
|
140
|
+
insuranceAmount?: number | null;
|
|
141
141
|
/**
|
|
142
142
|
*
|
|
143
143
|
* @type {boolean}
|
|
@@ -192,12 +192,6 @@ export interface AdminCartResource {
|
|
|
192
192
|
* @memberof AdminCartResource
|
|
193
193
|
*/
|
|
194
194
|
billingAddress: AddressResource | null;
|
|
195
|
-
/**
|
|
196
|
-
*
|
|
197
|
-
* @type {number}
|
|
198
|
-
* @memberof AdminCartResource
|
|
199
|
-
*/
|
|
200
|
-
discountPreview: number;
|
|
201
195
|
/**
|
|
202
196
|
*
|
|
203
197
|
* @type {number}
|
|
@@ -209,43 +203,19 @@ export interface AdminCartResource {
|
|
|
209
203
|
* @type {number}
|
|
210
204
|
* @memberof AdminCartResource
|
|
211
205
|
*/
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
*
|
|
215
|
-
* @type {number}
|
|
216
|
-
* @memberof AdminCartResource
|
|
217
|
-
*/
|
|
218
|
-
total: number;
|
|
219
|
-
/**
|
|
220
|
-
*
|
|
221
|
-
* @type {number}
|
|
222
|
-
* @memberof AdminCartResource
|
|
223
|
-
*/
|
|
224
|
-
discountAmount: number;
|
|
225
|
-
/**
|
|
226
|
-
*
|
|
227
|
-
* @type {number}
|
|
228
|
-
* @memberof AdminCartResource
|
|
229
|
-
*/
|
|
230
|
-
productDiscountAmount: number;
|
|
231
|
-
/**
|
|
232
|
-
*
|
|
233
|
-
* @type {number}
|
|
234
|
-
* @memberof AdminCartResource
|
|
235
|
-
*/
|
|
236
|
-
shippingDiscountAmount: number;
|
|
206
|
+
discountPreview: number;
|
|
237
207
|
/**
|
|
238
208
|
*
|
|
239
209
|
* @type {number}
|
|
240
210
|
* @memberof AdminCartResource
|
|
241
211
|
*/
|
|
242
|
-
|
|
212
|
+
shippingEstimate: number;
|
|
243
213
|
/**
|
|
244
214
|
*
|
|
245
215
|
* @type {number}
|
|
246
216
|
* @memberof AdminCartResource
|
|
247
217
|
*/
|
|
248
|
-
|
|
218
|
+
insuranceEstimate: number;
|
|
249
219
|
/**
|
|
250
220
|
*
|
|
251
221
|
* @type {string}
|
|
@@ -263,7 +233,6 @@ export function instanceOfAdminCartResource(value: object): value is AdminCartRe
|
|
|
263
233
|
if (!('expiryDate' in value) || value['expiryDate'] === undefined) return false;
|
|
264
234
|
if (!('shippingType' in value) || value['shippingType'] === undefined) return false;
|
|
265
235
|
if (!('overrideShipping' in value) || value['overrideShipping'] === undefined) return false;
|
|
266
|
-
if (!('insuranceAmount' in value) || value['insuranceAmount'] === undefined) return false;
|
|
267
236
|
if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined) return false;
|
|
268
237
|
if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined) return false;
|
|
269
238
|
if (!('admin' in value) || value['admin'] === undefined) return false;
|
|
@@ -273,15 +242,10 @@ export function instanceOfAdminCartResource(value: object): value is AdminCartRe
|
|
|
273
242
|
if (!('coupons' in value) || value['coupons'] === undefined) return false;
|
|
274
243
|
if (!('shippingAddress' in value) || value['shippingAddress'] === undefined) return false;
|
|
275
244
|
if (!('billingAddress' in value) || value['billingAddress'] === undefined) return false;
|
|
276
|
-
if (!('discountPreview' in value) || value['discountPreview'] === undefined) return false;
|
|
277
245
|
if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
|
|
278
|
-
if (!('
|
|
279
|
-
if (!('
|
|
280
|
-
if (!('
|
|
281
|
-
if (!('productDiscountAmount' in value) || value['productDiscountAmount'] === undefined) return false;
|
|
282
|
-
if (!('shippingDiscountAmount' in value) || value['shippingDiscountAmount'] === undefined) return false;
|
|
283
|
-
if (!('cartDiscountAmount' in value) || value['cartDiscountAmount'] === undefined) return false;
|
|
284
|
-
if (!('finalTotalAmount' in value) || value['finalTotalAmount'] === undefined) return false;
|
|
246
|
+
if (!('discountPreview' in value) || value['discountPreview'] === undefined) return false;
|
|
247
|
+
if (!('shippingEstimate' in value) || value['shippingEstimate'] === undefined) return false;
|
|
248
|
+
if (!('insuranceEstimate' in value) || value['insuranceEstimate'] === undefined) return false;
|
|
285
249
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
286
250
|
return true;
|
|
287
251
|
}
|
|
@@ -310,7 +274,7 @@ export function AdminCartResourceFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
310
274
|
'shippingType': json['shipping_type'],
|
|
311
275
|
'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
|
|
312
276
|
'overrideShipping': json['override_shipping'],
|
|
313
|
-
'insuranceAmount': json['insurance_amount'],
|
|
277
|
+
'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
|
|
314
278
|
'overrideInsurance': json['override_insurance'],
|
|
315
279
|
'useAsBillingAddress': json['use_as_billing_address'],
|
|
316
280
|
'admin': json['admin'],
|
|
@@ -320,15 +284,10 @@ export function AdminCartResourceFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
320
284
|
'coupons': json['coupons'],
|
|
321
285
|
'shippingAddress': AddressResourceFromJSON(json['shipping_address']),
|
|
322
286
|
'billingAddress': AddressResourceFromJSON(json['billing_address']),
|
|
323
|
-
'discountPreview': json['discount_preview'],
|
|
324
287
|
'subtotal': json['subtotal'],
|
|
325
|
-
'
|
|
326
|
-
'
|
|
327
|
-
'
|
|
328
|
-
'productDiscountAmount': json['product_discount_amount'],
|
|
329
|
-
'shippingDiscountAmount': json['shipping_discount_amount'],
|
|
330
|
-
'cartDiscountAmount': json['cart_discount_amount'],
|
|
331
|
-
'finalTotalAmount': json['final_total_amount'],
|
|
288
|
+
'discountPreview': json['discount_preview'],
|
|
289
|
+
'shippingEstimate': json['shipping_estimate'],
|
|
290
|
+
'insuranceEstimate': json['insurance_estimate'],
|
|
332
291
|
'status': json['status'],
|
|
333
292
|
};
|
|
334
293
|
}
|
|
@@ -368,15 +327,10 @@ export function AdminCartResourceToJSONTyped(value?: AdminCartResource | null, i
|
|
|
368
327
|
'coupons': value['coupons'],
|
|
369
328
|
'shipping_address': AddressResourceToJSON(value['shippingAddress']),
|
|
370
329
|
'billing_address': AddressResourceToJSON(value['billingAddress']),
|
|
371
|
-
'discount_preview': value['discountPreview'],
|
|
372
330
|
'subtotal': value['subtotal'],
|
|
373
|
-
'
|
|
374
|
-
'
|
|
375
|
-
'
|
|
376
|
-
'product_discount_amount': value['productDiscountAmount'],
|
|
377
|
-
'shipping_discount_amount': value['shippingDiscountAmount'],
|
|
378
|
-
'cart_discount_amount': value['cartDiscountAmount'],
|
|
379
|
-
'final_total_amount': value['finalTotalAmount'],
|
|
331
|
+
'discount_preview': value['discountPreview'],
|
|
332
|
+
'shipping_estimate': value['shippingEstimate'],
|
|
333
|
+
'insurance_estimate': value['insuranceEstimate'],
|
|
380
334
|
'status': value['status'],
|
|
381
335
|
};
|
|
382
336
|
}
|
|
@@ -21,17 +21,17 @@ import { mapValues } from '../runtime';
|
|
|
21
21
|
export interface AttachCouponCartRequest {
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
|
-
* @type {
|
|
24
|
+
* @type {number}
|
|
25
25
|
* @memberof AttachCouponCartRequest
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
couponId: number;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Check if a given object implements the AttachCouponCartRequest interface.
|
|
32
32
|
*/
|
|
33
33
|
export function instanceOfAttachCouponCartRequest(value: object): value is AttachCouponCartRequest {
|
|
34
|
-
if (!('
|
|
34
|
+
if (!('couponId' in value) || value['couponId'] === undefined) return false;
|
|
35
35
|
return true;
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -45,7 +45,7 @@ export function AttachCouponCartRequestFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
45
45
|
}
|
|
46
46
|
return {
|
|
47
47
|
|
|
48
|
-
'
|
|
48
|
+
'couponId': json['coupon_id'],
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -60,7 +60,7 @@ export function AttachCouponCartRequestToJSONTyped(value?: AttachCouponCartReque
|
|
|
60
60
|
|
|
61
61
|
return {
|
|
62
62
|
|
|
63
|
-
'
|
|
63
|
+
'coupon_id': value['couponId'],
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -162,18 +162,6 @@ export interface FrontendCartResource {
|
|
|
162
162
|
* @memberof FrontendCartResource
|
|
163
163
|
*/
|
|
164
164
|
discountPreview: number;
|
|
165
|
-
/**
|
|
166
|
-
*
|
|
167
|
-
* @type {number}
|
|
168
|
-
* @memberof FrontendCartResource
|
|
169
|
-
*/
|
|
170
|
-
totalSubtotalDiscount: number;
|
|
171
|
-
/**
|
|
172
|
-
*
|
|
173
|
-
* @type {number}
|
|
174
|
-
* @memberof FrontendCartResource
|
|
175
|
-
*/
|
|
176
|
-
totalShippingDiscount: number;
|
|
177
165
|
/**
|
|
178
166
|
*
|
|
179
167
|
* @type {number}
|
|
@@ -210,8 +198,6 @@ export function instanceOfFrontendCartResource(value: object): value is Frontend
|
|
|
210
198
|
if (!('billingAddress' in value) || value['billingAddress'] === undefined) return false;
|
|
211
199
|
if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
|
|
212
200
|
if (!('discountPreview' in value) || value['discountPreview'] === undefined) return false;
|
|
213
|
-
if (!('totalSubtotalDiscount' in value) || value['totalSubtotalDiscount'] === undefined) return false;
|
|
214
|
-
if (!('totalShippingDiscount' in value) || value['totalShippingDiscount'] === undefined) return false;
|
|
215
201
|
if (!('shippingEstimate' in value) || value['shippingEstimate'] === undefined) return false;
|
|
216
202
|
if (!('insuranceEstimate' in value) || value['insuranceEstimate'] === undefined) return false;
|
|
217
203
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
@@ -247,8 +233,6 @@ export function FrontendCartResourceFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
247
233
|
'billingAddress': AddressResourceFromJSON(json['billing_address']),
|
|
248
234
|
'subtotal': json['subtotal'],
|
|
249
235
|
'discountPreview': json['discount_preview'],
|
|
250
|
-
'totalSubtotalDiscount': json['total_subtotal_discount'],
|
|
251
|
-
'totalShippingDiscount': json['total_shipping_discount'],
|
|
252
236
|
'shippingEstimate': json['shipping_estimate'],
|
|
253
237
|
'insuranceEstimate': json['insurance_estimate'],
|
|
254
238
|
'status': json['status'],
|
|
@@ -285,8 +269,6 @@ export function FrontendCartResourceToJSONTyped(value?: FrontendCartResource | n
|
|
|
285
269
|
'billing_address': AddressResourceToJSON(value['billingAddress']),
|
|
286
270
|
'subtotal': value['subtotal'],
|
|
287
271
|
'discount_preview': value['discountPreview'],
|
|
288
|
-
'total_subtotal_discount': value['totalSubtotalDiscount'],
|
|
289
|
-
'total_shipping_discount': value['totalShippingDiscount'],
|
|
290
272
|
'shipping_estimate': value['shippingEstimate'],
|
|
291
273
|
'insurance_estimate': value['insuranceEstimate'],
|
|
292
274
|
'status': value['status'],
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { ProductChildListResource } from './ProductChildListResource';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './
|
|
18
|
+
ProductChildListResourceFromJSON,
|
|
19
|
+
ProductChildListResourceFromJSONTyped,
|
|
20
|
+
ProductChildListResourceToJSON,
|
|
21
|
+
ProductChildListResourceToJSONTyped,
|
|
22
|
+
} from './ProductChildListResource';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
@@ -47,34 +47,10 @@ export interface LineItemListResource {
|
|
|
47
47
|
productPrice: number;
|
|
48
48
|
/**
|
|
49
49
|
*
|
|
50
|
-
* @type {
|
|
51
|
-
* @memberof LineItemListResource
|
|
52
|
-
*/
|
|
53
|
-
productDiscount: number;
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* @type {number}
|
|
57
|
-
* @memberof LineItemListResource
|
|
58
|
-
*/
|
|
59
|
-
totalDiscount: number;
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
* @type {number}
|
|
63
|
-
* @memberof LineItemListResource
|
|
64
|
-
*/
|
|
65
|
-
lineSubtotal: number;
|
|
66
|
-
/**
|
|
67
|
-
*
|
|
68
|
-
* @type {Array<boolean>}
|
|
69
|
-
* @memberof LineItemListResource
|
|
70
|
-
*/
|
|
71
|
-
discounts: Array<boolean>;
|
|
72
|
-
/**
|
|
73
|
-
*
|
|
74
|
-
* @type {ProductChildCartLiteResource}
|
|
50
|
+
* @type {ProductChildListResource}
|
|
75
51
|
* @memberof LineItemListResource
|
|
76
52
|
*/
|
|
77
|
-
productChild:
|
|
53
|
+
productChild: ProductChildListResource | null;
|
|
78
54
|
}
|
|
79
55
|
|
|
80
56
|
/**
|
|
@@ -83,10 +59,6 @@ export interface LineItemListResource {
|
|
|
83
59
|
export function instanceOfLineItemListResource(value: object): value is LineItemListResource {
|
|
84
60
|
if (!('quantity' in value) || value['quantity'] === undefined) return false;
|
|
85
61
|
if (!('productPrice' in value) || value['productPrice'] === undefined) return false;
|
|
86
|
-
if (!('productDiscount' in value) || value['productDiscount'] === undefined) return false;
|
|
87
|
-
if (!('totalDiscount' in value) || value['totalDiscount'] === undefined) return false;
|
|
88
|
-
if (!('lineSubtotal' in value) || value['lineSubtotal'] === undefined) return false;
|
|
89
|
-
if (!('discounts' in value) || value['discounts'] === undefined) return false;
|
|
90
62
|
if (!('productChild' in value) || value['productChild'] === undefined) return false;
|
|
91
63
|
return true;
|
|
92
64
|
}
|
|
@@ -104,11 +76,7 @@ export function LineItemListResourceFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
104
76
|
'id': json['id'] == null ? undefined : json['id'],
|
|
105
77
|
'quantity': json['quantity'],
|
|
106
78
|
'productPrice': json['product_price'],
|
|
107
|
-
'
|
|
108
|
-
'totalDiscount': json['total_discount'],
|
|
109
|
-
'lineSubtotal': json['line_subtotal'],
|
|
110
|
-
'discounts': json['discounts'],
|
|
111
|
-
'productChild': ProductChildCartLiteResourceFromJSON(json['product_child']),
|
|
79
|
+
'productChild': ProductChildListResourceFromJSON(json['product_child']),
|
|
112
80
|
};
|
|
113
81
|
}
|
|
114
82
|
|
|
@@ -126,11 +94,7 @@ export function LineItemListResourceToJSONTyped(value?: LineItemListResource | n
|
|
|
126
94
|
'id': value['id'],
|
|
127
95
|
'quantity': value['quantity'],
|
|
128
96
|
'product_price': value['productPrice'],
|
|
129
|
-
'
|
|
130
|
-
'total_discount': value['totalDiscount'],
|
|
131
|
-
'line_subtotal': value['lineSubtotal'],
|
|
132
|
-
'discounts': value['discounts'],
|
|
133
|
-
'product_child': ProductChildCartLiteResourceToJSON(value['productChild']),
|
|
97
|
+
'product_child': ProductChildListResourceToJSON(value['productChild']),
|
|
134
98
|
};
|
|
135
99
|
}
|
|
136
100
|
|
|
@@ -78,7 +78,7 @@ export interface StoreFrontendResource {
|
|
|
78
78
|
* @type {string}
|
|
79
79
|
* @memberof StoreFrontendResource
|
|
80
80
|
*/
|
|
81
|
-
tagLine
|
|
81
|
+
tagLine?: string | null;
|
|
82
82
|
/**
|
|
83
83
|
*
|
|
84
84
|
* @type {string}
|
|
@@ -109,7 +109,6 @@ export function instanceOfStoreFrontendResource(value: object): value is StoreFr
|
|
|
109
109
|
if (!('phone' in value) || value['phone'] === undefined) return false;
|
|
110
110
|
if (!('latitude' in value) || value['latitude'] === undefined) return false;
|
|
111
111
|
if (!('longitude' in value) || value['longitude'] === undefined) return false;
|
|
112
|
-
if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
|
|
113
112
|
if (!('specialDates' in value) || value['specialDates'] === undefined) return false;
|
|
114
113
|
if (!('suppliers' in value) || value['suppliers'] === undefined) return false;
|
|
115
114
|
return true;
|
|
@@ -134,7 +133,7 @@ export function StoreFrontendResourceFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
134
133
|
'address': json['address'] == null ? undefined : json['address'],
|
|
135
134
|
'latitude': json['latitude'],
|
|
136
135
|
'longitude': json['longitude'],
|
|
137
|
-
'tagLine': json['tagLine'],
|
|
136
|
+
'tagLine': json['tagLine'] == null ? undefined : json['tagLine'],
|
|
138
137
|
'openingHours': json['openingHours'] == null ? undefined : json['openingHours'],
|
|
139
138
|
'specialDates': json['specialDates'],
|
|
140
139
|
'suppliers': json['suppliers'],
|
|
@@ -80,7 +80,7 @@ export interface StoreListResource {
|
|
|
80
80
|
* @type {string}
|
|
81
81
|
* @memberof StoreListResource
|
|
82
82
|
*/
|
|
83
|
-
website
|
|
83
|
+
website: string;
|
|
84
84
|
/**
|
|
85
85
|
*
|
|
86
86
|
* @type {string}
|
|
@@ -100,6 +100,7 @@ export function instanceOfStoreListResource(value: object): value is StoreListRe
|
|
|
100
100
|
if (!('latitude' in value) || value['latitude'] === undefined) return false;
|
|
101
101
|
if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
|
|
102
102
|
if (!('email' in value) || value['email'] === undefined) return false;
|
|
103
|
+
if (!('website' in value) || value['website'] === undefined) return false;
|
|
103
104
|
return true;
|
|
104
105
|
}
|
|
105
106
|
|
|
@@ -121,7 +122,7 @@ export function StoreListResourceFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
121
122
|
'latitude': json['latitude'],
|
|
122
123
|
'tagLine': json['tag_line'],
|
|
123
124
|
'email': json['email'],
|
|
124
|
-
'website': json['website']
|
|
125
|
+
'website': json['website'],
|
|
125
126
|
'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
|
|
126
127
|
};
|
|
127
128
|
}
|
|
@@ -89,7 +89,7 @@ export interface StoreResource {
|
|
|
89
89
|
* @type {string}
|
|
90
90
|
* @memberof StoreResource
|
|
91
91
|
*/
|
|
92
|
-
tagLine
|
|
92
|
+
tagLine?: string | null;
|
|
93
93
|
/**
|
|
94
94
|
*
|
|
95
95
|
* @type {string}
|
|
@@ -101,7 +101,7 @@ export interface StoreResource {
|
|
|
101
101
|
* @type {string}
|
|
102
102
|
* @memberof StoreResource
|
|
103
103
|
*/
|
|
104
|
-
website
|
|
104
|
+
website?: string | null;
|
|
105
105
|
/**
|
|
106
106
|
*
|
|
107
107
|
* @type {string}
|
|
@@ -137,9 +137,7 @@ export function instanceOfStoreResource(value: object): value is StoreResource {
|
|
|
137
137
|
if (!('phone' in value) || value['phone'] === undefined) return false;
|
|
138
138
|
if (!('longitude' in value) || value['longitude'] === undefined) return false;
|
|
139
139
|
if (!('latitude' in value) || value['latitude'] === undefined) return false;
|
|
140
|
-
if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
|
|
141
140
|
if (!('email' in value) || value['email'] === undefined) return false;
|
|
142
|
-
if (!('website' in value) || value['website'] === undefined) return false;
|
|
143
141
|
if (!('suppliers' in value) || value['suppliers'] === undefined) return false;
|
|
144
142
|
if (!('address' in value) || value['address'] === undefined) return false;
|
|
145
143
|
if (!('specialDates' in value) || value['specialDates'] === undefined) return false;
|
|
@@ -162,9 +160,9 @@ export function StoreResourceFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
162
160
|
'phone': json['phone'],
|
|
163
161
|
'longitude': json['longitude'],
|
|
164
162
|
'latitude': json['latitude'],
|
|
165
|
-
'tagLine': json['tag_line'],
|
|
163
|
+
'tagLine': json['tag_line'] == null ? undefined : json['tag_line'],
|
|
166
164
|
'email': json['email'],
|
|
167
|
-
'website': json['website'],
|
|
165
|
+
'website': json['website'] == null ? undefined : json['website'],
|
|
168
166
|
'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
|
|
169
167
|
'suppliers': (json['suppliers'] == null ? null : (json['suppliers'] as Array<any>).map(SupplierLiteResourceFromJSON)),
|
|
170
168
|
'address': AddressResourceFromJSON(json['address']),
|
|
@@ -39,10 +39,10 @@ export interface StoreSpecialDateFrontendResource {
|
|
|
39
39
|
hours: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
|
-
* @type {
|
|
42
|
+
* @type {string}
|
|
43
43
|
* @memberof StoreSpecialDateFrontendResource
|
|
44
44
|
*/
|
|
45
|
-
date
|
|
45
|
+
date?: string | null;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {boolean}
|
|
@@ -69,7 +69,6 @@ export interface StoreSpecialDateFrontendResource {
|
|
|
69
69
|
export function instanceOfStoreSpecialDateFrontendResource(value: object): value is StoreSpecialDateFrontendResource {
|
|
70
70
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
71
71
|
if (!('hours' in value) || value['hours'] === undefined) return false;
|
|
72
|
-
if (!('date' in value) || value['date'] === undefined) return false;
|
|
73
72
|
if (!('closed' in value) || value['closed'] === undefined) return false;
|
|
74
73
|
if (!('displayStartDate' in value) || value['displayStartDate'] === undefined) return false;
|
|
75
74
|
if (!('displayEndDate' in value) || value['displayEndDate'] === undefined) return false;
|
|
@@ -89,7 +88,7 @@ export function StoreSpecialDateFrontendResourceFromJSONTyped(json: any, ignoreD
|
|
|
89
88
|
'id': json['id'] == null ? undefined : json['id'],
|
|
90
89
|
'name': json['name'],
|
|
91
90
|
'hours': json['hours'],
|
|
92
|
-
'date': json['date'],
|
|
91
|
+
'date': json['date'] == null ? undefined : json['date'],
|
|
93
92
|
'closed': json['closed'],
|
|
94
93
|
'displayStartDate': json['displayStartDate'],
|
|
95
94
|
'displayEndDate': json['displayEndDate'],
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
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 { mapValues } from '../runtime';
|
|
16
|
+
import type { VerifyCouponRequestProductsInner } from './VerifyCouponRequestProductsInner';
|
|
17
|
+
import {
|
|
18
|
+
VerifyCouponRequestProductsInnerFromJSON,
|
|
19
|
+
VerifyCouponRequestProductsInnerFromJSONTyped,
|
|
20
|
+
VerifyCouponRequestProductsInnerToJSON,
|
|
21
|
+
VerifyCouponRequestProductsInnerToJSONTyped,
|
|
22
|
+
} from './VerifyCouponRequestProductsInner';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface VerifyCouponRequest
|
|
28
|
+
*/
|
|
29
|
+
export interface VerifyCouponRequest {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof VerifyCouponRequest
|
|
34
|
+
*/
|
|
35
|
+
siteId: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof VerifyCouponRequest
|
|
40
|
+
*/
|
|
41
|
+
customerId: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof VerifyCouponRequest
|
|
46
|
+
*/
|
|
47
|
+
cartId?: number | null;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {Array<VerifyCouponRequestProductsInner>}
|
|
51
|
+
* @memberof VerifyCouponRequest
|
|
52
|
+
*/
|
|
53
|
+
products?: Array<VerifyCouponRequestProductsInner>;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof VerifyCouponRequest
|
|
58
|
+
*/
|
|
59
|
+
couponCode?: string | null;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {Array<number>}
|
|
63
|
+
* @memberof VerifyCouponRequest
|
|
64
|
+
*/
|
|
65
|
+
couponIds?: Array<number>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Check if a given object implements the VerifyCouponRequest interface.
|
|
70
|
+
*/
|
|
71
|
+
export function instanceOfVerifyCouponRequest(value: object): value is VerifyCouponRequest {
|
|
72
|
+
if (!('siteId' in value) || value['siteId'] === undefined) return false;
|
|
73
|
+
if (!('customerId' in value) || value['customerId'] === undefined) return false;
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function VerifyCouponRequestFromJSON(json: any): VerifyCouponRequest {
|
|
78
|
+
return VerifyCouponRequestFromJSONTyped(json, false);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function VerifyCouponRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifyCouponRequest {
|
|
82
|
+
if (json == null) {
|
|
83
|
+
return json;
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'siteId': json['site_id'],
|
|
88
|
+
'customerId': json['customer_id'],
|
|
89
|
+
'cartId': json['cart_id'] == null ? undefined : json['cart_id'],
|
|
90
|
+
'products': json['products'] == null ? undefined : ((json['products'] as Array<any>).map(VerifyCouponRequestProductsInnerFromJSON)),
|
|
91
|
+
'couponCode': json['coupon_code'] == null ? undefined : json['coupon_code'],
|
|
92
|
+
'couponIds': json['coupon_ids'] == null ? undefined : json['coupon_ids'],
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function VerifyCouponRequestToJSON(json: any): VerifyCouponRequest {
|
|
97
|
+
return VerifyCouponRequestToJSONTyped(json, false);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function VerifyCouponRequestToJSONTyped(value?: VerifyCouponRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
101
|
+
if (value == null) {
|
|
102
|
+
return value;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return {
|
|
106
|
+
|
|
107
|
+
'site_id': value['siteId'],
|
|
108
|
+
'customer_id': value['customerId'],
|
|
109
|
+
'cart_id': value['cartId'],
|
|
110
|
+
'products': value['products'] == null ? undefined : ((value['products'] as Array<any>).map(VerifyCouponRequestProductsInnerToJSON)),
|
|
111
|
+
'coupon_code': value['couponCode'],
|
|
112
|
+
'coupon_ids': value['couponIds'],
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
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 { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface VerifyCouponRequestProductsInner
|
|
20
|
+
*/
|
|
21
|
+
export interface VerifyCouponRequestProductsInner {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof VerifyCouponRequestProductsInner
|
|
26
|
+
*/
|
|
27
|
+
productChildId?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof VerifyCouponRequestProductsInner
|
|
32
|
+
*/
|
|
33
|
+
quantity?: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the VerifyCouponRequestProductsInner interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfVerifyCouponRequestProductsInner(value: object): value is VerifyCouponRequestProductsInner {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function VerifyCouponRequestProductsInnerFromJSON(json: any): VerifyCouponRequestProductsInner {
|
|
44
|
+
return VerifyCouponRequestProductsInnerFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function VerifyCouponRequestProductsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifyCouponRequestProductsInner {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'productChildId': json['product_child_id'] == null ? undefined : json['product_child_id'],
|
|
54
|
+
'quantity': json['quantity'] == null ? undefined : json['quantity'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function VerifyCouponRequestProductsInnerToJSON(json: any): VerifyCouponRequestProductsInner {
|
|
59
|
+
return VerifyCouponRequestProductsInnerToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function VerifyCouponRequestProductsInnerToJSONTyped(value?: VerifyCouponRequestProductsInner | null, ignoreDiscriminator: boolean = false): any {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'product_child_id': value['productChildId'],
|
|
70
|
+
'quantity': value['quantity'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|