@digital8/lighting-illusions-ts-sdk 0.0.1859 → 0.0.1861

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 (72) 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 +3 -1
  7. package/dist/models/AddressResource.d.ts +6 -0
  8. package/dist/models/AddressResource.js +2 -0
  9. package/dist/models/AttachCouponCartRequest.d.ts +2 -2
  10. package/dist/models/AttachCouponCartRequest.js +3 -3
  11. package/dist/models/CartResource.d.ts +4 -34
  12. package/dist/models/CartResource.js +10 -32
  13. package/dist/models/ExternalApiLogResource.d.ts +1 -1
  14. package/dist/models/ExternalApiLogResource.js +1 -3
  15. package/dist/models/LineItemListResource.d.ts +3 -27
  16. package/dist/models/LineItemListResource.js +3 -19
  17. package/dist/models/StoreCartRequest.d.ts +12 -0
  18. package/dist/models/StoreCartRequest.js +4 -0
  19. package/dist/models/StoreSpecialDateResource.d.ts +2 -2
  20. package/dist/models/StoreSpecialDateResource.js +3 -1
  21. package/dist/models/UpdateCartRequest.d.ts +12 -0
  22. package/dist/models/UpdateCartRequest.js +4 -0
  23. package/dist/models/index.d.ts +0 -7
  24. package/dist/models/index.js +0 -7
  25. package/docs/AddressResource.md +2 -0
  26. package/docs/AttachCouponCartRequest.md +2 -2
  27. package/docs/CartResource.md +6 -16
  28. package/docs/CartsApi.md +8 -8
  29. package/docs/LineItemListResource.md +1 -9
  30. package/docs/StoreCartRequest.md +4 -0
  31. package/docs/StoreSpecialDateResource.md +1 -1
  32. package/docs/UpdateCartRequest.md +4 -0
  33. package/package.json +1 -1
  34. package/src/apis/CartsApi.ts +14 -12
  35. package/src/models/AddressFrontendResource.ts +3 -2
  36. package/src/models/AddressResource.ts +8 -0
  37. package/src/models/AttachCouponCartRequest.ts +5 -5
  38. package/src/models/CartResource.ts +14 -60
  39. package/src/models/ExternalApiLogResource.ts +2 -3
  40. package/src/models/LineItemListResource.ts +10 -46
  41. package/src/models/StoreCartRequest.ts +16 -0
  42. package/src/models/StoreSpecialDateResource.ts +4 -3
  43. package/src/models/UpdateCartRequest.ts +16 -0
  44. package/src/models/index.ts +0 -7
  45. package/dist/models/DetachCouponCartRequest.d.ts +0 -32
  46. package/dist/models/DetachCouponCartRequest.js +0 -51
  47. package/dist/models/DiscountType.d.ts +0 -26
  48. package/dist/models/DiscountType.js +0 -52
  49. package/dist/models/DiscountValueType.d.ts +0 -25
  50. package/dist/models/DiscountValueType.js +0 -51
  51. package/dist/models/LineItemDiscountResource.d.ts +0 -44
  52. package/dist/models/LineItemDiscountResource.js +0 -59
  53. package/dist/models/LineItemDiscountResourceArrayResponse.d.ts +0 -33
  54. package/dist/models/LineItemDiscountResourceArrayResponse.js +0 -50
  55. package/dist/models/ProductChildCartLiteResource.d.ts +0 -70
  56. package/dist/models/ProductChildCartLiteResource.js +0 -77
  57. package/dist/models/ProductChildCartLiteResourceArrayResponse.d.ts +0 -33
  58. package/dist/models/ProductChildCartLiteResourceArrayResponse.js +0 -50
  59. package/docs/DetachCouponCartRequest.md +0 -34
  60. package/docs/DiscountType.md +0 -32
  61. package/docs/DiscountValueType.md +0 -32
  62. package/docs/LineItemDiscountResource.md +0 -38
  63. package/docs/LineItemDiscountResourceArrayResponse.md +0 -34
  64. package/docs/ProductChildCartLiteResource.md +0 -46
  65. package/docs/ProductChildCartLiteResourceArrayResponse.md +0 -34
  66. package/src/models/DetachCouponCartRequest.ts +0 -66
  67. package/src/models/DiscountType.ts +0 -54
  68. package/src/models/DiscountValueType.ts +0 -53
  69. package/src/models/LineItemDiscountResource.ts +0 -84
  70. package/src/models/LineItemDiscountResourceArrayResponse.ts +0 -73
  71. package/src/models/ProductChildCartLiteResource.ts +0 -135
  72. package/src/models/ProductChildCartLiteResourceArrayResponse.ts +0 -73
