@digital8/lighting-illusions-ts-sdk 0.0.1839 → 0.0.1841

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/.openapi-generator/FILES +0 -10
  2. package/README.md +3 -8
  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 +1 -1
  8. package/dist/models/AddressResource.js +3 -1
  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/ExternalApiLogResource.d.ts +1 -1
  14. package/dist/models/ExternalApiLogResource.js +1 -3
  15. package/dist/models/FrontendCartResource.d.ts +0 -12
  16. package/dist/models/FrontendCartResource.js +0 -8
  17. package/dist/models/LineItemListResource.d.ts +3 -27
  18. package/dist/models/LineItemListResource.js +3 -19
  19. package/dist/models/StoreCartRequest.d.ts +2 -2
  20. package/dist/models/StoreCartRequest.js +2 -6
  21. package/dist/models/StoreCartRequestShippingAddress.d.ts +4 -4
  22. package/dist/models/StoreCartRequestShippingAddress.js +4 -12
  23. package/dist/models/StoreFrontendResource.d.ts +1 -1
  24. package/dist/models/StoreFrontendResource.js +3 -1
  25. package/dist/models/StoreListResource.d.ts +1 -1
  26. package/dist/models/StoreListResource.js +3 -1
  27. package/dist/models/UpdateCartRequest.d.ts +2 -2
  28. package/dist/models/UpdateCartRequest.js +2 -6
  29. package/dist/models/index.d.ts +0 -5
  30. package/dist/models/index.js +0 -5
  31. package/docs/AdminCartResource.md +6 -16
  32. package/docs/AttachCouponCartRequest.md +2 -2
  33. package/docs/CartsApi.md +8 -8
  34. package/docs/FrontendCartResource.md +0 -4
  35. package/docs/LineItemListResource.md +1 -9
  36. package/package.json +1 -1
  37. package/src/apis/CartsApi.ts +14 -12
  38. package/src/models/AddressFrontendResource.ts +3 -2
  39. package/src/models/AddressResource.ts +3 -2
  40. package/src/models/AdminCartResource.ts +14 -60
  41. package/src/models/AttachCouponCartRequest.ts +5 -5
  42. package/src/models/ExternalApiLogResource.ts +2 -3
  43. package/src/models/FrontendCartResource.ts +0 -18
  44. package/src/models/LineItemListResource.ts +10 -46
  45. package/src/models/StoreCartRequest.ts +4 -6
  46. package/src/models/StoreCartRequestShippingAddress.ts +8 -12
  47. package/src/models/StoreFrontendResource.ts +3 -2
  48. package/src/models/StoreListResource.ts +3 -2
  49. package/src/models/UpdateCartRequest.ts +4 -6
  50. package/src/models/index.ts +0 -5
  51. package/dist/models/DetachCouponCartRequest.d.ts +0 -32
  52. package/dist/models/DetachCouponCartRequest.js +0 -51
  53. package/dist/models/DiscountType.d.ts +0 -26
  54. package/dist/models/DiscountType.js +0 -52
  55. package/dist/models/DiscountValueType.d.ts +0 -25
  56. package/dist/models/DiscountValueType.js +0 -51
  57. package/dist/models/ProductChildCartLiteResource.d.ts +0 -70
  58. package/dist/models/ProductChildCartLiteResource.js +0 -77
  59. package/dist/models/ProductChildCartLiteResourceArrayResponse.d.ts +0 -33
  60. package/dist/models/ProductChildCartLiteResourceArrayResponse.js +0 -50
  61. package/docs/DetachCouponCartRequest.md +0 -34
  62. package/docs/DiscountType.md +0 -32
  63. package/docs/DiscountValueType.md +0 -32
  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/ProductChildCartLiteResource.ts +0 -135
  70. package/src/models/ProductChildCartLiteResourceArrayResponse.ts +0 -73
