@digital8/lighting-illusions-ts-sdk 0.0.1860 → 0.0.1862

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/.openapi-generator/FILES +14 -0
  2. package/README.md +10 -3
  3. package/dist/apis/CartsApi.d.ts +6 -6
  4. package/dist/apis/CartsApi.js +3 -5
  5. package/dist/models/AddressFrontendResource.d.ts +2 -2
  6. package/dist/models/AddressFrontendResource.js +6 -2
  7. package/dist/models/AddressResource.d.ts +2 -2
  8. package/dist/models/AddressResource.js +3 -5
  9. package/dist/models/AttachCouponCartRequest.d.ts +2 -2
  10. package/dist/models/AttachCouponCartRequest.js +3 -3
  11. package/dist/models/CartResource.d.ts +34 -4
  12. package/dist/models/CartResource.js +32 -10
  13. package/dist/models/DetachCouponCartRequest.d.ts +32 -0
  14. package/dist/models/DetachCouponCartRequest.js +51 -0
  15. package/dist/models/DiscountType.d.ts +26 -0
  16. package/dist/models/DiscountType.js +52 -0
  17. package/dist/models/DiscountValueType.d.ts +25 -0
  18. package/dist/models/DiscountValueType.js +51 -0
  19. package/dist/models/ExternalApiLogResource.d.ts +1 -1
  20. package/dist/models/ExternalApiLogResource.js +1 -3
  21. package/dist/models/LineItemDiscountResource.d.ts +44 -0
  22. package/dist/models/LineItemDiscountResource.js +59 -0
  23. package/dist/models/LineItemDiscountResourceArrayResponse.d.ts +33 -0
  24. package/dist/models/LineItemDiscountResourceArrayResponse.js +50 -0
  25. package/dist/models/LineItemListResource.d.ts +27 -3
  26. package/dist/models/LineItemListResource.js +19 -3
  27. package/dist/models/ProductChildCartLiteResource.d.ts +70 -0
  28. package/dist/models/ProductChildCartLiteResource.js +77 -0
  29. package/dist/models/ProductChildCartLiteResourceArrayResponse.d.ts +33 -0
  30. package/dist/models/ProductChildCartLiteResourceArrayResponse.js +50 -0
  31. package/dist/models/StoreFrontendResource.d.ts +1 -1
  32. package/dist/models/StoreFrontendResource.js +3 -1
  33. package/dist/models/StoreResource.d.ts +1 -1
  34. package/dist/models/StoreResource.js +3 -1
  35. package/dist/models/index.d.ts +7 -0
  36. package/dist/models/index.js +7 -0
  37. package/docs/AddressResource.md +2 -2
  38. package/docs/AttachCouponCartRequest.md +2 -2
  39. package/docs/CartResource.md +16 -6
  40. package/docs/CartsApi.md +8 -8
  41. package/docs/DetachCouponCartRequest.md +34 -0
  42. package/docs/DiscountType.md +32 -0
  43. package/docs/DiscountValueType.md +32 -0
  44. package/docs/LineItemDiscountResource.md +38 -0
  45. package/docs/LineItemDiscountResourceArrayResponse.md +34 -0
  46. package/docs/LineItemListResource.md +9 -1
  47. package/docs/ProductChildCartLiteResource.md +46 -0
  48. package/docs/ProductChildCartLiteResourceArrayResponse.md +34 -0
  49. package/package.json +1 -1
  50. package/src/apis/CartsApi.ts +12 -14
  51. package/src/models/AddressFrontendResource.ts +6 -4
  52. package/src/models/AddressResource.ts +5 -6
  53. package/src/models/AttachCouponCartRequest.ts +5 -5
  54. package/src/models/CartResource.ts +60 -14
  55. package/src/models/DetachCouponCartRequest.ts +66 -0
  56. package/src/models/DiscountType.ts +54 -0
  57. package/src/models/DiscountValueType.ts +53 -0
  58. package/src/models/ExternalApiLogResource.ts +2 -3
  59. package/src/models/LineItemDiscountResource.ts +84 -0
  60. package/src/models/LineItemDiscountResourceArrayResponse.ts +73 -0
  61. package/src/models/LineItemListResource.ts +46 -10
  62. package/src/models/ProductChildCartLiteResource.ts +135 -0
  63. package/src/models/ProductChildCartLiteResourceArrayResponse.ts +73 -0
  64. package/src/models/StoreFrontendResource.ts +3 -2
  65. package/src/models/StoreResource.ts +3 -2
  66. package/src/models/index.ts +7 -0
