@digital8/lighting-illusions-ts-sdk 0.0.1843 → 0.0.1844

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 +0 -14
  2. package/README.md +3 -10
  3. package/dist/apis/CartsApi.d.ts +6 -6
  4. package/dist/apis/CartsApi.js +5 -3
  5. package/dist/models/AddressFrontendResource.d.ts +1 -1
  6. package/dist/models/AddressFrontendResource.js +1 -3
  7. package/dist/models/AddressResource.d.ts +1 -1
  8. package/dist/models/AddressResource.js +1 -3
  9. package/dist/models/AdminCartResource.d.ts +4 -34
  10. package/dist/models/AdminCartResource.js +10 -32
  11. package/dist/models/AttachCouponCartRequest.d.ts +2 -2
  12. package/dist/models/AttachCouponCartRequest.js +3 -3
  13. package/dist/models/LineItemListResource.d.ts +3 -27
  14. package/dist/models/LineItemListResource.js +3 -19
  15. package/dist/models/StoreFrontendResource.d.ts +1 -1
  16. package/dist/models/StoreFrontendResource.js +1 -3
  17. package/dist/models/StoreResource.d.ts +2 -2
  18. package/dist/models/StoreResource.js +4 -4
  19. package/dist/models/StoreSpecialDateResource.d.ts +2 -2
  20. package/dist/models/StoreSpecialDateResource.js +3 -1
  21. package/dist/models/index.d.ts +0 -7
  22. package/dist/models/index.js +0 -7
  23. package/docs/AdminCartResource.md +6 -16
  24. package/docs/AttachCouponCartRequest.md +2 -2
  25. package/docs/CartsApi.md +8 -8
  26. package/docs/LineItemListResource.md +1 -9
  27. package/docs/StoreSpecialDateResource.md +1 -1
  28. package/package.json +1 -1
  29. package/src/apis/CartsApi.ts +14 -12
  30. package/src/models/AddressFrontendResource.ts +2 -3
  31. package/src/models/AddressResource.ts +2 -3
  32. package/src/models/AdminCartResource.ts +14 -60
  33. package/src/models/AttachCouponCartRequest.ts +5 -5
  34. package/src/models/LineItemListResource.ts +10 -46
  35. package/src/models/StoreFrontendResource.ts +2 -3
  36. package/src/models/StoreResource.ts +5 -5
  37. package/src/models/StoreSpecialDateResource.ts +4 -3
  38. package/src/models/index.ts +0 -7
  39. package/dist/models/DetachCouponCartRequest.d.ts +0 -32
  40. package/dist/models/DetachCouponCartRequest.js +0 -51
  41. package/dist/models/DiscountType.d.ts +0 -26
  42. package/dist/models/DiscountType.js +0 -52
  43. package/dist/models/DiscountValueType.d.ts +0 -25
  44. package/dist/models/DiscountValueType.js +0 -51
  45. package/dist/models/FrontendCartResource.d.ts +0 -174
  46. package/dist/models/FrontendCartResource.js +0 -133
  47. package/dist/models/FrontendCartResourceArrayResponse.d.ts +0 -33
  48. package/dist/models/FrontendCartResourceArrayResponse.js +0 -50
  49. package/dist/models/ProductChildCartLiteResource.d.ts +0 -70
  50. package/dist/models/ProductChildCartLiteResource.js +0 -77
  51. package/dist/models/ProductChildCartLiteResourceArrayResponse.d.ts +0 -33
  52. package/dist/models/ProductChildCartLiteResourceArrayResponse.js +0 -50
  53. package/docs/DetachCouponCartRequest.md +0 -34
  54. package/docs/DiscountType.md +0 -32
  55. package/docs/DiscountValueType.md +0 -32
  56. package/docs/FrontendCartResource.md +0 -80
  57. package/docs/FrontendCartResourceArrayResponse.md +0 -34
  58. package/docs/ProductChildCartLiteResource.md +0 -46
  59. package/docs/ProductChildCartLiteResourceArrayResponse.md +0 -34
  60. package/src/models/DetachCouponCartRequest.ts +0 -66
  61. package/src/models/DiscountType.ts +0 -54
  62. package/src/models/DiscountValueType.ts +0 -53
  63. package/src/models/FrontendCartResource.ts +0 -295
  64. package/src/models/FrontendCartResourceArrayResponse.ts +0 -73
  65. package/src/models/ProductChildCartLiteResource.ts +0 -135
  66. package/src/models/ProductChildCartLiteResourceArrayResponse.ts +0 -73