@@ -26,7 +26,7 @@ export interface StoreCartRequestShippingAddress {
26
26
  * @type {string}
27
27
  * @memberof StoreCartRequestShippingAddress
28
28
  */
29
- line1: string;
29
+ line1?: string | null;
30
30
  /**
31
31
  *
32
32
  * @type {string}
@@ -38,19 +38,19 @@ export interface StoreCartRequestShippingAddress {
38
38
  * @type {string}
39
39
  * @memberof StoreCartRequestShippingAddress
40
40
  */
41
- suburb: string;
41
+ suburb?: string | null;
42
42
  /**
43
43
  *
44
44
  * @type {string}
45
45
  * @memberof StoreCartRequestShippingAddress
46
46
  */
47
- state: string;
47
+ state?: string | null;
48
48
  /**
49
49
  *
50
50
  * @type {string}
51
51
  * @memberof StoreCartRequestShippingAddress
52
52
  */
53
- postcode: string;
53
+ postcode?: string | null;
54
54
  /**
55
55
  *
56
56
  * @type {string}
@@ -22,14 +22,6 @@ exports.StoreCartRequestShippingAddressToJSONTyped = StoreCartRequestShippingAdd
22
22
  * Check if a given object implements the StoreCartRequestShippingAddress interface.
23
23
  */
24
24
  function instanceOfStoreCartRequestShippingAddress(value) {
25
- if (!('line1' in value) || value['line1'] === undefined)
26
- return false;
27
- if (!('suburb' in value) || value['suburb'] === undefined)
28
- return false;
29
- if (!('state' in value) || value['state'] === undefined)
30
- return false;
31
- if (!('postcode' in value) || value['postcode'] === undefined)
32
- return false;
33
25
  return true;
34
26
  }
35
27
  function StoreCartRequestShippingAddressFromJSON(json) {
@@ -41,11 +33,11 @@ function StoreCartRequestShippingAddressFromJSONTyped(json, ignoreDiscriminator)
41
33
  }
42
34
  return {
43
35
  'company': json['company'] == null ? undefined : json['company'],
44
- 'line1': json['line_1'],
36
+ 'line1': json['line_1'] == null ? undefined : json['line_1'],
45
37
  'line2': json['line_2'] == null ? undefined : json['line_2'],
46
- 'suburb': json['suburb'],
47
- 'state': json['state'],
48
- 'postcode': json['postcode'],
38
+ 'suburb': json['suburb'] == null ? undefined : json['suburb'],
39
+ 'state': json['state'] == null ? undefined : json['state'],
40
+ 'postcode': json['postcode'] == null ? undefined : json['postcode'],
49
41
  'country': json['country'] == null ? undefined : json['country'],
50
42
  };
51
43
  }