@@ -30,7 +30,7 @@ export interface AddressResource {
30
30
  * @type {string}
31
31
  * @memberof AddressResource
32
32
  */
33
- sourceLiAddressId?: string | null;
33
+ sourceAddressId?: string | null;
34
34
  /**
35
35
  *
36
36
  * @type {string}
@@ -48,7 +48,7 @@ export interface AddressResource {
48
48
  * @type {string}
49
49
  * @memberof AddressResource
50
50
  */
51
- line2: string;
51
+ line2?: string | null;
52
52
  /**
53
53
  *
54
54
  * @type {string}
@@ -87,7 +87,6 @@ export interface AddressResource {
87
87
  export function instanceOfAddressResource(value: object): value is AddressResource {
88
88
  if (!('company' in value) || value['company'] === undefined) return false;
89
89
  if (!('line1' in value) || value['line1'] === undefined) return false;
90
- if (!('line2' in value) || value['line2'] === undefined) return false;
91
90
  if (!('postcode' in value) || value['postcode'] === undefined) return false;
92
91
  if (!('suburb' in value) || value['suburb'] === undefined) return false;
93
92
  if (!('country' in value) || value['country'] === undefined) return false;
@@ -107,10 +106,10 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
107
106
  return {
108
107
 
109
108
  'id': json['id'] == null ? undefined : json['id'],
110
- 'sourceLiAddressId': json['source_li_address_id'] == null ? undefined : json['source_li_address_id'],
109
+ 'sourceAddressId': json['source_address_id'] == null ? undefined : json['source_address_id'],
111
110
  'company': json['company'],
112
111
  'line1': json['line_1'],
113
- 'line2': json['line_2'],
112
+ 'line2': json['line_2'] == null ? undefined : json['line_2'],
114
113
  'postcode': json['postcode'],
115
114
  'suburb': json['suburb'],
116
115
  'country': json['country'],
@@ -131,7 +130,7 @@ export function AddressResourceToJSONTyped(value?: AddressResource | null, ignor
131
130
  return {
132
131
 
133
132
  'id': value['id'],
134
- 'source_li_address_id': value['sourceLiAddressId'],
133
+ 'source_address_id': value['sourceAddressId'],
135
134
  'company': value['company'],
136
135
  'line_1': value['line1'],
137
136
  'line_2': value['line2'],
@@ -21,17 +21,17 @@ import { mapValues } from '../runtime';
21
21
  export interface AttachCouponCartRequest {
22
22
  /**
23
23
  *
24
- * @type {number}
24
+ * @type {Array<number>}
25
25
  * @memberof AttachCouponCartRequest
26
26
  */
27
- couponId: number;
27
+ couponIds: Array<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 (!('couponId' in value) || value['couponId'] === undefined) return false;
34
+ if (!('couponIds' in value) || value['couponIds'] === 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
- 'couponId': json['coupon_id'],
48
+ 'couponIds': json['coupon_ids'],
49
49
  };
50
50
  }
51
51
 
@@ -60,7 +60,7 @@ export function AttachCouponCartRequestToJSONTyped(value?: AttachCouponCartReque
60
60
 
61
61
  return {
62
62
 
63
- 'coupon_id': value['couponId'],
63
+ 'coupon_ids': value['couponIds'],
64
64
  };
65
65
  }
66
66
 
