@digital8/lighting-illusions-ts-sdk 0.0.2018 → 0.0.2019

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 (70) hide show
  1. package/.openapi-generator/FILES +0 -16
  2. package/README.md +2 -10
  3. package/dist/models/AddressFrontendResource.d.ts +2 -2
  4. package/dist/models/AddressFrontendResource.js +6 -2
  5. package/dist/models/AddressResource.d.ts +1 -1
  6. package/dist/models/AddressResource.js +3 -1
  7. package/dist/models/CartResource.d.ts +3 -2
  8. package/dist/models/CartResource.js +3 -2
  9. package/dist/models/CreateCartRequest.d.ts +12 -7
  10. package/dist/models/CreateCartRequest.js +7 -4
  11. package/dist/models/ProductChildCartLiteResource.d.ts +0 -18
  12. package/dist/models/ProductChildCartLiteResource.js +0 -12
  13. package/dist/models/SearchCartsRequest.d.ts +6 -15
  14. package/dist/models/SearchCartsRequest.js +3 -11
  15. package/dist/models/StoreListResource.d.ts +1 -1
  16. package/dist/models/StoreListResource.js +1 -3
  17. package/dist/models/StoreResource.d.ts +1 -1
  18. package/dist/models/StoreResource.js +3 -1
  19. package/dist/models/UpdateCartRequest.d.ts +18 -7
  20. package/dist/models/UpdateCartRequest.js +6 -3
  21. package/dist/models/index.d.ts +0 -8
  22. package/dist/models/index.js +0 -8
  23. package/docs/CartResource.md +1 -1
  24. package/docs/CreateCartRequest.md +4 -2
  25. package/docs/ProductChildCartLiteResource.md +0 -6
  26. package/docs/SearchCartsRequest.md +2 -2
  27. package/docs/UpdateCartRequest.md +6 -2
  28. package/package.json +1 -1
  29. package/src/models/AddressFrontendResource.ts +6 -4
  30. package/src/models/AddressResource.ts +3 -2
  31. package/src/models/CartResource.ts +11 -4
  32. package/src/models/CreateCartRequest.ts +18 -16
  33. package/src/models/ProductChildCartLiteResource.ts +0 -27
  34. package/src/models/SearchCartsRequest.ts +8 -18
  35. package/src/models/StoreListResource.ts +2 -3
  36. package/src/models/StoreResource.ts +3 -2
  37. package/src/models/UpdateCartRequest.ts +24 -15
  38. package/src/models/index.ts +0 -8
  39. package/dist/models/CartCouponLiteResource.d.ts +0 -56
  40. package/dist/models/CartCouponLiteResource.js +0 -67
  41. package/dist/models/CartCouponLiteResourceArrayResponse.d.ts +0 -33
  42. package/dist/models/CartCouponLiteResourceArrayResponse.js +0 -50
  43. package/dist/models/CreateCartRequestCustomer.d.ts +0 -50
  44. package/dist/models/CreateCartRequestCustomer.js +0 -55
  45. package/dist/models/FrontendCartResource.d.ts +0 -138
  46. package/dist/models/FrontendCartResource.js +0 -119
  47. package/dist/models/FrontendCartResourceArrayResponse.d.ts +0 -33
  48. package/dist/models/FrontendCartResourceArrayResponse.js +0 -50
  49. package/dist/models/FrontendCartResourceCouponsInner.d.ts +0 -56
  50. package/dist/models/FrontendCartResourceCouponsInner.js +0 -57
  51. package/dist/models/FrontendLineItemResource.d.ts +0 -75
  52. package/dist/models/FrontendLineItemResource.js +0 -78
  53. package/dist/models/FrontendLineItemResourceArrayResponse.d.ts +0 -33
  54. package/dist/models/FrontendLineItemResourceArrayResponse.js +0 -50
  55. package/docs/CartCouponLiteResource.md +0 -42
  56. package/docs/CartCouponLiteResourceArrayResponse.md +0 -34
  57. package/docs/CreateCartRequestCustomer.md +0 -40
  58. package/docs/FrontendCartResource.md +0 -68
  59. package/docs/FrontendCartResourceArrayResponse.md +0 -34
  60. package/docs/FrontendCartResourceCouponsInner.md +0 -42
  61. package/docs/FrontendLineItemResource.md +0 -48
  62. package/docs/FrontendLineItemResourceArrayResponse.md +0 -34
  63. package/src/models/CartCouponLiteResource.ts +0 -102
  64. package/src/models/CartCouponLiteResourceArrayResponse.ts +0 -73
  65. package/src/models/CreateCartRequestCustomer.ts +0 -89
  66. package/src/models/FrontendCartResource.ts +0 -246
  67. package/src/models/FrontendCartResourceArrayResponse.ts +0 -73
  68. package/src/models/FrontendCartResourceCouponsInner.ts +0 -97
  69. package/src/models/FrontendLineItemResource.ts +0 -136
  70. package/src/models/FrontendLineItemResourceArrayResponse.ts +0 -73