@@ -77,6 +77,18 @@ export interface UpdateCartRequest {
77
77
  * @memberof UpdateCartRequest
78
78
  */
79
79
  useAsBillingAddress?: boolean;
80
+ /**
81
+ *
82
+ * @type {number}
83
+ * @memberof UpdateCartRequest
84
+ */
85
+ shippingAddressId?: number | null;
86
+ /**
87
+ *
88
+ * @type {number}
89
+ * @memberof UpdateCartRequest
90
+ */
91
+ billingAddressId?: number | null;
80
92
  /**
81
93
  *
82
94
  * @type {StoreCartRequestShippingAddress}
@@ -66,6 +66,8 @@ function UpdateCartRequestFromJSONTyped(json, ignoreDiscriminator) {
66
66
  'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
67
67
  'overrideInsurance': json['override_insurance'] == null ? undefined : json['override_insurance'],
68
68
  'useAsBillingAddress': json['use_as_billing_address'] == null ? undefined : json['use_as_billing_address'],
69
+ 'shippingAddressId': json['shipping_address_id'] == null ? undefined : json['shipping_address_id'],
70
+ 'billingAddressId': json['billing_address_id'] == null ? undefined : json['billing_address_id'],
69
71
  'shippingAddress': json['shipping_address'] == null ? undefined : (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressFromJSON)(json['shipping_address']),
70
72
  'billingAddress': json['billing_address'] == null ? undefined : (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressFromJSON)(json['billing_address']),
71
73
  };
@@ -89,6 +91,8 @@ function UpdateCartRequestToJSONTyped(value, ignoreDiscriminator) {
89
91
  'insurance_amount': value['insuranceAmount'],
90
92
  'override_insurance': value['overrideInsurance'],
91
93
  'use_as_billing_address': value['useAsBillingAddress'],
94
+ 'shipping_address_id': value['shippingAddressId'],
95
+ 'billing_address_id': value['billingAddressId'],
92
96
  'shipping_address': (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressToJSON)(value['shippingAddress']),
93
97
  'billing_address': (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressToJSON)(value['billingAddress']),
94
98
  };
@@ -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';
@@ -157,8 +154,6 @@ export * from './LabelResource';
157
154
  export * from './LabelResourceArrayResponse';
158
155
  export * from './LiAddressResource';
159
156
  export * from './LiAddressResourceArrayResponse';
160
- export * from './LineItemDiscountResource';
161
- export * from './LineItemDiscountResourceArrayResponse';
162
157
  export * from './LineItemListResource';
163
158
  export * from './LineItemListResourceArrayResponse';
164
159
  export * from './ListAssetsProductRegistrationRequest';
@@ -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);
@@ -175,8 +172,6 @@ __exportStar(require("./LabelResource"), exports);
175
172
  __exportStar(require("./LabelResourceArrayResponse"), exports);
176
173
  __exportStar(require("./LiAddressResource"), exports);
177
174
  __exportStar(require("./LiAddressResourceArrayResponse"), exports);
178
- __exportStar(require("./LineItemDiscountResource"), exports);
179
- __exportStar(require("./LineItemDiscountResourceArrayResponse"), exports);
180
175
  __exportStar(require("./LineItemListResource"), exports);
181
176
  __exportStar(require("./LineItemListResourceArrayResponse"), exports);
182
177
  __exportStar(require("./ListAssetsProductRegistrationRequest"), 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);
@@ -7,6 +7,7 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `id` | number
10
+ `sourceAddressId` | string
10
11
  `company` | string
11
12
  `line1` | string
12
13
  `line2` | string
@@ -24,6 +25,7 @@ import type { AddressResource } from '@digital8/lighting-illusions-ts-sdk'
24
25
  // TODO: Update the object below with actual values
25
26
  const example = {
26
27
  "id": null,
28
+ "sourceAddressId": null,
27
29
  "company": null,
28
30
  "line1": null,
29
31
  "line2": null,
@@ -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)
@@ -31,15 +31,10 @@ Name | Type
31
31
  `coupons` | object
32
32
  `shippingAddress` | [AddressResource](AddressResource.md)
33
33
  `billingAddress` | [AddressResource](AddressResource.md)
34
- `discountPreview` | number
35
34
  `subtotal` | number
36
- `shippingAmount` | number
37
- `total` | number
38
- `discountAmount` | number
39
- `productDiscountAmount` | number
40
- `shippingDiscountAmount` | number
41
- `cartDiscountAmount` | number
42
- `finalTotalAmount` | number
35
+ `discountPreview` | number
36
+ `shippingEstimate` | number
37
+ `insuranceEstimate` | number
43
38
  `status` | string
44
39
 
45
40
  ## Example
@@ -74,15 +69,10 @@ const example = {
74
69
  "coupons": null,
75
70
  "shippingAddress": null,
76
71
  "billingAddress": null,
77
- "discountPreview": null,
78
72
  "subtotal": null,
79
- "shippingAmount": null,
80
- "total": null,
81
- "discountAmount": null,
82
- "productDiscountAmount": null,
83
- "shippingDiscountAmount": null,
84
- "cartDiscountAmount": null,
85
- "finalTotalAmount": null,
73
+ "discountPreview": null,
74
+ "shippingEstimate": null,
75
+ "insuranceEstimate": null,
86
76
  "status": null,
87
77
  } satisfies CartResource
88
78
 
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
- > CartResource detachCouponCart(cart, detachCouponCartRequest)
224
+ > CartResource 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` | object
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
 
@@ -20,6 +20,8 @@ Name | Type
20
20
  `insuranceAmount` | number
21
21
  `overrideInsurance` | boolean
22
22
  `useAsBillingAddress` | boolean
23
+ `shippingAddressId` | number
24
+ `billingAddressId` | number
23
25
  `shippingAddress` | [StoreCartRequestShippingAddress](StoreCartRequestShippingAddress.md)
24
26
  `billingAddress` | [StoreCartRequestShippingAddress](StoreCartRequestShippingAddress.md)
25
27
 
@@ -44,6 +46,8 @@ const example = {
44
46
  "insuranceAmount": null,
45
47
  "overrideInsurance": null,
46
48
  "useAsBillingAddress": null,
49
+ "shippingAddressId": null,
50
+ "billingAddressId": null,
47
51
  "shippingAddress": null,
48
52
  "billingAddress": null,
49
53
  } satisfies StoreCartRequest
@@ -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
@@ -16,6 +16,8 @@ Name | Type
16
16
  `insuranceAmount` | number
17
17
  `overrideInsurance` | boolean
18
18
  `useAsBillingAddress` | boolean
19
+ `shippingAddressId` | number
20
+ `billingAddressId` | number
19
21
  `shippingAddress` | [StoreCartRequestShippingAddress](StoreCartRequestShippingAddress.md)
20
22
  `billingAddress` | [StoreCartRequestShippingAddress](StoreCartRequestShippingAddress.md)
21
23
 
@@ -36,6 +38,8 @@ const example = {
36
38
  "insuranceAmount": null,
37
39
  "overrideInsurance": null,
38
40
  "useAsBillingAddress": null,
41
+ "shippingAddressId": null,
42
+ "billingAddressId": null,
39
43
  "shippingAddress": null,
40
44
  "billingAddress": null,
41
45
  } satisfies UpdateCartRequest
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital8/lighting-illusions-ts-sdk",
3
- "version": "0.0.1859",
3
+ "version": "0.0.1861",
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
  AttachCouponCartRequest,
19
19
  AttachItemCartRequest,
20
20
  CartResource,
21
- DetachCouponCartRequest,
22
21
  GenericResponse,
23
22
  IndexCartRequest,
24
23
  PaginatedCartListResourceResponse,
@@ -33,8 +32,6 @@ import {
33
32
  AttachItemCartRequestToJSON,
34
33
  CartResourceFromJSON,
35
34
  CartResourceToJSON,
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<CartResource>> {
284
+ async detachCouponCartRaw(requestParameters: DetachCouponCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartResource>> {
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<CartResource> {
294
+ async detachCouponCart(requestParameters: DetachCouponCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartResource> {
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 | 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'],
@@ -25,6 +25,12 @@ export interface AddressResource {
25
25
  * @memberof AddressResource
26
26
  */
27
27
  id?: number | null;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AddressResource
32
+ */
33
+ sourceAddressId?: string | null;
28
34
  /**
29
35
  *
30
36
  * @type {string}
@@ -101,6 +107,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
101
107
  return {
102
108
 
103
109
  'id': json['id'] == null ? undefined : json['id'],
110
+ 'sourceAddressId': json['source_address_id'] == null ? undefined : json['source_address_id'],
104
111
  'company': json['company'],
105
112
  'line1': json['line_1'],
106
113
  'line2': json['line_2'],
@@ -124,6 +131,7 @@ export function AddressResourceToJSONTyped(value?: AddressResource | null, ignor
124
131
  return {
125
132
 
126
133
  'id': value['id'],
134
+ 'source_address_id': value['sourceAddressId'],
127
135
  'company': value['company'],
128
136
  'line_1': value['line1'],
129
137
  'line_2': value['line2'],
@@ -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
 
@@ -143,7 +143,7 @@ export interface CartResource {
143
143
  * @type {number}
144
144
  * @memberof CartResource
145
145
  */
146
- insuranceAmount: number;
146
+ insuranceAmount?: number | null;
147
147
  /**
148
148
  *
149
149
  * @type {boolean}
@@ -198,12 +198,6 @@ 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;
207
201
  /**
208
202
  *
209
203
  * @type {number}
@@ -215,43 +209,19 @@ export interface CartResource {
215
209
  * @type {number}
216
210
  * @memberof CartResource
217
211
  */
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;
231
- /**
232
- *
233
- * @type {number}
234
- * @memberof CartResource
235
- */
236
- productDiscountAmount: number;
237
- /**
238
- *
239
- * @type {number}
240
- * @memberof CartResource
241
- */
242
- shippingDiscountAmount: number;
212
+ discountPreview: number;
243
213
  /**
244
214
  *
245
215
  * @type {number}
246
216
  * @memberof CartResource
247
217
  */
248
- cartDiscountAmount: number;
218
+ shippingEstimate: number;
249
219
  /**
250
220
  *
251
221
  * @type {number}
252
222
  * @memberof CartResource
253
223
  */
254
- finalTotalAmount: number;
224
+ insuranceEstimate: number;
255
225
  /**
256
226
  *
257
227
  * @type {string}
@@ -269,7 +239,6 @@ export function instanceOfCartResource(value: object): value is CartResource {
269
239
  if (!('expiryDate' in value) || value['expiryDate'] === undefined) return false;
270
240
  if (!('shippingType' in value) || value['shippingType'] === undefined) return false;
271
241
  if (!('overrideShipping' in value) || value['overrideShipping'] === undefined) return false;
272
- if (!('insuranceAmount' in value) || value['insuranceAmount'] === undefined) return false;
273
242
  if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined) return false;
274
243
  if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined) return false;
275
244
  if (!('admin' in value) || value['admin'] === undefined) return false;
@@ -279,15 +248,10 @@ export function instanceOfCartResource(value: object): value is CartResource {
279
248
  if (!('coupons' in value) || value['coupons'] === undefined) return false;
280
249
  if (!('shippingAddress' in value) || value['shippingAddress'] === undefined) return false;
281
250
  if (!('billingAddress' in value) || value['billingAddress'] === undefined) return false;
282
- if (!('discountPreview' in value) || value['discountPreview'] === undefined) return false;
283
251
  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;
252
+ 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;
291
255
  if (!('status' in value) || value['status'] === undefined) return false;
292
256
  return true;
293
257
  }
@@ -317,7 +281,7 @@ export function CartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolea
317
281
  'shippingType': json['shipping_type'],
318
282
  'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
319
283
  'overrideShipping': json['override_shipping'],
320
- 'insuranceAmount': json['insurance_amount'],
284
+ 'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
321
285
  'overrideInsurance': json['override_insurance'],
322
286
  'useAsBillingAddress': json['use_as_billing_address'],
323
287
  'admin': json['admin'],
@@ -327,15 +291,10 @@ export function CartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolea
327
291
  'coupons': json['coupons'],
328
292
  'shippingAddress': AddressResourceFromJSON(json['shipping_address']),
329
293
  'billingAddress': AddressResourceFromJSON(json['billing_address']),
330
- 'discountPreview': json['discount_preview'],
331
294
  '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'],
295
+ 'discountPreview': json['discount_preview'],
296
+ 'shippingEstimate': json['shipping_estimate'],
297
+ 'insuranceEstimate': json['insurance_estimate'],
339
298
  'status': json['status'],
340
299
  };
341
300
  }
@@ -376,15 +335,10 @@ export function CartResourceToJSONTyped(value?: CartResource | null, ignoreDiscr
376
335
  'coupons': value['coupons'],
377
336
  'shipping_address': AddressResourceToJSON(value['shippingAddress']),
378
337
  'billing_address': AddressResourceToJSON(value['billingAddress']),
379
- 'discount_preview': value['discountPreview'],
380
338
  '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'],
339
+ 'discount_preview': value['discountPreview'],
340
+ 'shipping_estimate': value['shippingEstimate'],
341
+ 'insurance_estimate': value['insuranceEstimate'],
388
342
  'status': value['status'],
389
343
  };
390
344
  }