@@ -143,7 +143,7 @@ export interface CartResource {
143
143
  * @type {number}
144
144
  * @memberof CartResource
145
145
  */
146
- insuranceAmount?: number | null;
146
+ insuranceAmount: number;
147
147
  /**
148
148
  *
149
149
  * @type {boolean}
@@ -198,6 +198,12 @@ export interface CartResource {
198
198
  * @memberof CartResource
199
199
  */
200
200
  billingAddress: AddressResource | null;
201
+ /**
202
+ *
203
+ * @type {number}
204
+ * @memberof CartResource
205
+ */
206
+ discountPreview: number;
201
207
  /**
202
208
  *
203
209
  * @type {number}
@@ -209,19 +215,43 @@ export interface CartResource {
209
215
  * @type {number}
210
216
  * @memberof CartResource
211
217
  */
212
- discountPreview: number;
218
+ shippingAmount: number;
219
+ /**
220
+ *
221
+ * @type {number}
222
+ * @memberof CartResource
223
+ */
224
+ total: number;
225
+ /**
226
+ *
227
+ * @type {number}
228
+ * @memberof CartResource
229
+ */
230
+ discountAmount: number;
213
231
  /**
214
232
  *
215
233
  * @type {number}
216
234
  * @memberof CartResource
217
235
  */
218
- shippingEstimate: number;
236
+ productDiscountAmount: number;
219
237
  /**
220
238
  *
221
239
  * @type {number}
222
240
  * @memberof CartResource
223
241
  */
224
- insuranceEstimate: number;
242
+ shippingDiscountAmount: number;
243
+ /**
244
+ *
245
+ * @type {number}
246
+ * @memberof CartResource
247
+ */
248
+ cartDiscountAmount: number;
249
+ /**
250
+ *
251
+ * @type {number}
252
+ * @memberof CartResource
253
+ */
254
+ finalTotalAmount: number;
225
255
  /**
226
256
  *
227
257
  * @type {string}
@@ -239,6 +269,7 @@ export function instanceOfCartResource(value: object): value is CartResource {
239
269
  if (!('expiryDate' in value) || value['expiryDate'] === undefined) return false;
240
270
  if (!('shippingType' in value) || value['shippingType'] === undefined) return false;
241
271
  if (!('overrideShipping' in value) || value['overrideShipping'] === undefined) return false;
272
+ if (!('insuranceAmount' in value) || value['insuranceAmount'] === undefined) return false;
242
273
  if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined) return false;
243
274
  if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined) return false;
244
275
  if (!('admin' in value) || value['admin'] === undefined) return false;
@@ -248,10 +279,15 @@ export function instanceOfCartResource(value: object): value is CartResource {
248
279
  if (!('coupons' in value) || value['coupons'] === undefined) return false;
249
280
  if (!('shippingAddress' in value) || value['shippingAddress'] === undefined) return false;
250
281
  if (!('billingAddress' in value) || value['billingAddress'] === undefined) return false;
251
- if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
252
282
  if (!('discountPreview' in value) || value['discountPreview'] === undefined) return false;
253
- if (!('shippingEstimate' in value) || value['shippingEstimate'] === undefined) return false;
254
- if (!('insuranceEstimate' in value) || value['insuranceEstimate'] === undefined) return false;
283
+ if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
284
+ if (!('shippingAmount' in value) || value['shippingAmount'] === undefined) return false;
285
+ if (!('total' in value) || value['total'] === undefined) return false;
286
+ if (!('discountAmount' in value) || value['discountAmount'] === undefined) return false;
287
+ if (!('productDiscountAmount' in value) || value['productDiscountAmount'] === undefined) return false;
288
+ if (!('shippingDiscountAmount' in value) || value['shippingDiscountAmount'] === undefined) return false;
289
+ if (!('cartDiscountAmount' in value) || value['cartDiscountAmount'] === undefined) return false;
290
+ if (!('finalTotalAmount' in value) || value['finalTotalAmount'] === undefined) return false;
255
291
  if (!('status' in value) || value['status'] === undefined) return false;
256
292
  return true;
257
293
  }
@@ -281,7 +317,7 @@ export function CartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolea
281
317
  'shippingType': json['shipping_type'],
282
318
  'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
283
319
  'overrideShipping': json['override_shipping'],
284
- 'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
320
+ 'insuranceAmount': json['insurance_amount'],
285
321
  'overrideInsurance': json['override_insurance'],
286
322
  'useAsBillingAddress': json['use_as_billing_address'],
287
323
  'admin': json['admin'],
@@ -291,10 +327,15 @@ export function CartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolea
291
327
  'coupons': json['coupons'],
292
328
  'shippingAddress': AddressResourceFromJSON(json['shipping_address']),
293
329
  'billingAddress': AddressResourceFromJSON(json['billing_address']),
294
- 'subtotal': json['subtotal'],
295
330
  'discountPreview': json['discount_preview'],
296
- 'shippingEstimate': json['shipping_estimate'],
297
- 'insuranceEstimate': json['insurance_estimate'],
331
+ 'subtotal': json['subtotal'],
332
+ 'shippingAmount': json['shipping_amount'],
333
+ 'total': json['total'],
334
+ 'discountAmount': json['discount_amount'],
335
+ 'productDiscountAmount': json['product_discount_amount'],
336
+ 'shippingDiscountAmount': json['shipping_discount_amount'],
337
+ 'cartDiscountAmount': json['cart_discount_amount'],
338
+ 'finalTotalAmount': json['final_total_amount'],
298
339
  'status': json['status'],
299
340
  };
300
341
  }
@@ -335,10 +376,15 @@ export function CartResourceToJSONTyped(value?: CartResource | null, ignoreDiscr
335
376
  'coupons': value['coupons'],
336
377
  'shipping_address': AddressResourceToJSON(value['shippingAddress']),
337
378
  'billing_address': AddressResourceToJSON(value['billingAddress']),
338
- 'subtotal': value['subtotal'],
339
379
  'discount_preview': value['discountPreview'],
340
- 'shipping_estimate': value['shippingEstimate'],
341
- 'insurance_estimate': value['insuranceEstimate'],
380
+ 'subtotal': value['subtotal'],
381
+ 'shipping_amount': value['shippingAmount'],
382
+ 'total': value['total'],
383
+ 'discount_amount': value['discountAmount'],
384
+ 'product_discount_amount': value['productDiscountAmount'],
385
+ 'shipping_discount_amount': value['shippingDiscountAmount'],
386
+ 'cart_discount_amount': value['cartDiscountAmount'],
387
+ 'final_total_amount': value['finalTotalAmount'],
342
388
  'status': value['status'],
343
389
  };
344
390
  }
@@ -0,0 +1,66 @@
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 DetachCouponCartRequest
20
+ */
21
+ export interface DetachCouponCartRequest {
22
+ /**
23
+ *
24
+ * @type {Array<number>}
25
+ * @memberof DetachCouponCartRequest
26
+ */
27
+ couponIds: Array<number>;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the DetachCouponCartRequest interface.
32
+ */
33
+ export function instanceOfDetachCouponCartRequest(value: object): value is DetachCouponCartRequest {
34
+ if (!('couponIds' in value) || value['couponIds'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function DetachCouponCartRequestFromJSON(json: any): DetachCouponCartRequest {
39
+ return DetachCouponCartRequestFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function DetachCouponCartRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DetachCouponCartRequest {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'couponIds': json['coupon_ids'],
49
+ };
50
+ }
51
+
52
+ export function DetachCouponCartRequestToJSON(json: any): DetachCouponCartRequest {
53
+ return DetachCouponCartRequestToJSONTyped(json, false);
54
+ }
55
+
56
+ export function DetachCouponCartRequestToJSONTyped(value?: DetachCouponCartRequest | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'coupon_ids': value['couponIds'],
64
+ };
65
+ }
66
+
@@ -0,0 +1,54 @@
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
+
16
+ /**
17
+ *
18
+ * @export
19
+ */
20
+ export const DiscountType = {
21
+ Shipping: 'shipping',
22
+ Subtotal: 'subtotal',
23
+ Product: 'product'
24
+ } as const;
25
+ export type DiscountType = typeof DiscountType[keyof typeof DiscountType];
26
+
27
+
28
+ export function instanceOfDiscountType(value: any): boolean {
29
+ for (const key in DiscountType) {
30
+ if (Object.prototype.hasOwnProperty.call(DiscountType, key)) {
31
+ if (DiscountType[key as keyof typeof DiscountType] === value) {
32
+ return true;
33
+ }
34
+ }
35
+ }
36
+ return false;
37
+ }
38
+
39
+ export function DiscountTypeFromJSON(json: any): DiscountType {
40
+ return DiscountTypeFromJSONTyped(json, false);
41
+ }
42
+
43
+ export function DiscountTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DiscountType {
44
+ return json as DiscountType;
45
+ }
46
+
47
+ export function DiscountTypeToJSON(value?: DiscountType | null): any {
48
+ return value as any;
49
+ }
50
+
51
+ export function DiscountTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): DiscountType {
52
+ return value as DiscountType;
53
+ }
54
+
@@ -0,0 +1,53 @@
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
+
16
+ /**
17
+ *
18
+ * @export
19
+ */
20
+ export const DiscountValueType = {
21
+ FixedValue: 'fixed_value',
22
+ Percentage: 'percentage'
23
+ } as const;
24
+ export type DiscountValueType = typeof DiscountValueType[keyof typeof DiscountValueType];
25
+
26
+
27
+ export function instanceOfDiscountValueType(value: any): boolean {
28
+ for (const key in DiscountValueType) {
29
+ if (Object.prototype.hasOwnProperty.call(DiscountValueType, key)) {
30
+ if (DiscountValueType[key as keyof typeof DiscountValueType] === value) {
31
+ return true;
32
+ }
33
+ }
34
+ }
35
+ return false;
36
+ }
37
+
38
+ export function DiscountValueTypeFromJSON(json: any): DiscountValueType {
39
+ return DiscountValueTypeFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function DiscountValueTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DiscountValueType {
43
+ return json as DiscountValueType;
44
+ }
45
+
46
+ export function DiscountValueTypeToJSON(value?: DiscountValueType | null): any {
47
+ return value as any;
48
+ }
49
+
50
+ export function DiscountValueTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): DiscountValueType {
51
+ return value as DiscountValueType;
52
+ }
53
+
@@ -74,7 +74,7 @@ export interface ExternalApiLogResource {
74
74
  * @type {string}
75
75
  * @memberof ExternalApiLogResource
76
76
  */
77
- requestPayload: string;
77
+ requestPayload?: string | null;
78
78
  /**
79
79
  *
80
80
  * @type {string}
@@ -106,7 +106,6 @@ export function instanceOfExternalApiLogResource(value: object): value is Extern
106
106
  if (!('exteranlApiLoggableId' in value) || value['exteranlApiLoggableId'] === undefined) return false;
107
107
  if (!('endpoint' in value) || value['endpoint'] === undefined) return false;
108
108
  if (!('responseCode' in value) || value['responseCode'] === undefined) return false;
109
- if (!('requestPayload' in value) || value['requestPayload'] === undefined) return false;
110
109
  if (!('responsePayload' in value) || value['responsePayload'] === undefined) return false;
111
110
  if (!('site' in value) || value['site'] === undefined) return false;
112
111
  return true;
@@ -129,7 +128,7 @@ export function ExternalApiLogResourceFromJSONTyped(json: any, ignoreDiscriminat
129
128
  'exteranlApiLoggableId': json['exteranlApiLoggableId'],
130
129
  'endpoint': json['endpoint'],
131
130
  'responseCode': json['responseCode'],
132
- 'requestPayload': json['requestPayload'],
131
+ 'requestPayload': json['requestPayload'] == null ? undefined : json['requestPayload'],
133
132
  'responsePayload': json['responsePayload'],
134
133
  'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
135
134
  'site': SiteLiteResourceFromJSON(json['site']),
@@ -0,0 +1,84 @@
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 LineItemDiscountResource
20
+ */
21
+ export interface LineItemDiscountResource {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof LineItemDiscountResource
26
+ */
27
+ id: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof LineItemDiscountResource
32
+ */
33
+ name: string;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof LineItemDiscountResource
38
+ */
39
+ discountTotal: number;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the LineItemDiscountResource interface.
44
+ */
45
+ export function instanceOfLineItemDiscountResource(value: object): value is LineItemDiscountResource {
46
+ if (!('id' in value) || value['id'] === undefined) return false;
47
+ if (!('name' in value) || value['name'] === undefined) return false;
48
+ if (!('discountTotal' in value) || value['discountTotal'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function LineItemDiscountResourceFromJSON(json: any): LineItemDiscountResource {
53
+ return LineItemDiscountResourceFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function LineItemDiscountResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): LineItemDiscountResource {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'id': json['id'],
63
+ 'name': json['name'],
64
+ 'discountTotal': json['discount_total'],
65
+ };
66
+ }
67
+
68
+ export function LineItemDiscountResourceToJSON(json: any): LineItemDiscountResource {
69
+ return LineItemDiscountResourceToJSONTyped(json, false);
70
+ }
71
+
72
+ export function LineItemDiscountResourceToJSONTyped(value?: LineItemDiscountResource | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'id': value['id'],
80
+ 'name': value['name'],
81
+ 'discount_total': value['discountTotal'],
82
+ };
83
+ }
84
+
@@ -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
+ import type { LineItemDiscountResource } from './LineItemDiscountResource';
17
+ import {
18
+ LineItemDiscountResourceFromJSON,
19
+ LineItemDiscountResourceFromJSONTyped,
20
+ LineItemDiscountResourceToJSON,
21
+ LineItemDiscountResourceToJSONTyped,
22
+ } from './LineItemDiscountResource';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface LineItemDiscountResourceArrayResponse
28
+ */
29
+ export interface LineItemDiscountResourceArrayResponse {
30
+ /**
31
+ *
32
+ * @type {Array<LineItemDiscountResource>}
33
+ * @memberof LineItemDiscountResourceArrayResponse
34
+ */
35
+ data?: Array<LineItemDiscountResource>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the LineItemDiscountResourceArrayResponse interface.
40
+ */
41
+ export function instanceOfLineItemDiscountResourceArrayResponse(value: object): value is LineItemDiscountResourceArrayResponse {
42
+ return true;
43
+ }
44
+
45
+ export function LineItemDiscountResourceArrayResponseFromJSON(json: any): LineItemDiscountResourceArrayResponse {
46
+ return LineItemDiscountResourceArrayResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function LineItemDiscountResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LineItemDiscountResourceArrayResponse {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(LineItemDiscountResourceFromJSON)),
56
+ };
57
+ }
58
+
59
+ export function LineItemDiscountResourceArrayResponseToJSON(json: any): LineItemDiscountResourceArrayResponse {
60
+ return LineItemDiscountResourceArrayResponseToJSONTyped(json, false);
61
+ }
62
+
63
+ export function LineItemDiscountResourceArrayResponseToJSONTyped(value?: LineItemDiscountResourceArrayResponse | null, ignoreDiscriminator: boolean = false): any {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+
68
+ return {
69
+
70
+ 'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(LineItemDiscountResourceToJSON)),
71
+ };
72
+ }
73
+
@@ -13,13 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { ProductChildListResource } from './ProductChildListResource';
16
+ import type { ProductChildCartLiteResource } from './ProductChildCartLiteResource';
17
17
  import {
18
- ProductChildListResourceFromJSON,
19
- ProductChildListResourceFromJSONTyped,
20
- ProductChildListResourceToJSON,
21
- ProductChildListResourceToJSONTyped,
22
- } from './ProductChildListResource';
18
+ ProductChildCartLiteResourceFromJSON,
19
+ ProductChildCartLiteResourceFromJSONTyped,
20
+ ProductChildCartLiteResourceToJSON,
21
+ ProductChildCartLiteResourceToJSONTyped,
22
+ } from './ProductChildCartLiteResource';
23
23
 
24
24
  /**
25
25
  *
@@ -47,10 +47,34 @@ export interface LineItemListResource {
47
47
  productPrice: number;
48
48
  /**
49
49
  *
50
- * @type {ProductChildListResource}
50
+ * @type {number}
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 {object}
69
+ * @memberof LineItemListResource
70
+ */
71
+ discounts: object;
72
+ /**
73
+ *
74
+ * @type {ProductChildCartLiteResource}
51
75
  * @memberof LineItemListResource
52
76
  */
53
- productChild: ProductChildListResource | null;
77
+ productChild: ProductChildCartLiteResource | null;
54
78
  }
55
79
 
56
80
  /**
@@ -59,6 +83,10 @@ export interface LineItemListResource {
59
83
  export function instanceOfLineItemListResource(value: object): value is LineItemListResource {
60
84
  if (!('quantity' in value) || value['quantity'] === undefined) return false;
61
85
  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;
62
90
  if (!('productChild' in value) || value['productChild'] === undefined) return false;
63
91
  return true;
64
92
  }
@@ -76,7 +104,11 @@ export function LineItemListResourceFromJSONTyped(json: any, ignoreDiscriminator
76
104
  'id': json['id'] == null ? undefined : json['id'],
77
105
  'quantity': json['quantity'],
78
106
  'productPrice': json['product_price'],
79
- 'productChild': ProductChildListResourceFromJSON(json['product_child']),
107
+ 'productDiscount': json['product_discount'],
108
+ 'totalDiscount': json['total_discount'],
109
+ 'lineSubtotal': json['line_subtotal'],
110
+ 'discounts': json['discounts'],
111
+ 'productChild': ProductChildCartLiteResourceFromJSON(json['product_child']),
80
112
  };
81
113
  }
82
114
 
@@ -94,7 +126,11 @@ export function LineItemListResourceToJSONTyped(value?: LineItemListResource | n
94
126
  'id': value['id'],
95
127
  'quantity': value['quantity'],
96
128
  'product_price': value['productPrice'],
97
- 'product_child': ProductChildListResourceToJSON(value['productChild']),
129
+ 'product_discount': value['productDiscount'],
130
+ 'total_discount': value['totalDiscount'],
131
+ 'line_subtotal': value['lineSubtotal'],
132
+ 'discounts': value['discounts'],
133
+ 'product_child': ProductChildCartLiteResourceToJSON(value['productChild']),
98
134
  };
99
135
  }
100
136