@@ -72,7 +72,6 @@ export * from './DestroyAttributeValueRequest';
72
72
  export * from './DetachAccessoriesProductRangeRequest';
73
73
  export * from './DetachAssetableOverlayTemplateRequest';
74
74
  export * from './DetachAttributesProductRangeRequest';
75
- export * from './DetachCouponCartRequest';
76
75
  export * from './DetachDocumentablesDocumentRequest';
77
76
  export * from './DetachDocumentablesDocumentRequestDocumentablesInner';
78
77
  export * from './DetachDocumentsProductChildRequest';
@@ -80,8 +79,6 @@ export * from './DetachDocumentsProductRangeRequest';
80
79
  export * from './DetachProductsProductCategoryRequest';
81
80
  export * from './DetachStoresSupplierRequest';
82
81
  export * from './DetachSuppliersStoreRequest';
83
- export * from './DiscountType';
84
- export * from './DiscountValueType';
85
82
  export * from './DocumentFileForUploadResource';
86
83
  export * from './DocumentFileForUploadResourceArrayResponse';
87
84
  export * from './DocumentFrontendResource';
@@ -96,8 +93,6 @@ export * from './ExternalApiLogResource';
96
93
  export * from './ExternalApiLogResourceArrayResponse';
97
94
  export * from './ExternalApiProvider';
98
95
  export * from './ExternalApiSyncStatus';
99
- export * from './FrontendCartResource';
100
- export * from './FrontendCartResourceArrayResponse';
101
96
  export * from './GenericResponse';
102
97
  export * from './GetAllAttributeRequest';
103
98
  export * from './GetAllAttributeValueRequest';
@@ -268,8 +263,6 @@ export * from './ProductChildAttributeGroupedResource';
268
263
  export * from './ProductChildAttributeGroupedResourceArrayResponse';
269
264
  export * from './ProductChildAttributeResource';
270
265
  export * from './ProductChildAttributeResourceArrayResponse';
271
- export * from './ProductChildCartLiteResource';
272
- export * from './ProductChildCartLiteResourceArrayResponse';
273
266
  export * from './ProductChildListResource';
274
267
  export * from './ProductChildListResourceArrayResponse';
275
268
  export * from './ProductChildLiteResource';
@@ -90,7 +90,6 @@ __exportStar(require("./DestroyAttributeValueRequest"), exports);
90
90
  __exportStar(require("./DetachAccessoriesProductRangeRequest"), exports);
91
91
  __exportStar(require("./DetachAssetableOverlayTemplateRequest"), exports);
92
92
  __exportStar(require("./DetachAttributesProductRangeRequest"), exports);
93
- __exportStar(require("./DetachCouponCartRequest"), exports);
94
93
  __exportStar(require("./DetachDocumentablesDocumentRequest"), exports);
95
94
  __exportStar(require("./DetachDocumentablesDocumentRequestDocumentablesInner"), exports);
96
95
  __exportStar(require("./DetachDocumentsProductChildRequest"), exports);
@@ -98,8 +97,6 @@ __exportStar(require("./DetachDocumentsProductRangeRequest"), exports);
98
97
  __exportStar(require("./DetachProductsProductCategoryRequest"), exports);
99
98
  __exportStar(require("./DetachStoresSupplierRequest"), exports);
100
99
  __exportStar(require("./DetachSuppliersStoreRequest"), exports);
101
- __exportStar(require("./DiscountType"), exports);
102
- __exportStar(require("./DiscountValueType"), exports);
103
100
  __exportStar(require("./DocumentFileForUploadResource"), exports);
104
101
  __exportStar(require("./DocumentFileForUploadResourceArrayResponse"), exports);
105
102
  __exportStar(require("./DocumentFrontendResource"), exports);
