@digital8/lighting-illusions-ts-sdk 0.0.1897 → 0.0.1898

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 +18 -0
  2. package/README.md +12 -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 +1 -1
  6. package/dist/models/AddressFrontendResource.js +3 -1
  7. package/dist/models/AddressResource.d.ts +1 -1
  8. package/dist/models/AddressResource.js +1 -3
  9. package/dist/models/CartCouponResource.d.ts +50 -0
  10. package/dist/models/CartCouponResource.js +63 -0
  11. package/dist/models/CartCouponResourceArrayResponse.d.ts +33 -0
  12. package/dist/models/CartCouponResourceArrayResponse.js +50 -0
  13. package/dist/models/CartResource.d.ts +37 -6
  14. package/dist/models/CartResource.js +35 -12
  15. package/dist/models/DetachCouponCartRequest.d.ts +32 -0
  16. package/dist/models/DetachCouponCartRequest.js +51 -0
  17. package/dist/models/DiscountType.d.ts +26 -0
  18. package/dist/models/DiscountType.js +52 -0
  19. package/dist/models/DiscountValueType.d.ts +25 -0
  20. package/dist/models/DiscountValueType.js +51 -0
  21. package/dist/models/LineItemDiscountResource.d.ts +50 -0
  22. package/dist/models/LineItemDiscountResource.js +63 -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 +29 -4
  26. package/dist/models/LineItemListResource.js +23 -4
  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/StoreListResource.d.ts +1 -1
  32. package/dist/models/StoreListResource.js +3 -1
  33. package/dist/models/StoreResource.d.ts +1 -1
  34. package/dist/models/StoreResource.js +3 -1
  35. package/dist/models/StoreSpecialDateResource.d.ts +2 -2
  36. package/dist/models/StoreSpecialDateResource.js +1 -3
  37. package/dist/models/index.d.ts +9 -0
  38. package/dist/models/index.js +9 -0
  39. package/docs/CartCouponResource.md +40 -0
  40. package/docs/CartCouponResourceArrayResponse.md +34 -0
  41. package/docs/CartResource.md +17 -7
  42. package/docs/CartsApi.md +8 -8
  43. package/docs/DetachCouponCartRequest.md +34 -0
  44. package/docs/DiscountType.md +32 -0
  45. package/docs/DiscountValueType.md +32 -0
  46. package/docs/LineItemDiscountResource.md +40 -0
  47. package/docs/LineItemDiscountResourceArrayResponse.md +34 -0
  48. package/docs/LineItemListResource.md +9 -1
  49. package/docs/ProductChildCartLiteResource.md +46 -0
  50. package/docs/ProductChildCartLiteResourceArrayResponse.md +34 -0
  51. package/docs/StoreSpecialDateResource.md +1 -1
  52. package/package.json +1 -1
  53. package/src/apis/CartsApi.ts +12 -14
  54. package/src/models/AddressFrontendResource.ts +3 -2
  55. package/src/models/AddressResource.ts +2 -3
  56. package/src/models/CartCouponResource.ts +93 -0
  57. package/src/models/CartCouponResourceArrayResponse.ts +73 -0
  58. package/src/models/CartResource.ts +71 -18
  59. package/src/models/DetachCouponCartRequest.ts +66 -0
  60. package/src/models/DiscountType.ts +54 -0
  61. package/src/models/DiscountValueType.ts +53 -0
  62. package/src/models/LineItemDiscountResource.ts +93 -0
  63. package/src/models/LineItemDiscountResourceArrayResponse.ts +73 -0
  64. package/src/models/LineItemListResource.ts +56 -12
  65. package/src/models/ProductChildCartLiteResource.ts +135 -0
  66. package/src/models/ProductChildCartLiteResourceArrayResponse.ts +73 -0
  67. package/src/models/StoreListResource.ts +3 -2
  68. package/src/models/StoreResource.ts +3 -2
  69. package/src/models/StoreSpecialDateResource.ts +3 -4
  70. package/src/models/index.ts +9 -0
@@ -0,0 +1,34 @@
1
+
2
+ # LineItemDiscountResourceArrayResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `data` | [Array<LineItemDiscountResource>](LineItemDiscountResource.md)
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { LineItemDiscountResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "data": null,
19
+ } satisfies LineItemDiscountResourceArrayResponse
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 LineItemDiscountResourceArrayResponse
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
+
@@ -9,7 +9,11 @@ Name | Type
9
9
  `id` | number