@@ -1,42 +0,0 @@
1
-
2
- # FrontendCartResourceCouponsInner
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `id` | number
10
- `code` | string
11
- `name` | string
12
- `discount` | number
13
- `appliesTo` | string
14
-
15
- ## Example
16
-
17
- ```typescript
18
- import type { FrontendCartResourceCouponsInner } from '@digital8/lighting-illusions-ts-sdk'
19
-
20
- // TODO: Update the object below with actual values
21
- const example = {
22
- "id": null,
23
- "code": null,
24
- "name": null,
25
- "discount": null,
26
- "appliesTo": null,
27
- } satisfies FrontendCartResourceCouponsInner
28
-
29
- console.log(example)
30
-
31
- // Convert the instance to a JSON string
32
- const exampleJSON: string = JSON.stringify(example)
33
- console.log(exampleJSON)
34
-
35
- // Parse the JSON string back to an object
36
- const exampleParsed = JSON.parse(exampleJSON) as FrontendCartResourceCouponsInner
37
- console.log(exampleParsed)
38
- ```
39
-
40
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
41
-
42
-
@@ -1,48 +0,0 @@
1
-
2
- # FrontendLineItemResource
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `id` | number
10
- `quantity` | number
11
- `productPrice` | number
12
- `subtotalAmount` | number
13
- `totalAmount` | number
14
- `isAvailable` | boolean
15
- `isInStock` | boolean
16
- `productChild` | [ProductChildCartLiteResource](ProductChildCartLiteResource.md)
17
-
18
- ## Example
19
-
20
- ```typescript
21
- import type { FrontendLineItemResource } from '@digital8/lighting-illusions-ts-sdk'
22
-
23
- // TODO: Update the object below with actual values
24
- const example = {
25
- "id": null,
26
- "quantity": null,
27
- "productPrice": null,
28
- "subtotalAmount": null,
29
- "totalAmount": null,
30
- "isAvailable": null,
31
- "isInStock": null,
32
- "productChild": null,
33
- } satisfies FrontendLineItemResource
34
-
35
- console.log(example)
36
-
37
- // Convert the instance to a JSON string
38
- const exampleJSON: string = JSON.stringify(example)
39
- console.log(exampleJSON)
40
-
41
- // Parse the JSON string back to an object
42
- const exampleParsed = JSON.parse(exampleJSON) as FrontendLineItemResource
43
- console.log(exampleParsed)
44
- ```
45
-
46
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
47
-
48
-
@@ -1,34 +0,0 @@
1
-
2
- # FrontendLineItemResourceArrayResponse
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `data` | [Array<FrontendLineItemResource>](FrontendLineItemResource.md)
10
-
11
- ## Example
12
-
13
- ```typescript
14
- import type { FrontendLineItemResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
15
-
16
- // TODO: Update the object below with actual values
17
- const example = {
18
- "data": null,
19
- } satisfies FrontendLineItemResourceArrayResponse
20
-
21
- console.log(example)
22
-
23
- // Convert the instance to a JSON string
24
- const exampleJSON: string = JSON.stringify(example)
25
- console.log(exampleJSON)
26
-
27
- // Parse the JSON string back to an object
28
- const exampleParsed = JSON.parse(exampleJSON) as FrontendLineItemResourceArrayResponse
29
- console.log(exampleParsed)
30
- ```
31
-
32
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
33
-
34
-
@@ -1,102 +0,0 @@
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 CartCouponLiteResource
20
- */
21
- export interface CartCouponLiteResource {
22
- /**
23
- *
24
- * @type {number}
25
- * @memberof CartCouponLiteResource
26
- */
27
- id: number;
28
- /**
29
- *
30
- * @type {string}
31
- * @memberof CartCouponLiteResource
32
- */
33
- code: string;
34
- /**
35
- *
36
- * @type {string}
37
- * @memberof CartCouponLiteResource
38
- */
39
- name: string;
40
- /**
41
- *
42
- * @type {number}
43
- * @memberof CartCouponLiteResource
44
- */
45
- discount: number;
46
- /**
47
- *
48
- * @type {string}
49
- * @memberof CartCouponLiteResource
50
- */
51
- appliesTo: string;
52
- }
53
-
54
- /**
55
- * Check if a given object implements the CartCouponLiteResource interface.
56
- */
57
- export function instanceOfCartCouponLiteResource(value: object): value is CartCouponLiteResource {
58
- if (!('id' in value) || value['id'] === undefined) return false;
59
- if (!('code' in value) || value['code'] === undefined) return false;
60
- if (!('name' in value) || value['name'] === undefined) return false;
61
- if (!('discount' in value) || value['discount'] === undefined) return false;
62
- if (!('appliesTo' in value) || value['appliesTo'] === undefined) return false;
63
- return true;
64
- }
65
-
66
- export function CartCouponLiteResourceFromJSON(json: any): CartCouponLiteResource {
67
- return CartCouponLiteResourceFromJSONTyped(json, false);
68
- }
69
-
70
- export function CartCouponLiteResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponLiteResource {
71
- if (json == null) {
72
- return json;
73
- }
74
- return {
75
-
76
- 'id': json['id'],
77
- 'code': json['code'],
78
- 'name': json['name'],
79
- 'discount': json['discount'],
80
- 'appliesTo': json['appliesTo'],
81
- };
82
- }
83
-
84
- export function CartCouponLiteResourceToJSON(json: any): CartCouponLiteResource {
85
- return CartCouponLiteResourceToJSONTyped(json, false);
86
- }
87
-
88
- export function CartCouponLiteResourceToJSONTyped(value?: CartCouponLiteResource | null, ignoreDiscriminator: boolean = false): any {
89
- if (value == null) {
90
- return value;
91
- }
92
-
93
- return {
94
-
95
- 'id': value['id'],
96
- 'code': value['code'],
97
- 'name': value['name'],
98
- 'discount': value['discount'],
99
- 'appliesTo': value['appliesTo'],
100
- };
101
- }
102
-
@@ -1,73 +0,0 @@
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 { CartCouponLiteResource } from './CartCouponLiteResource';
17
- import {
18
- CartCouponLiteResourceFromJSON,
19
- CartCouponLiteResourceFromJSONTyped,
20
- CartCouponLiteResourceToJSON,
21
- CartCouponLiteResourceToJSONTyped,
22
- } from './CartCouponLiteResource';
23
-
24
- /**
25
- *
26
- * @export
27
- * @interface CartCouponLiteResourceArrayResponse
28
- */
29
- export interface CartCouponLiteResourceArrayResponse {
30
- /**
31
- *
32
- * @type {Array<CartCouponLiteResource>}
33
- * @memberof CartCouponLiteResourceArrayResponse
34
- */
35
- data?: Array<CartCouponLiteResource>;
36
- }
37
-
38
- /**
39
- * Check if a given object implements the CartCouponLiteResourceArrayResponse interface.
40
- */
41
- export function instanceOfCartCouponLiteResourceArrayResponse(value: object): value is CartCouponLiteResourceArrayResponse {
42
- return true;
43
- }
44
-
45
- export function CartCouponLiteResourceArrayResponseFromJSON(json: any): CartCouponLiteResourceArrayResponse {
46
- return CartCouponLiteResourceArrayResponseFromJSONTyped(json, false);
47
- }
48
-
49
- export function CartCouponLiteResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponLiteResourceArrayResponse {
50
- if (json == null) {
51
- return json;
52
- }
53
- return {
54
-
55
- 'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(CartCouponLiteResourceFromJSON)),
56
- };
57
- }
58
-
59
- export function CartCouponLiteResourceArrayResponseToJSON(json: any): CartCouponLiteResourceArrayResponse {
60
- return CartCouponLiteResourceArrayResponseToJSONTyped(json, false);
61
- }
62
-
63
- export function CartCouponLiteResourceArrayResponseToJSONTyped(value?: CartCouponLiteResourceArrayResponse | 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(CartCouponLiteResourceToJSON)),
71
- };
72
- }
73
-
@@ -1,89 +0,0 @@
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 CreateCartRequestCustomer
20
- */
21
- export interface CreateCartRequestCustomer {
22
- /**
23
- *
24
- * @type {string}
25
- * @memberof CreateCartRequestCustomer
26
- */
27
- firstName?: string | null;
28
- /**
29
- *
30
- * @type {string}
31
- * @memberof CreateCartRequestCustomer
32
- */
33
- lastName?: string | null;
34
- /**
35
- *
36
- * @type {string}
37
- * @memberof CreateCartRequestCustomer
38
- */
39
- email?: string | null;
40
- /**
41
- *
42
- * @type {string}
43
- * @memberof CreateCartRequestCustomer
44
- */
45
- phone?: string | null;
46
- }
47
-
48
- /**
49
- * Check if a given object implements the CreateCartRequestCustomer interface.
50
- */
51
- export function instanceOfCreateCartRequestCustomer(value: object): value is CreateCartRequestCustomer {
52
- return true;
53
- }
54
-
55
- export function CreateCartRequestCustomerFromJSON(json: any): CreateCartRequestCustomer {
56
- return CreateCartRequestCustomerFromJSONTyped(json, false);
57
- }
58
-
59
- export function CreateCartRequestCustomerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCartRequestCustomer {
60
- if (json == null) {
61
- return json;
62
- }
63
- return {
64
-
65
- 'firstName': json['first_name'] == null ? undefined : json['first_name'],
66
- 'lastName': json['last_name'] == null ? undefined : json['last_name'],
67
- 'email': json['email'] == null ? undefined : json['email'],
68
- 'phone': json['phone'] == null ? undefined : json['phone'],
69
- };
70
- }
71
-
72
- export function CreateCartRequestCustomerToJSON(json: any): CreateCartRequestCustomer {
73
- return CreateCartRequestCustomerToJSONTyped(json, false);
74
- }
75
-
76
- export function CreateCartRequestCustomerToJSONTyped(value?: CreateCartRequestCustomer | null, ignoreDiscriminator: boolean = false): any {
77
- if (value == null) {
78
- return value;
79
- }
80
-
81
- return {
82
-
83
- 'first_name': value['firstName'],
84
- 'last_name': value['lastName'],
85
- 'email': value['email'],
86
- 'phone': value['phone'],
87
- };
88
- }
89
-
@@ -1,246 +0,0 @@
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 { FrontendLineItemResource } from './FrontendLineItemResource';
17
- import {
18
- FrontendLineItemResourceFromJSON,
19
- FrontendLineItemResourceFromJSONTyped,
20
- FrontendLineItemResourceToJSON,
21
- FrontendLineItemResourceToJSONTyped,
22
- } from './FrontendLineItemResource';
23
- import type { CustomerListResource } from './CustomerListResource';
24
- import {
25
- CustomerListResourceFromJSON,
26
- CustomerListResourceFromJSONTyped,
27
- CustomerListResourceToJSON,
28
- CustomerListResourceToJSONTyped,
29
- } from './CustomerListResource';
30
- import type { FrontendCartResourceCouponsInner } from './FrontendCartResourceCouponsInner';
31
- import {
32
- FrontendCartResourceCouponsInnerFromJSON,
33
- FrontendCartResourceCouponsInnerFromJSONTyped,
34
- FrontendCartResourceCouponsInnerToJSON,
35
- FrontendCartResourceCouponsInnerToJSONTyped,
36
- } from './FrontendCartResourceCouponsInner';
37
- import type { AddressResource } from './AddressResource';
38
- import {
39
- AddressResourceFromJSON,
40
- AddressResourceFromJSONTyped,
41
- AddressResourceToJSON,
42
- AddressResourceToJSONTyped,
43
- } from './AddressResource';
44
-
45
- /**
46
- *
47
- * @export
48
- * @interface FrontendCartResource
49
- */
50
- export interface FrontendCartResource {
51
- /**
52
- *
53
- * @type {number}
54
- * @memberof FrontendCartResource
55
- */
56
- id?: number | null;
57
- /**
58
- *
59
- * @type {string}
60
- * @memberof FrontendCartResource
61
- */
62
- lifecycleStatus: string;
63
- /**
64
- *
65
- * @type {number}
66
- * @memberof FrontendCartResource
67
- */
68
- siteId: number;
69
- /**
70
- *
71
- * @type {string}
72
- * @memberof FrontendCartResource
73
- */
74
- sessionToken?: string | null;
75
- /**
76
- *
77
- * @type {CustomerListResource}
78
- * @memberof FrontendCartResource
79
- */
80
- customer: CustomerListResource | null;
81
- /**
82
- *
83
- * @type {string}
84
- * @memberof FrontendCartResource
85
- */
86
- shippingType: string;
87
- /**
88
- *
89
- * @type {AddressResource}
90
- * @memberof FrontendCartResource
91
- */
92
- shippingAddress: AddressResource | null;
93
- /**
94
- *
95
- * @type {AddressResource}
96
- * @memberof FrontendCartResource
97
- */
98
- billingAddress: AddressResource | null;
99
- /**
100
- *
101
- * @type {Array<FrontendLineItemResource>}
102
- * @memberof FrontendCartResource
103
- */
104
- lineItems: Array<FrontendLineItemResource> | null;
105
- /**
106
- *
107
- * @type {Array<FrontendCartResourceCouponsInner>}
108
- * @memberof FrontendCartResource
109
- */
110
- coupons: Array<FrontendCartResourceCouponsInner>;
111
- /**
112
- *
113
- * @type {number}
114
- * @memberof FrontendCartResource
115
- */
116
- subtotal: number;
117
- /**
118
- *
119
- * @type {number}
120
- * @memberof FrontendCartResource
121
- */
122
- promotionalDiscount: number;
123
- /**
124
- *
125
- * @type {number}
126
- * @memberof FrontendCartResource
127
- */
128
- couponSubtotalDiscount: number;
129
- /**
130
- *
131
- * @type {number}
132
- * @memberof FrontendCartResource
133
- */
134
- couponShippingDiscount: number;
135
- /**
136
- *
137
- * @type {number}
138
- * @memberof FrontendCartResource
139
- */
140
- shipping: number;
141
- /**
142
- *
143
- * @type {number}
144
- * @memberof FrontendCartResource
145
- */
146
- transitInsurance: number;
147
- /**
148
- *
149
- * @type {number}
150
- * @memberof FrontendCartResource
151
- */
152
- gst: number;
153
- /**
154
- *
155
- * @type {number}
156
- * @memberof FrontendCartResource
157
- */
158
- grandTotal: number;
159
- }
160
-
161
- /**
162
- * Check if a given object implements the FrontendCartResource interface.
163
- */
164
- export function instanceOfFrontendCartResource(value: object): value is FrontendCartResource {
165
- if (!('lifecycleStatus' in value) || value['lifecycleStatus'] === undefined) return false;
166
- if (!('siteId' in value) || value['siteId'] === undefined) return false;
167
- if (!('customer' in value) || value['customer'] === undefined) return false;
168
- if (!('shippingType' in value) || value['shippingType'] === undefined) return false;
169
- if (!('shippingAddress' in value) || value['shippingAddress'] === undefined) return false;
170
- if (!('billingAddress' in value) || value['billingAddress'] === undefined) return false;
171
- if (!('lineItems' in value) || value['lineItems'] === undefined) return false;
172
- if (!('coupons' in value) || value['coupons'] === undefined) return false;
173
- if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
174
- if (!('promotionalDiscount' in value) || value['promotionalDiscount'] === undefined) return false;
175
- if (!('couponSubtotalDiscount' in value) || value['couponSubtotalDiscount'] === undefined) return false;
176
- if (!('couponShippingDiscount' in value) || value['couponShippingDiscount'] === undefined) return false;
177
- if (!('shipping' in value) || value['shipping'] === undefined) return false;
178
- if (!('transitInsurance' in value) || value['transitInsurance'] === undefined) return false;
179
- if (!('gst' in value) || value['gst'] === undefined) return false;
180
- if (!('grandTotal' in value) || value['grandTotal'] === undefined) return false;
181
- return true;
182
- }
183
-
184
- export function FrontendCartResourceFromJSON(json: any): FrontendCartResource {
185
- return FrontendCartResourceFromJSONTyped(json, false);
186
- }
187
-
188
- export function FrontendCartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): FrontendCartResource {
189
- if (json == null) {
190
- return json;
191
- }
192
- return {
193
-
194
- 'id': json['id'] == null ? undefined : json['id'],
195
- 'lifecycleStatus': json['lifecycleStatus'],
196
- 'siteId': json['siteId'],
197
- 'sessionToken': json['sessionToken'] == null ? undefined : json['sessionToken'],
198
- 'customer': CustomerListResourceFromJSON(json['customer']),
199
- 'shippingType': json['shippingType'],
200
- 'shippingAddress': AddressResourceFromJSON(json['shippingAddress']),
201
- 'billingAddress': AddressResourceFromJSON(json['billingAddress']),
202
- 'lineItems': (json['lineItems'] == null ? null : (json['lineItems'] as Array<any>).map(FrontendLineItemResourceFromJSON)),
203
- 'coupons': ((json['coupons'] as Array<any>).map(FrontendCartResourceCouponsInnerFromJSON)),
204
- 'subtotal': json['subtotal'],
205
- 'promotionalDiscount': json['promotionalDiscount'],
206
- 'couponSubtotalDiscount': json['couponSubtotalDiscount'],
207
- 'couponShippingDiscount': json['couponShippingDiscount'],
208
- 'shipping': json['shipping'],
209
- 'transitInsurance': json['transitInsurance'],
210
- 'gst': json['gst'],
211
- 'grandTotal': json['grandTotal'],
212
- };
213
- }
214
-
215
- export function FrontendCartResourceToJSON(json: any): FrontendCartResource {
216
- return FrontendCartResourceToJSONTyped(json, false);
217
- }
218
-
219
- export function FrontendCartResourceToJSONTyped(value?: FrontendCartResource | null, ignoreDiscriminator: boolean = false): any {
220
- if (value == null) {
221
- return value;
222
- }
223
-
224
- return {
225
-
226
- 'id': value['id'],
227
- 'lifecycleStatus': value['lifecycleStatus'],
228
- 'siteId': value['siteId'],
229
- 'sessionToken': value['sessionToken'],
230
- 'customer': CustomerListResourceToJSON(value['customer']),
231
- 'shippingType': value['shippingType'],
232
- 'shippingAddress': AddressResourceToJSON(value['shippingAddress']),
233
- 'billingAddress': AddressResourceToJSON(value['billingAddress']),
234
- 'lineItems': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(FrontendLineItemResourceToJSON)),
235
- 'coupons': ((value['coupons'] as Array<any>).map(FrontendCartResourceCouponsInnerToJSON)),
236
- 'subtotal': value['subtotal'],
237
- 'promotionalDiscount': value['promotionalDiscount'],
238
- 'couponSubtotalDiscount': value['couponSubtotalDiscount'],
239
- 'couponShippingDiscount': value['couponShippingDiscount'],
240
- 'shipping': value['shipping'],
241
- 'transitInsurance': value['transitInsurance'],
242
- 'gst': value['gst'],
243
- 'grandTotal': value['grandTotal'],
244
- };
245
- }
246
-