@@ -114,8 +111,6 @@ __exportStar(require("./ExternalApiLogResource"), exports);
114
111
  __exportStar(require("./ExternalApiLogResourceArrayResponse"), exports);
115
112
  __exportStar(require("./ExternalApiProvider"), exports);
116
113
  __exportStar(require("./ExternalApiSyncStatus"), exports);
117
- __exportStar(require("./FrontendCartResource"), exports);
118
- __exportStar(require("./FrontendCartResourceArrayResponse"), exports);
119
114
  __exportStar(require("./GenericResponse"), exports);
120
115
  __exportStar(require("./GetAllAttributeRequest"), exports);
121
116
  __exportStar(require("./GetAllAttributeValueRequest"), exports);
@@ -286,8 +281,6 @@ __exportStar(require("./ProductChildAttributeGroupedResource"), exports);
286
281
  __exportStar(require("./ProductChildAttributeGroupedResourceArrayResponse"), exports);
287
282
  __exportStar(require("./ProductChildAttributeResource"), exports);
288
283
  __exportStar(require("./ProductChildAttributeResourceArrayResponse"), exports);
289
- __exportStar(require("./ProductChildCartLiteResource"), exports);
290
- __exportStar(require("./ProductChildCartLiteResourceArrayResponse"), exports);
291
284
  __exportStar(require("./ProductChildListResource"), exports);
292
285
  __exportStar(require("./ProductChildListResourceArrayResponse"), exports);
293
286
  __exportStar(require("./ProductChildLiteResource"), exports);
@@ -30,15 +30,10 @@ Name | Type
30
30
  `coupons` | object
31
31
  `shippingAddress` | [AddressResource](AddressResource.md)
32
32
  `billingAddress` | [AddressResource](AddressResource.md)
33
- `discountPreview` | number
34
33
  `subtotal` | number
35
- `shippingAmount` | number
36
- `total` | number
37
- `discountAmount` | number
38
- `productDiscountAmount` | number
39
- `shippingDiscountAmount` | number
40
- `cartDiscountAmount` | number
41
- `finalTotalAmount` | number
34
+ `discountPreview` | number
35
+ `shippingEstimate` | number
36
+ `insuranceEstimate` | number
42
37
  `status` | string
43
38
 
44
39
  ## Example
@@ -72,15 +67,10 @@ const example = {
72
67
  "coupons": null,
73
68
  "shippingAddress": null,
74
69
  "billingAddress": null,
75
- "discountPreview": null,
76
70
  "subtotal": null,
77
- "shippingAmount": null,
78
- "total": null,
79
- "discountAmount": null,
80
- "productDiscountAmount": null,
81
- "shippingDiscountAmount": null,
82
- "cartDiscountAmount": null,
83
- "finalTotalAmount": null,
71
+ "discountPreview": null,
72
+ "shippingEstimate": null,
73
+ "insuranceEstimate": null,
84
74
  "status": null,
85
75
  } satisfies AdminCartResource
86
76
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  Name | Type
8
8
  ------------ | -------------
9
- `couponIds` | Array<number>
9
+ `couponId` | number
10
10
 
11
11
  ## Example
12
12
 
@@ -15,7 +15,7 @@ import type { AttachCouponCartRequest } from '@digital8/lighting-illusions-ts-sd
15
15
 
16
16
  // TODO: Update the object below with actual values
17
17
  const example = {
18
- "couponIds": null,
18
+ "couponId": null,
19
19
  } satisfies AttachCouponCartRequest
20
20
 
21
21
  console.log(example)