@@ -44,7 +44,7 @@ export interface StoreFrontendResource {
44
44
  * @type {string}
45
45
  * @memberof StoreFrontendResource
46
46
  */
47
- website?: string | null;
47
+ website: string;
48
48
  /**
49
49
  *
50
50
  * @type {string}
@@ -28,6 +28,8 @@ function instanceOfStoreFrontendResource(value) {
28
28
  return false;
29
29
  if (!('email' in value) || value['email'] === undefined)
30
30
  return false;
31
+ if (!('website' in value) || value['website'] === undefined)
32
+ return false;
31
33
  if (!('phone' in value) || value['phone'] === undefined)
32
34
  return false;
33
35
  if (!('latitude' in value) || value['latitude'] === undefined)
@@ -54,7 +56,7 @@ function StoreFrontendResourceFromJSONTyped(json, ignoreDiscriminator) {
54
56
  'siteId': json['siteId'],
55
57
  'name': json['name'],
56
58
  'email': json['email'],
57
- 'website': json['website'] == null ? undefined : json['website'],
59
+ 'website': json['website'],
58
60
  'phone': json['phone'],
59
61
  'address': json['address'] == null ? undefined : json['address'],
60
62
  'latitude': json['latitude'],
@@ -69,7 +69,7 @@ export interface StoreListResource {
69
69
  * @type {string}
70
70
  * @memberof StoreListResource
71
71
  */
72
- website?: string | null;
72
+ website: string;
73
73
  /**
74
74
  *
75
75
  * @type {string}
@@ -37,6 +37,8 @@ function instanceOfStoreListResource(value) {
37
37
  return false;
38
38
  if (!('email' in value) || value['email'] === undefined)
39
39
  return false;
40
+ if (!('website' in value) || value['website'] === undefined)
41
+ return false;
40
42
  return true;
41
43
  }
42
44
  function StoreListResourceFromJSON(json) {
@@ -55,7 +57,7 @@ function StoreListResourceFromJSONTyped(json, ignoreDiscriminator) {
55
57
  'latitude': json['latitude'],
56
58
  'tagLine': json['tag_line'],
57
59
  'email': json['email'],
58
- 'website': json['website'] == null ? undefined : json['website'],
60
+ 'website': json['website'],
59
61
  'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
60
62
  };
61
63
  }
@@ -76,13 +76,13 @@ export interface UpdateCartRequest {
76
76
  * @type {StoreCartRequestShippingAddress}
77
77
  * @memberof UpdateCartRequest
78
78
  */
79
- shippingAddress: StoreCartRequestShippingAddress;
79
+ shippingAddress?: StoreCartRequestShippingAddress;
80
80
  /**
81
81
  *
82
82
  * @type {StoreCartRequestShippingAddress}
83
83
  * @memberof UpdateCartRequest
84
84
  */
85
- billingAddress: StoreCartRequestShippingAddress;
85
+ billingAddress?: StoreCartRequestShippingAddress;
86
86
  }
87
87
  /**
88
88
  * @export
@@ -46,10 +46,6 @@ exports.UpdateCartRequestShippingTypeEnum = {
46
46
  * Check if a given object implements the UpdateCartRequest interface.
47
47
  */
48
48
  function instanceOfUpdateCartRequest(value) {
49
- if (!('shippingAddress' in value) || value['shippingAddress'] === undefined)
50
- return false;
51
- if (!('billingAddress' in value) || value['billingAddress'] === undefined)
52
- return false;
53
49
  return true;
54
50
  }
55
51
  function UpdateCartRequestFromJSON(json) {
@@ -69,8 +65,8 @@ function UpdateCartRequestFromJSONTyped(json, ignoreDiscriminator) {
69
65
  'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
70
66
  'overrideInsurance': json['override_insurance'] == null ? undefined : json['override_insurance'],
71
67
  'useAsBillingAddress': json['use_as_billing_address'] == null ? undefined : json['use_as_billing_address'],
72
- 'shippingAddress': (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressFromJSON)(json['shipping_address']),
73
- 'billingAddress': (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressFromJSON)(json['billing_address']),
68
+ 'shippingAddress': json['shipping_address'] == null ? undefined : (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressFromJSON)(json['shipping_address']),
69
+ 'billingAddress': json['billing_address'] == null ? undefined : (0, StoreCartRequestShippingAddress_1.StoreCartRequestShippingAddressFromJSON)(json['billing_address']),
74
70
  };
75
71
  }
76
72
  function UpdateCartRequestToJSON(json) {
@@ -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';
@@ -268,8 +265,6 @@ export * from './ProductChildAttributeGroupedResource';
268
265
  export * from './ProductChildAttributeGroupedResourceArrayResponse';
269
266
  export * from './ProductChildAttributeResource';
270
267
  export * from './ProductChildAttributeResourceArrayResponse';
271
- export * from './ProductChildCartLiteResource';
272
- export * from './ProductChildCartLiteResourceArrayResponse';
273
268
  export * from './ProductChildListResource';
274
269
  export * from './ProductChildListResourceArrayResponse';
275
270
  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);
@@ -286,8 +283,6 @@ __exportStar(require("./ProductChildAttributeGroupedResource"), exports);
286
283
  __exportStar(require("./ProductChildAttributeGroupedResourceArrayResponse"), exports);