10
10
  `quantity` | number
11
11
  `productPrice` | number
12
- `productChild` | [ProductChildListResource](ProductChildListResource.md)
12
+ `productDiscount` | number
13
+ `totalDiscount` | number
14
+ `lineSubtotal` | number
15
+ `discounts` | [Array<LineItemDiscountResource>](LineItemDiscountResource.md)
16
+ `productChild` | [ProductChildCartLiteResource](ProductChildCartLiteResource.md)
13
17
 
14
18
  ## Example
15
19
 
@@ -21,6 +25,10 @@ const example = {
21
25
  "id": null,
22
26
  "quantity": null,
23
27
  "productPrice": null,
28
+ "productDiscount": null,
29
+ "totalDiscount": null,
30
+ "lineSubtotal": null,
31
+ "discounts": null,
24
32
  "productChild": null,
25
33
  } satisfies LineItemListResource
26
34
 
@@ -0,0 +1,46 @@
1
+
2
+ # ProductChildCartLiteResource
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | number
10
+ `parentId` | number
11
+ `sku` | string
12
+ `model` | string
13
+ `name` | string
14
+ `thumbnail` | [AssetLiteResource](AssetLiteResource.md)
15
+ `label` | [LabelResource](LabelResource.md)
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import type { ProductChildCartLiteResource } from '@digital8/lighting-illusions-ts-sdk'
21
+
22
+ // TODO: Update the object below with actual values
23
+ const example = {
24
+ "id": null,
25
+ "parentId": null,
26
+ "sku": null,
27
+ "model": null,
28
+ "name": null,
29
+ "thumbnail": null,
30
+ "label": null,
31
+ } satisfies ProductChildCartLiteResource
32
+
33
+ console.log(example)
34
+
35
+ // Convert the instance to a JSON string
36
+ const exampleJSON: string = JSON.stringify(example)
37
+ console.log(exampleJSON)
38
+
39
+ // Parse the JSON string back to an object
40
+ const exampleParsed = JSON.parse(exampleJSON) as ProductChildCartLiteResource
41
+ console.log(exampleParsed)
42
+ ```
43
+
44
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
45
+
46
+
@@ -0,0 +1,34 @@
1
+
2
+ # ProductChildCartLiteResourceArrayResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `data` | [Array<ProductChildCartLiteResource>](ProductChildCartLiteResource.md)
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { ProductChildCartLiteResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "data": null,
19
+ } satisfies ProductChildCartLiteResourceArrayResponse
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 ProductChildCartLiteResourceArrayResponse
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
+
@@ -9,7 +9,7 @@ Name | Type
9
9
  `id` | number
10
10
  `name` | string
11
11
  `hours` | string
12
- `date` | object
12
+ `date` | string
13
13
  `closed` | boolean
14
14
  `displayStartDate` | string
15
15
  `displayEndDate` | string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital8/lighting-illusions-ts-sdk",
3
- "version": "0.0.1897",
3
+ "version": "0.0.1898",
4
4
  "description": "OpenAPI client for @digital8/lighting-illusions-ts-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -18,6 +18,7 @@ import type {
18
18
  AttachCouponCartRequest,
19
19
  AttachItemCartRequest,
20
20
  CartResource,
21
+ DetachCouponCartRequest,
21
22
  GenericResponse,
22
23
  IndexCartRequest,
23
24
  PaginatedCartListResourceResponse,
@@ -32,6 +33,8 @@ import {
32
33
  AttachItemCartRequestToJSON,
33
34
  CartResourceFromJSON,
34
35
  CartResourceToJSON,
36
+ DetachCouponCartRequestFromJSON,
37
+ DetachCouponCartRequestToJSON,
35
38
  GenericResponseFromJSON,
36
39
  GenericResponseToJSON,
37
40
  IndexCartRequestFromJSON,
@@ -60,9 +63,9 @@ export interface DestroyCartRequest {
60
63
  cart: number;
61
64
  }
62
65
 
63
- export interface DetachCouponCartRequest {
66
+ export interface DetachCouponCartOperationRequest {
64
67
  cart: number;
65
- coupon: number;
68
+ detachCouponCartRequest?: DetachCouponCartRequest;
66
69
  }
67
70
 
68
71
  export interface DetachItemCartRequest {
@@ -246,7 +249,7 @@ export class CartsApi extends runtime.BaseAPI {
246
249
  /**
247
250
  * Creates request options for detachCouponCart without sending the request
248
251
  */
249
- async detachCouponCartRequestOpts(requestParameters: DetachCouponCartRequest): Promise<runtime.RequestOpts> {
252
+ async detachCouponCartRequestOpts(requestParameters: DetachCouponCartOperationRequest): Promise<runtime.RequestOpts> {
250
253
  if (requestParameters['cart'] == null) {
251
254
  throw new runtime.RequiredError(
252
255
  'cart',
@@ -254,34 +257,29 @@ export class CartsApi extends runtime.BaseAPI {
254
257
  );
255
258
  }
256
259
 
257
- if (requestParameters['coupon'] == null) {
258
- throw new runtime.RequiredError(
259
- 'coupon',
260
- 'Required parameter "coupon" was null or undefined when calling detachCouponCart().'
261
- );
262
- }
263
-
264
260
  const queryParameters: any = {};
265
261
 
266
262
  const headerParameters: runtime.HTTPHeaders = {};
267
263
 
264
+ headerParameters['Content-Type'] = 'application/json';
265
+
268
266
 
269
- let urlPath = `/admin-api/carts/{cart}/coupons/{coupon}/detach`;
267
+ let urlPath = `/admin-api/carts/{cart}/coupons/detach`;
270
268
  urlPath = urlPath.replace(`{${"cart"}}`, encodeURIComponent(String(requestParameters['cart'])));
271
- urlPath = urlPath.replace(`{${"coupon"}}`, encodeURIComponent(String(requestParameters['coupon'])));
272
269
 
273
270
  return {
274
271
  path: urlPath,
275
272
  method: 'DELETE',
276
273
  headers: headerParameters,
277
274
  query: queryParameters,
275
+ body: DetachCouponCartRequestToJSON(requestParameters['detachCouponCartRequest']),
278
276
  };
279
277
  }
280
278
 
281
279
  /**
282
280
  * Auto-generated: detachCouponCart
283
281
  */
284
- async detachCouponCartRaw(requestParameters: DetachCouponCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartResource>> {
282
+ async detachCouponCartRaw(requestParameters: DetachCouponCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartResource>> {
285
283
  const requestOptions = await this.detachCouponCartRequestOpts(requestParameters);
286
284
  const response = await this.request(requestOptions, initOverrides);
287
285
 
@@ -291,7 +289,7 @@ export class CartsApi extends runtime.BaseAPI {
291
289
  /**
292
290
  * Auto-generated: detachCouponCart
293
291
  */
294
- async detachCouponCart(requestParameters: DetachCouponCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartResource> {
292
+ async detachCouponCart(requestParameters: DetachCouponCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartResource> {
295
293
  const response = await this.detachCouponCartRaw(requestParameters, initOverrides);
296
294
  return await response.value();
297
295
  }
@@ -24,7 +24,7 @@ export interface AddressFrontendResource {
24
24
  * @type {string}
25
25
  * @memberof AddressFrontendResource
26
26
  */
27
- company?: string | null;
27
+ company: string;
28
28
  /**
29
29
  *
30
30
  * @type {string}
@@ -73,6 +73,7 @@ export interface AddressFrontendResource {
73
73
  * Check if a given object implements the AddressFrontendResource interface.
74
74
  */
75
75
  export function instanceOfAddressFrontendResource(value: object): value is AddressFrontendResource {
76
+ if (!('company' in value) || value['company'] === undefined) return false;
76
77
  if (!('line1' in value) || value['line1'] === undefined) return false;
77
78
  if (!('postcode' in value) || value['postcode'] === undefined) return false;
78
79
  if (!('suburb' in value) || value['suburb'] === undefined) return false;
@@ -92,7 +93,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
92
93
  }
93
94
  return {
94
95
 
95
- 'company': json['company'] == null ? undefined : json['company'],
96
+ 'company': json['company'],
96
97
  'line1': json['line1'],
97
98
  'line2': json['line2'] == null ? undefined : json['line2'],
98
99
  'postcode': json['postcode'],
@@ -36,7 +36,7 @@ export interface AddressResource {
36
36
  * @type {string}
37
37
  * @memberof AddressResource
38
38
  */
39
- addresseeName: string;
39
+ addresseeName?: string | null;
40
40
  /**
41
41
  *
42
42
  * @type {string}
@@ -91,7 +91,6 @@ export interface AddressResource {
91
91
  * Check if a given object implements the AddressResource interface.
92
92
  */
93
93
  export function instanceOfAddressResource(value: object): value is AddressResource {
94
- if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
95
94
  if (!('company' in value) || value['company'] === undefined) return false;
96
95
  if (!('line1' in value) || value['line1'] === undefined) return false;
97
96
  if (!('postcode' in value) || value['postcode'] === undefined) return false;
@@ -114,7 +113,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
114
113
 
115
114
  'id': json['id'] == null ? undefined : json['id'],
116
115
  'sourceAddressId': json['source_address_id'] == null ? undefined : json['source_address_id'],
117
- 'addresseeName': json['addressee_name'],
116
+ 'addresseeName': json['addressee_name'] == null ? undefined : json['addressee_name'],
118
117
  'company': json['company'],
119
118
  'line1': json['line_1'],
120
119
  'line2': json['line_2'] == null ? undefined : json['line_2'],
@@ -0,0 +1,93 @@
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 CartCouponResource
20
+ */
21
+ export interface CartCouponResource {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof CartCouponResource
26
+ */
27
+ id: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof CartCouponResource
32
+ */
33
+ code: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof CartCouponResource
38
+ */
39
+ name: string;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof CartCouponResource
44
+ */
45
+ discountTotal: number;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the CartCouponResource interface.
50
+ */
51
+ export function instanceOfCartCouponResource(value: object): value is CartCouponResource {
52
+ if (!('id' in value) || value['id'] === undefined) return false;
53
+ if (!('code' in value) || value['code'] === undefined) return false;
54
+ if (!('name' in value) || value['name'] === undefined) return false;
55
+ if (!('discountTotal' in value) || value['discountTotal'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function CartCouponResourceFromJSON(json: any): CartCouponResource {
60
+ return CartCouponResourceFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function CartCouponResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponResource {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'id': json['id'],
70
+ 'code': json['code'],
71
+ 'name': json['name'],
72
+ 'discountTotal': json['discount_total'],
73
+ };
74
+ }
75
+
76
+ export function CartCouponResourceToJSON(json: any): CartCouponResource {
77
+ return CartCouponResourceToJSONTyped(json, false);
78
+ }
79
+
80
+ export function CartCouponResourceToJSONTyped(value?: CartCouponResource | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'id': value['id'],
88
+ 'code': value['code'],
89
+ 'name': value['name'],
90
+ 'discount_total': value['discountTotal'],
91
+ };
92
+ }
93
+
@@ -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 { CartCouponResource } from './CartCouponResource';
17
+ import {
18
+ CartCouponResourceFromJSON,
19
+ CartCouponResourceFromJSONTyped,
20
+ CartCouponResourceToJSON,
21
+ CartCouponResourceToJSONTyped,
22
+ } from './CartCouponResource';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface CartCouponResourceArrayResponse
28
+ */
29
+ export interface CartCouponResourceArrayResponse {
30
+ /**
31
+ *
32
+ * @type {Array<CartCouponResource>}
33
+ * @memberof CartCouponResourceArrayResponse
34
+ */
35
+ data?: Array<CartCouponResource>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the CartCouponResourceArrayResponse interface.
40
+ */
41
+ export function instanceOfCartCouponResourceArrayResponse(value: object): value is CartCouponResourceArrayResponse {
42
+ return true;
43
+ }
44
+
45
+ export function CartCouponResourceArrayResponseFromJSON(json: any): CartCouponResourceArrayResponse {
46
+ return CartCouponResourceArrayResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function CartCouponResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponResourceArrayResponse {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(CartCouponResourceFromJSON)),
56
+ };
57
+ }
58
+
59
+ export function CartCouponResourceArrayResponseToJSON(json: any): CartCouponResourceArrayResponse {
60
+ return CartCouponResourceArrayResponseToJSONTyped(json, false);
61
+ }
62
+
63
+ export function CartCouponResourceArrayResponseToJSONTyped(value?: CartCouponResourceArrayResponse | 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(CartCouponResourceToJSON)),
71
+ };
72
+ }
73
+
@@ -27,6 +27,13 @@ import {
27
27
  LineItemListResourceToJSON,
28
28
  LineItemListResourceToJSONTyped,
29
29
  } from './LineItemListResource';
30
+ import type { CartCouponResource } from './CartCouponResource';
31
+ import {
32
+ CartCouponResourceFromJSON,
33
+ CartCouponResourceFromJSONTyped,
34
+ CartCouponResourceToJSON,
35
+ CartCouponResourceToJSONTyped,
36
+ } from './CartCouponResource';
30
37
  import type { CustomerListResource } from './CustomerListResource';
31
38
  import {
32
39
  CustomerListResourceFromJSON,
@@ -125,7 +132,7 @@ export interface CartResource {
125
132
  * @type {number}
126
133
  * @memberof CartResource
127
134
  */
128
- insuranceAmount?: number | null;
135
+ insuranceAmount: number;
129
136
  /**
130
137
  *
131
138
  * @type {boolean}
@@ -164,10 +171,10 @@ export interface CartResource {
164
171
  lineItems: Array<LineItemListResource> | null;
165
172
  /**
166
173
  *
167
- * @type {object}
174
+ * @type {Array<CartCouponResource>}
168
175
  * @memberof CartResource
169
176
  */
170
- coupons: object;
177
+ coupons: Array<CartCouponResource> | null;
171
178
  /**
172
179
  *
173
180
  * @type {AddressResource}
@@ -180,6 +187,12 @@ export interface CartResource {
180
187
  * @memberof CartResource
181
188
  */
182
189
  billingAddress: AddressResource | null;
190
+ /**
191
+ *
192
+ * @type {number}
193
+ * @memberof CartResource
194
+ */
195
+ discountPreview: number;
183
196
  /**
184
197
  *
185
198
  * @type {number}
@@ -191,19 +204,43 @@ export interface CartResource {
191
204
  * @type {number}
192
205
  * @memberof CartResource
193
206
  */
194
- discountPreview: number;
207
+ shippingAmount: number;
195
208
  /**
196
209
  *
197
210
  * @type {number}
198
211
  * @memberof CartResource
199
212
  */
200
- shippingEstimate: number;
213
+ total: number;
201
214
  /**
202
215
  *
203
216
  * @type {number}
204
217
  * @memberof CartResource
205
218
  */
206
- insuranceEstimate: number;
219
+ discountAmount: number;
220
+ /**
221
+ *
222
+ * @type {number}
223
+ * @memberof CartResource
224
+ */
225
+ productDiscountAmount: number;
226
+ /**
227
+ *
228
+ * @type {number}
229
+ * @memberof CartResource
230
+ */
231
+ shippingDiscountAmount: number;
232
+ /**
233
+ *
234
+ * @type {number}
235
+ * @memberof CartResource
236
+ */
237
+ cartDiscountAmount: number;
238
+ /**
239
+ *
240
+ * @type {number}
241
+ * @memberof CartResource
242
+ */
243
+ finalTotalAmount: number;
207
244
  /**
208
245
  *
209
246
  * @type {string}
@@ -220,6 +257,7 @@ export function instanceOfCartResource(value: object): value is CartResource {
220
257
  if (!('expiryDate' in value) || value['expiryDate'] === undefined) return false;
221
258
  if (!('shippingType' in value) || value['shippingType'] === undefined) return false;
222
259
  if (!('overrideShipping' in value) || value['overrideShipping'] === undefined) return false;
260
+ if (!('insuranceAmount' in value) || value['insuranceAmount'] === undefined) return false;
223
261
  if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined) return false;
224
262
  if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined) return false;
225
263
  if (!('admin' in value) || value['admin'] === undefined) return false;
@@ -229,10 +267,15 @@ export function instanceOfCartResource(value: object): value is CartResource {
229
267
  if (!('coupons' in value) || value['coupons'] === undefined) return false;
230
268
  if (!('shippingAddress' in value) || value['shippingAddress'] === undefined) return false;
231
269
  if (!('billingAddress' in value) || value['billingAddress'] === undefined) return false;
232
- if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
233
270
  if (!('discountPreview' in value) || value['discountPreview'] === undefined) return false;
234
- if (!('shippingEstimate' in value) || value['shippingEstimate'] === undefined) return false;
235
- if (!('insuranceEstimate' in value) || value['insuranceEstimate'] === undefined) return false;
271
+ if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
272
+ if (!('shippingAmount' in value) || value['shippingAmount'] === undefined) return false;
273
+ if (!('total' in value) || value['total'] === undefined) return false;
274
+ if (!('discountAmount' in value) || value['discountAmount'] === undefined) return false;
275
+ if (!('productDiscountAmount' in value) || value['productDiscountAmount'] === undefined) return false;
276
+ if (!('shippingDiscountAmount' in value) || value['shippingDiscountAmount'] === undefined) return false;
277
+ if (!('cartDiscountAmount' in value) || value['cartDiscountAmount'] === undefined) return false;
278
+ if (!('finalTotalAmount' in value) || value['finalTotalAmount'] === undefined) return false;
236
279
  if (!('status' in value) || value['status'] === undefined) return false;
237
280
  return true;
238
281
  }
@@ -259,20 +302,25 @@ export function CartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolea
259
302
  'shippingType': json['shipping_type'],
260
303
  'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
261
304
  'overrideShipping': json['override_shipping'],
262
- 'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
305
+ 'insuranceAmount': json['insurance_amount'],
263
306
  'overrideInsurance': json['override_insurance'],
264
307
  'useAsBillingAddress': json['use_as_billing_address'],
265
308
  'admin': json['admin'],
266
309
  'site': SiteLiteResourceFromJSON(json['site']),
267
310
  'customer': CustomerListResourceFromJSON(json['customer']),
268
311
  'lineItems': (json['line_items'] == null ? null : (json['line_items'] as Array<any>).map(LineItemListResourceFromJSON)),
269
- 'coupons': json['coupons'],
312
+ 'coupons': (json['coupons'] == null ? null : (json['coupons'] as Array<any>).map(CartCouponResourceFromJSON)),
270
313
  'shippingAddress': AddressResourceFromJSON(json['shipping_address']),
271
314
  'billingAddress': AddressResourceFromJSON(json['billing_address']),
272
- 'subtotal': json['subtotal'],
273
315
  'discountPreview': json['discount_preview'],
274
- 'shippingEstimate': json['shipping_estimate'],
275
- 'insuranceEstimate': json['insurance_estimate'],
316
+ 'subtotal': json['subtotal'],
317
+ 'shippingAmount': json['shipping_amount'],
318
+ 'total': json['total'],
319
+ 'discountAmount': json['discount_amount'],
320
+ 'productDiscountAmount': json['product_discount_amount'],
321
+ 'shippingDiscountAmount': json['shipping_discount_amount'],
322
+ 'cartDiscountAmount': json['cart_discount_amount'],
323
+ 'finalTotalAmount': json['final_total_amount'],
276
324
  'status': json['status'],
277
325
  };
278
326
  }
@@ -307,13 +355,18 @@ export function CartResourceToJSONTyped(value?: CartResource | null, ignoreDiscr
307
355
  'site': SiteLiteResourceToJSON(value['site']),
308
356
  'customer': CustomerListResourceToJSON(value['customer']),
309
357
  'line_items': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(LineItemListResourceToJSON)),
310
- 'coupons': value['coupons'],
358
+ 'coupons': (value['coupons'] == null ? null : (value['coupons'] as Array<any>).map(CartCouponResourceToJSON)),
311
359
  'shipping_address': AddressResourceToJSON(value['shippingAddress']),
312
360
  'billing_address': AddressResourceToJSON(value['billingAddress']),
313
- 'subtotal': value['subtotal'],
314
361
  'discount_preview': value['discountPreview'],
315
- 'shipping_estimate': value['shippingEstimate'],
316
- 'insurance_estimate': value['insuranceEstimate'],
362
+ 'subtotal': value['subtotal'],
363
+ 'shipping_amount': value['shippingAmount'],
364
+ 'total': value['total'],
365
+ 'discount_amount': value['discountAmount'],
366
+ 'product_discount_amount': value['productDiscountAmount'],
367
+ 'shipping_discount_amount': value['shippingDiscountAmount'],
368
+ 'cart_discount_amount': value['cartDiscountAmount'],
369
+ 'final_total_amount': value['finalTotalAmount'],
317
370
  'status': value['status'],
318
371
  };
319
372
  }