package/docs/CartsApi.md CHANGED
@@ -7,7 +7,7 @@ All URIs are relative to *http://localhost/api*
7
7
  | [**attachCouponCart**](CartsApi.md#attachcouponcartoperation) | **POST** /admin-api/carts/{cart}/coupons/attach | Auto-generated: attachCouponCart |
8
8
  | [**attachItemCart**](CartsApi.md#attachitemcartoperation) | **POST** /admin-api/carts/{cart}/items/attach | Auto-generated: attachItemCart |
9
9
  | [**destroyCart**](CartsApi.md#destroycart) | **DELETE** /admin-api/carts/{cart}/delete | Auto-generated: destroyCart |
10
- | [**detachCouponCart**](CartsApi.md#detachcouponcartoperation) | **DELETE** /admin-api/carts/{cart}/coupons/detach | Auto-generated: detachCouponCart |
10
+ | [**detachCouponCart**](CartsApi.md#detachcouponcart) | **DELETE** /admin-api/carts/{cart}/coupons/{coupon}/detach | Auto-generated: detachCouponCart |
11
11
  | [**detachItemCart**](CartsApi.md#detachitemcart) | **DELETE** /admin-api/carts/{cart}/items/{lineItem}/detach | Auto-generated: detachItemCart |
12
12
  | [**indexCart**](CartsApi.md#indexcartoperation) | **POST** /admin-api/carts/list | Auto-generated: indexCart |
13
13
  | [**sendPaymentLinkCart**](CartsApi.md#sendpaymentlinkcart) | **POST** /admin-api/carts/{cart}/send-payment-link | Auto-generated: sendPaymentLinkCart |
@@ -221,7 +221,7 @@ No authorization required
221
221
 
222
222
  ## detachCouponCart
223
223
 
224
- > AdminCartResource detachCouponCart(cart, detachCouponCartRequest)
224
+ > AdminCartResource detachCouponCart(cart, coupon)
225
225
 
226
226
  Auto-generated: detachCouponCart
227
227
 
@@ -232,7 +232,7 @@ import {
232
232
  Configuration,
233
233
  CartsApi,
234
234
  } from '@digital8/lighting-illusions-ts-sdk';
235
- import type { DetachCouponCartOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
235
+ import type { DetachCouponCartRequest } from '@digital8/lighting-illusions-ts-sdk';
236
236
 
237
237
  async function example() {
238
238
  console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
@@ -241,9 +241,9 @@ async function example() {
241
241
  const body = {
242
242
  // number | The id of the cart
243
243
  cart: 56,
244
- // DetachCouponCartRequest (optional)
245
- detachCouponCartRequest: ...,
246
- } satisfies DetachCouponCartOperationRequest;
244
+ // number | The id of the coupon
245
+ coupon: 56,
246
+ } satisfies DetachCouponCartRequest;
247
247
 
248
248
  try {
249
249
  const data = await api.detachCouponCart(body);
@@ -263,7 +263,7 @@ example().catch(console.error);
263
263
  | Name | Type | Description | Notes |
264
264
  |------------- | ------------- | ------------- | -------------|
265
265
  | **cart** | `number` | The id of the cart | [Defaults to `undefined`] |
266
- | **detachCouponCartRequest** | [DetachCouponCartRequest](DetachCouponCartRequest.md) | | [Optional] |
266
+ | **coupon** | `number` | The id of the coupon | [Defaults to `undefined`] |
267
267
 
268
268
  ### Return type
269
269
 
@@ -275,7 +275,7 @@ No authorization required
275
275
 
276
276
  ### HTTP request headers
277
277
 
278
- - **Content-Type**: `application/json`
278
+ - **Content-Type**: Not defined
279
279
  - **Accept**: `application/json`
280
280
 
281
281
 
@@ -9,11 +9,7 @@ Name | Type
9
9
  `id` | number
10
10
  `quantity` | number
11
11
  `productPrice` | number
12
- `productDiscount` | number
13
- `totalDiscount` | number
14
- `lineSubtotal` | number
15
- `discounts` | Array<boolean>
16
- `productChild` | [ProductChildCartLiteResource](ProductChildCartLiteResource.md)
12
+ `productChild` | [ProductChildListResource](ProductChildListResource.md)
17
13
 
18
14
  ## Example
19
15
 
@@ -25,10 +21,6 @@ const example = {
25
21
  "id": null,
26
22
  "quantity": null,
27
23
  "productPrice": null,
28
- "productDiscount": null,
29
- "totalDiscount": null,
30
- "lineSubtotal": null,
31
- "discounts": null,
32
24
  "productChild": null,
33
25
  } satisfies LineItemListResource
34
26
 
@@ -9,7 +9,7 @@ Name | Type
9
9
  `id` | number
10
10
  `name` | string
11
11
  `hours` | string
12
- `date` | string
12
+ `date` | object
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.1843",
3
+ "version": "0.0.1844",
4
4
  "description": "OpenAPI client for @digital8/lighting-illusions-ts-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -18,7 +18,6 @@ import type {
18
18
  AdminCartResource,
19
19
  AttachCouponCartRequest,
20
20
  AttachItemCartRequest,
21
- DetachCouponCartRequest,
22
21
  GenericResponse,
23
22
  IndexCartRequest,
24
23
  PaginatedCartListResourceResponse,
@@ -33,8 +32,6 @@ import {
33
32
  AttachCouponCartRequestToJSON,
34
33
  AttachItemCartRequestFromJSON,
35
34
  AttachItemCartRequestToJSON,
36
- DetachCouponCartRequestFromJSON,
37
- DetachCouponCartRequestToJSON,
38
35
  GenericResponseFromJSON,
39
36
  GenericResponseToJSON,
40
37
  IndexCartRequestFromJSON,
@@ -63,9 +60,9 @@ export interface DestroyCartRequest {
63
60
  cart: number;
64
61
  }
65
62
 
66
- export interface DetachCouponCartOperationRequest {
63
+ export interface DetachCouponCartRequest {
67
64
  cart: number;
68
- detachCouponCartRequest?: DetachCouponCartRequest;
65
+ coupon: number;
69
66
  }
70
67
 
71
68
  export interface DetachItemCartRequest {
@@ -249,7 +246,7 @@ export class CartsApi extends runtime.BaseAPI {
249
246
  /**
250
247
  * Creates request options for detachCouponCart without sending the request
251
248
  */
252
- async detachCouponCartRequestOpts(requestParameters: DetachCouponCartOperationRequest): Promise<runtime.RequestOpts> {
249
+ async detachCouponCartRequestOpts(requestParameters: DetachCouponCartRequest): Promise<runtime.RequestOpts> {
253
250
  if (requestParameters['cart'] == null) {
254
251
  throw new runtime.RequiredError(
255
252
  'cart',
@@ -257,29 +254,34 @@ export class CartsApi extends runtime.BaseAPI {
257
254
  );
258
255
  }
259
256
 
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
+
260
264
  const queryParameters: any = {};
261
265
 
262
266
  const headerParameters: runtime.HTTPHeaders = {};
263
267
 
264
- headerParameters['Content-Type'] = 'application/json';
265
-
266
268
 
267
- let urlPath = `/admin-api/carts/{cart}/coupons/detach`;
269
+ let urlPath = `/admin-api/carts/{cart}/coupons/{coupon}/detach`;
268
270
  urlPath = urlPath.replace(`{${"cart"}}`, encodeURIComponent(String(requestParameters['cart'])));
271
+ urlPath = urlPath.replace(`{${"coupon"}}`, encodeURIComponent(String(requestParameters['coupon'])));
269
272
 
270
273
  return {
271
274
  path: urlPath,
272
275
  method: 'DELETE',
273
276
  headers: headerParameters,
274
277
  query: queryParameters,
275
- body: DetachCouponCartRequestToJSON(requestParameters['detachCouponCartRequest']),
276
278
  };
277
279
  }
278
280
 
279
281
  /**
280
282
  * Auto-generated: detachCouponCart
281
283
  */
282
- async detachCouponCartRaw(requestParameters: DetachCouponCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminCartResource>> {
284
+ async detachCouponCartRaw(requestParameters: DetachCouponCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminCartResource>> {
283
285
  const requestOptions = await this.detachCouponCartRequestOpts(requestParameters);
284
286
  const response = await this.request(requestOptions, initOverrides);
285
287
 
@@ -289,7 +291,7 @@ export class CartsApi extends runtime.BaseAPI {
289
291
  /**
290
292
  * Auto-generated: detachCouponCart
291
293
  */
292
- async detachCouponCart(requestParameters: DetachCouponCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminCartResource> {
294
+ async detachCouponCart(requestParameters: DetachCouponCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminCartResource> {
293
295
  const response = await this.detachCouponCartRaw(requestParameters, initOverrides);
294
296
  return await response.value();
295
297
  }
@@ -24,7 +24,7 @@ export interface AddressFrontendResource {
24
24
  * @type {string}
25
25
  * @memberof AddressFrontendResource
26
26
  */
27
- company: string;
27
+ company?: string | null;
28
28
  /**
29
29
  *
30
30
  * @type {string}
@@ -73,7 +73,6 @@ 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;
77
76
  if (!('line1' in value) || value['line1'] === undefined) return false;
78
77
  if (!('postcode' in value) || value['postcode'] === undefined) return false;
79
78
  if (!('suburb' in value) || value['suburb'] === undefined) return false;
@@ -93,7 +92,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
93
92
  }
94
93
  return {
95
94
 
96
- 'company': json['company'],
95
+ 'company': json['company'] == null ? undefined : json['company'],
97
96
  'line1': json['line1'],
98
97
  'line2': json['line2'] == null ? undefined : json['line2'],
99
98
  'postcode': json['postcode'],
@@ -42,7 +42,7 @@ export interface AddressResource {
42
42
  * @type {string}
43
43
  * @memberof AddressResource
44
44
  */
45
- line2: string;
45
+ line2?: string | null;
46
46
  /**
47
47
  *
48
48
  * @type {string}
@@ -80,7 +80,6 @@ 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;
84
83
  if (!('postcode' in value) || value['postcode'] === undefined) return false;
85
84
  if (!('suburb' in value) || value['suburb'] === undefined) return false;
86
85
  if (!('country' in value) || value['country'] === undefined) return false;
@@ -102,7 +101,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
102
101
  'id': json['id'] == null ? undefined : json['id'],
103
102
  'company': json['company'] == null ? undefined : json['company'],
104
103
  'line1': json['line_1'],
105
- 'line2': json['line_2'],
104
+ 'line2': json['line_2'] == null ? undefined : json['line_2'],
106
105
  'postcode': json['postcode'],
107
106
  'suburb': json['suburb'],
108
107
  'country': json['country'],
@@ -137,7 +137,7 @@ export interface AdminCartResource {
137
137
  * @type {number}
138
138
  * @memberof AdminCartResource
139
139
  */
140
- insuranceAmount: number;
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
- shippingAmount: number;
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
- cartDiscountAmount: number;
212
+ shippingEstimate: number;
243
213
  /**
244
214
  *
245
215
  * @type {number}
246
216
  * @memberof AdminCartResource
247
217
  */
248
- finalTotalAmount: number;
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 (!('shippingAmount' in value) || value['shippingAmount'] === undefined) return false;
279
- if (!('total' in value) || value['total'] === undefined) return false;
280
- if (!('discountAmount' in value) || value['discountAmount'] === undefined) return false;
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
- 'shippingAmount': json['shipping_amount'],
326
- 'total': json['total'],
327
- 'discountAmount': json['discount_amount'],
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
- 'shipping_amount': value['shippingAmount'],
374
- 'total': value['total'],
375
- 'discount_amount': value['discountAmount'],
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 {Array<number>}
24
+ * @type {number}
25
25
  * @memberof AttachCouponCartRequest
26
26
  */
27
- couponIds: Array<number>;
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 (!('couponIds' in value) || value['couponIds'] === undefined) return false;
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
- 'couponIds': json['coupon_ids'],
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
- 'coupon_ids': value['couponIds'],
63
+ 'coupon_id': value['couponId'],
64
64
  };
65
65
  }
66
66
 
@@ -13,13 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { ProductChildCartLiteResource } from './ProductChildCartLiteResource';
16
+ import type { ProductChildListResource } from './ProductChildListResource';
17
17
  import {
18
- ProductChildCartLiteResourceFromJSON,
19
- ProductChildCartLiteResourceFromJSONTyped,
20
- ProductChildCartLiteResourceToJSON,
21
- ProductChildCartLiteResourceToJSONTyped,
22
- } from './ProductChildCartLiteResource';
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 {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 {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: ProductChildCartLiteResource | null;
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
- 'productDiscount': json['product_discount'],
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
- 'product_discount': value['productDiscount'],
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