287
284
  __exportStar(require("./ProductChildAttributeResource"), exports);
288
285
  __exportStar(require("./ProductChildAttributeResourceArrayResponse"), exports);
289
- __exportStar(require("./ProductChildCartLiteResource"), exports);
290
- __exportStar(require("./ProductChildCartLiteResourceArrayResponse"), exports);
291
286
  __exportStar(require("./ProductChildListResource"), exports);
292
287
  __exportStar(require("./ProductChildListResourceArrayResponse"), exports);
293
288
  __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
 
@@ -25,8 +25,6 @@ Name | Type
25
25
  `billingAddress` | [AddressResource](AddressResource.md)
26
26
  `subtotal` | number
27
27
  `discountPreview` | number
28
- `totalSubtotalDiscount` | number
29
- `totalShippingDiscount` | number
30
28
  `shippingEstimate` | number
31
29
  `insuranceEstimate` | number
32
30
  `status` | string
@@ -57,8 +55,6 @@ const example = {
57
55
  "billingAddress": null,
58
56
  "subtotal": null,
59
57
  "discountPreview": null,
60
- "totalSubtotalDiscount": null,
61
- "totalShippingDiscount": null,
62
58
  "shippingEstimate": null,
63
59
  "insuranceEstimate": null,
64
60
  "status": null,
@@ -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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital8/lighting-illusions-ts-sdk",
3
- "version": "0.0.1839",
3
+ "version": "0.0.1841",
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
  }
@@ -36,7 +36,7 @@ export interface AddressFrontendResource {
36
36
  * @type {string}
37
37
  * @memberof AddressFrontendResource
38
38
  */
39
- line2?: string | null;
39
+ line2: string;
40
40
  /**
41
41
  *
42
42
  * @type {string}
@@ -75,6 +75,7 @@ export interface AddressFrontendResource {
75
75
  export function instanceOfAddressFrontendResource(value: object): value is AddressFrontendResource {
76
76
  if (!('company' in value) || value['company'] === undefined) return false;
77
77
  if (!('line1' in value) || value['line1'] === undefined) return false;
78
+ if (!('line2' in value) || value['line2'] === undefined) return false;
78
79
  if (!('postcode' in value) || value['postcode'] === undefined) return false;
79
80
  if (!('suburb' in value) || value['suburb'] === undefined) return false;
80
81
  if (!('country' in value) || value['country'] === undefined) return false;
@@ -95,7 +96,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
95
96
 
96
97
  'company': json['company'],
97
98
  'line1': json['line1'],
98
- 'line2': json['line2'] == null ? undefined : json['line2'],
99
+ 'line2': json['line2'],
99
100
  'postcode': json['postcode'],
100
101
  'suburb': json['suburb'],
101
102
  'country': json['country'],
@@ -30,7 +30,7 @@ export interface AddressResource {
30
30
  * @type {string}
31
31
  * @memberof AddressResource
32
32
  */
33
- company?: string | null;
33
+ company: string;
34
34
  /**
35
35
  *
36
36
  * @type {string}
@@ -79,6 +79,7 @@ export interface AddressResource {
79
79
  * Check if a given object implements the AddressResource interface.
80
80
  */
81
81
  export function instanceOfAddressResource(value: object): value is AddressResource {
82
+ if (!('company' in value) || value['company'] === undefined) return false;
82
83
  if (!('line1' in value) || value['line1'] === undefined) return false;
83
84
  if (!('postcode' in value) || value['postcode'] === undefined) return false;
84
85
  if (!('suburb' in value) || value['suburb'] === undefined) return false;
@@ -99,7 +100,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
99
100
  return {
100
101
 
101
102
  'id': json['id'] == null ? undefined : json['id'],
102
- 'company': json['company'] == null ? undefined : json['company'],
103
+ 'company': json['company'],
103
104
  'line1': json['line_1'],
104
105
  'line2': json['line_2'] == null ? undefined : json['line_2'],
105
106
  'postcode': json['postcode'],