@digital8/lighting-illusions-ts-sdk 0.0.2049 → 0.0.2051

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 (83) hide show
  1. package/.openapi-generator/FILES +8 -18
  2. package/README.md +8 -14
  3. package/dist/apis/CartsApi.d.ts +8 -8
  4. package/dist/apis/CartsApi.js +8 -8
  5. package/dist/apis/CustomersApi.d.ts +0 -17
  6. package/dist/apis/CustomersApi.js +0 -62
  7. package/dist/apis/OrdersApi.d.ts +8 -8
  8. package/dist/apis/OrdersApi.js +10 -10
  9. package/dist/models/AddressResource.d.ts +1 -1
  10. package/dist/models/AddressResource.js +1 -3
  11. package/dist/models/AdminOrderResource.d.ts +1 -13
  12. package/dist/models/AdminOrderResource.js +3 -11
  13. package/dist/models/AttachCouponRequest.d.ts +32 -0
  14. package/dist/models/AttachCouponRequest.js +51 -0
  15. package/dist/models/AttachLineItemRequest.d.ts +44 -0
  16. package/dist/models/{AttachCartItemRequest.js → AttachLineItemRequest.js} +13 -13
  17. package/dist/models/CartListResource.d.ts +0 -48
  18. package/dist/models/CartListResource.js +0 -26
  19. package/dist/models/CartResource.d.ts +2 -2
  20. package/dist/models/CartResource.js +2 -2
  21. package/dist/models/DetachCouponRequest.d.ts +32 -0
  22. package/dist/models/DetachCouponRequest.js +51 -0
  23. package/dist/models/ExternalApiLogResource.d.ts +1 -1
  24. package/dist/models/ExternalApiLogResource.js +1 -3
  25. package/dist/models/StoreResource.d.ts +1 -1
  26. package/dist/models/StoreResource.js +1 -3
  27. package/dist/models/UpdateLineItemRequest.d.ts +38 -0
  28. package/dist/models/{UpdateCartItemRequest.js → UpdateLineItemRequest.js} +13 -13
  29. package/dist/models/index.d.ts +4 -9
  30. package/dist/models/index.js +4 -9
  31. package/docs/AdminOrderResource.md +2 -6
  32. package/docs/{AttachCartCouponRequest.md → AttachCouponRequest.md} +4 -4
  33. package/docs/{AttachCartItemRequest.md → AttachLineItemRequest.md} +4 -4
  34. package/docs/CartListResource.md +0 -16
  35. package/docs/CartResource.md +2 -2
  36. package/docs/CartsApi.md +16 -16
  37. package/docs/CustomersApi.md +0 -69
  38. package/docs/{DetachCartCouponRequest.md → DetachCouponRequest.md} +4 -4
  39. package/docs/OrdersApi.md +18 -18
  40. package/docs/{UpdateCartItemRequest.md → UpdateLineItemRequest.md} +4 -4
  41. package/package.json +1 -1
  42. package/src/apis/CartsApi.ts +25 -25
  43. package/src/apis/CustomersApi.ts +0 -58
  44. package/src/apis/OrdersApi.ts +26 -26
  45. package/src/models/AddressResource.ts +2 -3
  46. package/src/models/AdminOrderResource.ts +4 -22
  47. package/src/models/AttachCouponRequest.ts +66 -0
  48. package/src/models/{AttachCartItemRequest.ts → AttachLineItemRequest.ts} +13 -13
  49. package/src/models/CartListResource.ts +0 -69
  50. package/src/models/CartResource.ts +4 -4
  51. package/src/models/DetachCouponRequest.ts +66 -0
  52. package/src/models/ExternalApiLogResource.ts +2 -3
  53. package/src/models/StoreResource.ts +2 -3
  54. package/src/models/{UpdateCartItemRequest.ts → UpdateLineItemRequest.ts} +12 -12
  55. package/src/models/index.ts +4 -9
  56. package/dist/models/AttachCartCouponRequest.d.ts +0 -32
  57. package/dist/models/AttachCartCouponRequest.js +0 -51
  58. package/dist/models/AttachCartItemRequest.d.ts +0 -44
  59. package/dist/models/AttachOrderCouponRequest.d.ts +0 -32
  60. package/dist/models/AttachOrderCouponRequest.js +0 -51
  61. package/dist/models/AttachOrderLineItemRequest.d.ts +0 -44
  62. package/dist/models/AttachOrderLineItemRequest.js +0 -57
  63. package/dist/models/DetachCartCouponRequest.d.ts +0 -32
  64. package/dist/models/DetachCartCouponRequest.js +0 -51
  65. package/dist/models/DetachOrderCouponRequest.d.ts +0 -32
  66. package/dist/models/DetachOrderCouponRequest.js +0 -51
  67. package/dist/models/UpdateCartItemRequest.d.ts +0 -38
  68. package/dist/models/UpdateCustomerRequest.d.ts +0 -56
  69. package/dist/models/UpdateCustomerRequest.js +0 -63
  70. package/dist/models/UpdateOrderLineItemRequest.d.ts +0 -38
  71. package/dist/models/UpdateOrderLineItemRequest.js +0 -53
  72. package/docs/AttachOrderCouponRequest.md +0 -34
  73. package/docs/AttachOrderLineItemRequest.md +0 -38
  74. package/docs/DetachOrderCouponRequest.md +0 -34
  75. package/docs/UpdateCustomerRequest.md +0 -42
  76. package/docs/UpdateOrderLineItemRequest.md +0 -36
  77. package/src/models/AttachCartCouponRequest.ts +0 -66
  78. package/src/models/AttachOrderCouponRequest.ts +0 -66
  79. package/src/models/AttachOrderLineItemRequest.ts +0 -83
  80. package/src/models/DetachCartCouponRequest.ts +0 -66
  81. package/src/models/DetachOrderCouponRequest.ts +0 -66
  82. package/src/models/UpdateCustomerRequest.ts +0 -100
  83. package/src/models/UpdateOrderLineItemRequest.ts +0 -74
@@ -33,11 +33,6 @@ import {
33
33
  SearchCustomersRequestFromJSON,
34
34
  SearchCustomersRequestToJSON,
35
35
  } from '../models/SearchCustomersRequest';
36
- import {
37
- type UpdateCustomerRequest,
38
- UpdateCustomerRequestFromJSON,
39
- UpdateCustomerRequestToJSON,
40
- } from '../models/UpdateCustomerRequest';
41
36
 
42
37
  export interface IndexCustomerRequest {
43
38
  searchCustomersRequest?: SearchCustomersRequest;
@@ -51,11 +46,6 @@ export interface StoreCustomerRequest {
51
46
  createCustomerRequest?: CreateCustomerRequest;
52
47
  }
53
48
 
54
- export interface UpdateCustomerOperationRequest {
55
- customer: number;
56
- updateCustomerRequest?: UpdateCustomerRequest;
57
- }
58
-
59
49
  /**
60
50
  *
61
51
  */
@@ -186,52 +176,4 @@ export class CustomersApi extends runtime.BaseAPI {
186
176
  return await response.value();
187
177
  }
188
178
 
189
- /**
190
- * Creates request options for updateCustomer without sending the request
191
- */
192
- async updateCustomerRequestOpts(requestParameters: UpdateCustomerOperationRequest): Promise<runtime.RequestOpts> {
193
- if (requestParameters['customer'] == null) {
194
- throw new runtime.RequiredError(
195
- 'customer',
196
- 'Required parameter "customer" was null or undefined when calling updateCustomer().'
197
- );
198
- }
199
-
200
- const queryParameters: any = {};
201
-
202
- const headerParameters: runtime.HTTPHeaders = {};
203
-
204
- headerParameters['Content-Type'] = 'application/json';
205
-
206
-
207
- let urlPath = `/admin-api/customers/{customer}/update`;
208
- urlPath = urlPath.replace('{customer}', encodeURIComponent(String(requestParameters['customer'])));
209
-
210
- return {
211
- path: urlPath,
212
- method: 'PUT',
213
- headers: headerParameters,
214
- query: queryParameters,
215
- body: UpdateCustomerRequestToJSON(requestParameters['updateCustomerRequest']),
216
- };
217
- }
218
-
219
- /**
220
- * Auto-generated: updateCustomer
221
- */
222
- async updateCustomerRaw(requestParameters: UpdateCustomerOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerResource>> {
223
- const requestOptions = await this.updateCustomerRequestOpts(requestParameters);
224
- const response = await this.request(requestOptions, initOverrides);
225
-
226
- return new runtime.JSONApiResponse(response, (jsonValue) => CustomerResourceFromJSON(jsonValue));
227
- }
228
-
229
- /**
230
- * Auto-generated: updateCustomer
231
- */
232
- async updateCustomer(requestParameters: UpdateCustomerOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerResource> {
233
- const response = await this.updateCustomerRaw(requestParameters, initOverrides);
234
- return await response.value();
235
- }
236
-
237
179
  }
@@ -19,20 +19,20 @@ import {
19
19
  AdminOrderResourceToJSON,
20
20
  } from '../models/AdminOrderResource';
21
21
  import {
22
- type AttachOrderCouponRequest,
23
- AttachOrderCouponRequestFromJSON,
24
- AttachOrderCouponRequestToJSON,
25
- } from '../models/AttachOrderCouponRequest';
22
+ type AttachCouponRequest,
23
+ AttachCouponRequestFromJSON,
24
+ AttachCouponRequestToJSON,
25
+ } from '../models/AttachCouponRequest';
26
26
  import {
27
- type AttachOrderLineItemRequest,
28
- AttachOrderLineItemRequestFromJSON,
29
- AttachOrderLineItemRequestToJSON,
30
- } from '../models/AttachOrderLineItemRequest';
27
+ type AttachLineItemRequest,
28
+ AttachLineItemRequestFromJSON,
29
+ AttachLineItemRequestToJSON,
30
+ } from '../models/AttachLineItemRequest';
31
31
  import {
32
- type DetachOrderCouponRequest,
33
- DetachOrderCouponRequestFromJSON,
34
- DetachOrderCouponRequestToJSON,
35
- } from '../models/DetachOrderCouponRequest';
32
+ type DetachCouponRequest,
33
+ DetachCouponRequestFromJSON,
34
+ DetachCouponRequestToJSON,
35
+ } from '../models/DetachCouponRequest';
36
36
  import {
37
37
  type GenericResponse,
38
38
  GenericResponseFromJSON,
@@ -64,10 +64,10 @@ import {
64
64
  SearchOrdersRequestToJSON,
65
65
  } from '../models/SearchOrdersRequest';
66
66
  import {
67
- type UpdateOrderLineItemRequest,
68
- UpdateOrderLineItemRequestFromJSON,
69
- UpdateOrderLineItemRequestToJSON,
70
- } from '../models/UpdateOrderLineItemRequest';
67
+ type UpdateLineItemRequest,
68
+ UpdateLineItemRequestFromJSON,
69
+ UpdateLineItemRequestToJSON,
70
+ } from '../models/UpdateLineItemRequest';
71
71
  import {
72
72
  type UpdateOrderRequest,
73
73
  UpdateOrderRequestFromJSON,
@@ -76,12 +76,12 @@ import {
76
76
 
77
77
  export interface AttachCouponOrderRequest {
78
78
  order: number;
79
- attachOrderCouponRequest?: AttachOrderCouponRequest;
79
+ attachCouponRequest?: AttachCouponRequest;
80
80
  }
81
81
 
82
82
  export interface AttachItemOrderRequest {
83
83
  order: number;
84
- attachOrderLineItemRequest?: AttachOrderLineItemRequest;
84
+ attachLineItemRequest?: AttachLineItemRequest;
85
85
  }
86
86
 
87
87
  export interface DestroyOrderRequest {
@@ -90,7 +90,7 @@ export interface DestroyOrderRequest {
90
90
 
91
91
  export interface DetachCouponOrderRequest {
92
92
  order: number;
93
- detachOrderCouponRequest?: DetachOrderCouponRequest;
93
+ detachCouponRequest?: DetachCouponRequest;
94
94
  }
95
95
 
96
96
  export interface DetachItemOrderRequest {
@@ -117,7 +117,7 @@ export interface ShowOrderRequest {
117
117
  export interface UpdateItemOrderRequest {
118
118
  order: number;
119
119
  lineItem: number;
120
- updateOrderLineItemRequest?: UpdateOrderLineItemRequest;
120
+ updateLineItemRequest?: UpdateLineItemRequest;
121
121
  }
122
122
 
123
123
  export interface UpdateOrderOperationRequest {
@@ -148,7 +148,7 @@ export class OrdersApi extends runtime.BaseAPI {
148
148
  headerParameters['Content-Type'] = 'application/json';
149
149
 
150
150
 
151
- let urlPath = `/admin-api/orders/{order}/coupon/attach`;
151
+ let urlPath = `/admin-api/orders/{order}/coupons/attach`;
152
152
  urlPath = urlPath.replace('{order}', encodeURIComponent(String(requestParameters['order'])));
153
153
 
154
154
  return {
@@ -156,7 +156,7 @@ export class OrdersApi extends runtime.BaseAPI {
156
156
  method: 'POST',
157
157
  headers: headerParameters,
158
158
  query: queryParameters,
159
- body: AttachOrderCouponRequestToJSON(requestParameters['attachOrderCouponRequest']),
159
+ body: AttachCouponRequestToJSON(requestParameters['attachCouponRequest']),
160
160
  };
161
161
  }
162
162
 
@@ -204,7 +204,7 @@ export class OrdersApi extends runtime.BaseAPI {
204
204
  method: 'POST',
205
205
  headers: headerParameters,
206
206
  query: queryParameters,
207
- body: AttachOrderLineItemRequestToJSON(requestParameters['attachOrderLineItemRequest']),
207
+ body: AttachLineItemRequestToJSON(requestParameters['attachLineItemRequest']),
208
208
  };
209
209
  }
210
210
 
@@ -289,7 +289,7 @@ export class OrdersApi extends runtime.BaseAPI {
289
289
  headerParameters['Content-Type'] = 'application/json';
290
290
 
291
291
 
292
- let urlPath = `/admin-api/orders/{order}/coupon/detach`;
292
+ let urlPath = `/admin-api/orders/{order}/coupons/detach`;
293
293
  urlPath = urlPath.replace('{order}', encodeURIComponent(String(requestParameters['order'])));
294
294
 
295
295
  return {
@@ -297,7 +297,7 @@ export class OrdersApi extends runtime.BaseAPI {
297
297
  method: 'DELETE',
298
298
  headers: headerParameters,
299
299
  query: queryParameters,
300
- body: DetachOrderCouponRequestToJSON(requestParameters['detachOrderCouponRequest']),
300
+ body: DetachCouponRequestToJSON(requestParameters['detachCouponRequest']),
301
301
  };
302
302
  }
303
303
 
@@ -613,7 +613,7 @@ export class OrdersApi extends runtime.BaseAPI {
613
613
  method: 'PUT',
614
614
  headers: headerParameters,
615
615
  query: queryParameters,
616
- body: UpdateOrderLineItemRequestToJSON(requestParameters['updateOrderLineItemRequest']),
616
+ body: UpdateLineItemRequestToJSON(requestParameters['updateLineItemRequest']),
617
617
  };
618
618
  }
619
619
 
@@ -48,7 +48,7 @@ export interface AddressResource {
48
48
  * @type {string}
49
49
  * @memberof AddressResource
50
50
  */
51
- company: string;
51
+ company?: string | null;
52
52
  /**
53
53
  *
54
54
  * @type {string}
@@ -98,7 +98,6 @@ export interface AddressResource {
98
98
  */
99
99
  export function instanceOfAddressResource(value: object): value is AddressResource {
100
100
  if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
101
- if (!('company' in value) || value['company'] === undefined) return false;
102
101
  if (!('line1' in value) || value['line1'] === undefined) return false;
103
102
  if (!('postcode' in value) || value['postcode'] === undefined) return false;
104
103
  if (!('suburb' in value) || value['suburb'] === undefined) return false;
@@ -122,7 +121,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
122
121
  'type': json['type'] == null ? undefined : json['type'],
123
122
  'sourceAddressId': json['sourceAddressId'] == null ? undefined : json['sourceAddressId'],
124
123
  'addresseeName': json['addresseeName'],
125
- 'company': json['company'],
124
+ 'company': json['company'] == null ? undefined : json['company'],
126
125
  'line1': json['line1'],
127
126
  'line2': json['line2'] == null ? undefined : json['line2'],
128
127
  'postcode': json['postcode'],
@@ -155,7 +155,7 @@ export interface AdminOrderResource {
155
155
  * @type {number}
156
156
  * @memberof AdminOrderResource
157
157
  */
158
- insuranceAmount: number;
158
+ lockedInsuranceAmount: number;
159
159
  /**
160
160
  *
161
161
  * @type {boolean}
@@ -270,18 +270,6 @@ export interface AdminOrderResource {
270
270
  * @memberof AdminOrderResource
271
271
  */
272
272
  totalOutstanding: number;
273
- /**
274
- *
275
- * @type {number}
276
- * @memberof AdminOrderResource
277
- */
278
- discountPreview: number;
279
- /**
280
- *
281
- * @type {number}
282
- * @memberof AdminOrderResource
283
- */
284
- shippingEstimate: number;
285
273
  /**
286
274
  *
287
275
  * @type {number}
@@ -365,7 +353,7 @@ export function instanceOfAdminOrderResource(value: object): value is AdminOrder
365
353
  if (!('source' in value) || value['source'] === undefined) return false;
366
354
  if (!('shippingType' in value) || value['shippingType'] === undefined) return false;
367
355
  if (!('overrideShipping' in value) || value['overrideShipping'] === undefined) return false;
368
- if (!('insuranceAmount' in value) || value['insuranceAmount'] === undefined) return false;
356
+ if (!('lockedInsuranceAmount' in value) || value['lockedInsuranceAmount'] === undefined) return false;
369
357
  if (!('includeInsurance' in value) || value['includeInsurance'] === undefined) return false;
370
358
  if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined) return false;
371
359
  if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined) return false;
@@ -385,8 +373,6 @@ export function instanceOfAdminOrderResource(value: object): value is AdminOrder
385
373
  if (!('grandTotal' in value) || value['grandTotal'] === undefined) return false;
386
374
  if (!('totalPaid' in value) || value['totalPaid'] === undefined) return false;
387
375
  if (!('totalOutstanding' in value) || value['totalOutstanding'] === undefined) return false;
388
- if (!('discountPreview' in value) || value['discountPreview'] === undefined) return false;
389
- if (!('shippingEstimate' in value) || value['shippingEstimate'] === undefined) return false;
390
376
  if (!('insuranceEstimate' in value) || value['insuranceEstimate'] === undefined) return false;
391
377
  if (!('site' in value) || value['site'] === undefined) return false;
392
378
  if (!('customer' in value) || value['customer'] === undefined) return false;
@@ -422,7 +408,7 @@ export function AdminOrderResourceFromJSONTyped(json: any, ignoreDiscriminator:
422
408
  'shippingType': json['shippingType'],
423
409
  'shippingSubtotal': json['shippingSubtotal'] == null ? undefined : json['shippingSubtotal'],
424
410
  'overrideShipping': json['overrideShipping'],
425
- 'insuranceAmount': json['insuranceAmount'],
411
+ 'lockedInsuranceAmount': json['lockedInsuranceAmount'],
426
412
  'includeInsurance': json['includeInsurance'],
427
413
  'overrideInsurance': json['overrideInsurance'],
428
414
  'useAsBillingAddress': json['useAsBillingAddress'],
@@ -442,8 +428,6 @@ export function AdminOrderResourceFromJSONTyped(json: any, ignoreDiscriminator:
442
428
  'grandTotal': json['grandTotal'],
443
429
  'totalPaid': json['totalPaid'],
444
430
  'totalOutstanding': json['totalOutstanding'],
445
- 'discountPreview': json['discountPreview'],
446
- 'shippingEstimate': json['shippingEstimate'],
447
431
  'insuranceEstimate': json['insuranceEstimate'],
448
432
  'site': SiteLiteResourceFromJSON(json['site']),
449
433
  'customer': CustomerResourceFromJSON(json['customer']),
@@ -480,7 +464,7 @@ export function AdminOrderResourceToJSONTyped(value?: AdminOrderResource | null,
480
464
  'shippingType': value['shippingType'],
481
465
  'shippingSubtotal': value['shippingSubtotal'],
482
466
  'overrideShipping': value['overrideShipping'],
483
- 'insuranceAmount': value['insuranceAmount'],
467
+ 'lockedInsuranceAmount': value['lockedInsuranceAmount'],
484
468
  'includeInsurance': value['includeInsurance'],
485
469
  'overrideInsurance': value['overrideInsurance'],
486
470
  'useAsBillingAddress': value['useAsBillingAddress'],
@@ -500,8 +484,6 @@ export function AdminOrderResourceToJSONTyped(value?: AdminOrderResource | null,
500
484
  'grandTotal': value['grandTotal'],
501
485
  'totalPaid': value['totalPaid'],
502
486
  'totalOutstanding': value['totalOutstanding'],
503
- 'discountPreview': value['discountPreview'],
504
- 'shippingEstimate': value['shippingEstimate'],
505
487
  'insuranceEstimate': value['insuranceEstimate'],
506
488
  'site': SiteLiteResourceToJSON(value['site']),
507
489
  'customer': CustomerResourceToJSON(value['customer']),
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * My API
5
+ * API documentation for my Laravel app
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface AttachCouponRequest
20
+ */
21
+ export interface AttachCouponRequest {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AttachCouponRequest
26
+ */
27
+ couponCode: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the AttachCouponRequest interface.
32
+ */
33
+ export function instanceOfAttachCouponRequest(value: object): value is AttachCouponRequest {
34
+ if (!('couponCode' in value) || value['couponCode'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function AttachCouponRequestFromJSON(json: any): AttachCouponRequest {
39
+ return AttachCouponRequestFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function AttachCouponRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttachCouponRequest {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'couponCode': json['coupon_code'],
49
+ };
50
+ }
51
+
52
+ export function AttachCouponRequestToJSON(json: any): AttachCouponRequest {
53
+ return AttachCouponRequestToJSONTyped(json, false);
54
+ }
55
+
56
+ export function AttachCouponRequestToJSONTyped(value?: AttachCouponRequest | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'coupon_code': value['couponCode'],
64
+ };
65
+ }
66
+
@@ -16,43 +16,43 @@ import { mapValues } from '../runtime';
16
16
  /**
17
17
  *
18
18
  * @export
19
- * @interface AttachCartItemRequest
19
+ * @interface AttachLineItemRequest
20
20
  */
21
- export interface AttachCartItemRequest {
21
+ export interface AttachLineItemRequest {
22
22
  /**
23
23
  *
24
24
  * @type {number}
25
- * @memberof AttachCartItemRequest
25
+ * @memberof AttachLineItemRequest
26
26
  */
27
27
  productChildId: number;
28
28
  /**
29
29
  *
30
30
  * @type {number}
31
- * @memberof AttachCartItemRequest
31
+ * @memberof AttachLineItemRequest
32
32
  */
33
33
  quantity: number;
34
34
  /**
35
35
  *
36
36
  * @type {number}
37
- * @memberof AttachCartItemRequest
37
+ * @memberof AttachLineItemRequest
38
38
  */
39
39
  productPrice?: number | null;
40
40
  }
41
41
 
42
42
  /**
43
- * Check if a given object implements the AttachCartItemRequest interface.
43
+ * Check if a given object implements the AttachLineItemRequest interface.
44
44
  */
45
- export function instanceOfAttachCartItemRequest(value: object): value is AttachCartItemRequest {
45
+ export function instanceOfAttachLineItemRequest(value: object): value is AttachLineItemRequest {
46
46
  if (!('productChildId' in value) || value['productChildId'] === undefined) return false;
47
47
  if (!('quantity' in value) || value['quantity'] === undefined) return false;
48
48
  return true;
49
49
  }
50
50
 
51
- export function AttachCartItemRequestFromJSON(json: any): AttachCartItemRequest {
52
- return AttachCartItemRequestFromJSONTyped(json, false);
51
+ export function AttachLineItemRequestFromJSON(json: any): AttachLineItemRequest {
52
+ return AttachLineItemRequestFromJSONTyped(json, false);
53
53
  }
54
54
 
55
- export function AttachCartItemRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttachCartItemRequest {
55
+ export function AttachLineItemRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttachLineItemRequest {
56
56
  if (json == null) {
57
57
  return json;
58
58
  }
@@ -64,11 +64,11 @@ export function AttachCartItemRequestFromJSONTyped(json: any, ignoreDiscriminato
64
64
  };
65
65
  }
66
66
 
67
- export function AttachCartItemRequestToJSON(json: any): AttachCartItemRequest {
68
- return AttachCartItemRequestToJSONTyped(json, false);
67
+ export function AttachLineItemRequestToJSON(json: any): AttachLineItemRequest {
68
+ return AttachLineItemRequestToJSONTyped(json, false);
69
69
  }
70
70
 
71
- export function AttachCartItemRequestToJSONTyped(value?: AttachCartItemRequest | null, ignoreDiscriminator: boolean = false): any {
71
+ export function AttachLineItemRequestToJSONTyped(value?: AttachLineItemRequest | null, ignoreDiscriminator: boolean = false): any {
72
72
  if (value == null) {
73
73
  return value;
74
74
  }
@@ -59,54 +59,6 @@ export interface CartListResource {
59
59
  * @memberof CartListResource
60
60
  */
61
61
  source: string;
62
- /**
63
- *
64
- * @type {string}
65
- * @memberof CartListResource
66
- */
67
- shippingType?: string | null;
68
- /**
69
- *
70
- * @type {number}
71
- * @memberof CartListResource
72
- */
73
- shippingSubtotal?: number | null;
74
- /**
75
- *
76
- * @type {boolean}
77
- * @memberof CartListResource
78
- */
79
- overrideShipping: boolean;
80
- /**
81
- *
82
- * @type {number}
83
- * @memberof CartListResource
84
- */
85
- insuranceAmount?: number | null;
86
- /**
87
- *
88
- * @type {boolean}
89
- * @memberof CartListResource
90
- */
91
- includeInsurance: boolean;
92
- /**
93
- *
94
- * @type {boolean}
95
- * @memberof CartListResource
96
- */
97
- overrideInsurance: boolean;
98
- /**
99
- *
100
- * @type {boolean}
101
- * @memberof CartListResource
102
- */
103
- useAsBillingAddress: boolean;
104
- /**
105
- *
106
- * @type {Date}
107
- * @memberof CartListResource
108
- */
109
- expiryDate: Date;
110
62
  /**
111
63
  *
112
64
  * @type {Date}
@@ -156,11 +108,6 @@ export interface CartListResource {
156
108
  */
157
109
  export function instanceOfCartListResource(value: object): value is CartListResource {
158
110
  if (!('source' in value) || value['source'] === undefined) return false;
159
- if (!('overrideShipping' in value) || value['overrideShipping'] === undefined) return false;
160
- if (!('includeInsurance' in value) || value['includeInsurance'] === undefined) return false;
161
- if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined) return false;
162
- if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined) return false;
163
- if (!('expiryDate' in value) || value['expiryDate'] === undefined) return false;
164
111
  if (!('site' in value) || value['site'] === undefined) return false;
165
112
  if (!('customer' in value) || value['customer'] === undefined) return false;
166
113
  if (!('lineItems' in value) || value['lineItems'] === undefined) return false;
@@ -182,14 +129,6 @@ export function CartListResourceFromJSONTyped(json: any, ignoreDiscriminator: bo
182
129
  'id': json['id'] == null ? undefined : json['id'],
183
130
  'guestEmail': json['guestEmail'] == null ? undefined : json['guestEmail'],
184
131
  'source': json['source'],
185
- 'shippingType': json['shippingType'] == null ? undefined : json['shippingType'],
186
- 'shippingSubtotal': json['shippingSubtotal'] == null ? undefined : json['shippingSubtotal'],
187
- 'overrideShipping': json['overrideShipping'],
188
- 'insuranceAmount': json['insuranceAmount'] == null ? undefined : json['insuranceAmount'],
189
- 'includeInsurance': json['includeInsurance'],
190
- 'overrideInsurance': json['overrideInsurance'],
191
- 'useAsBillingAddress': json['useAsBillingAddress'],
192
- 'expiryDate': (new Date(json['expiryDate'])),
193
132
  'checkoutCompletedAt': json['checkoutCompletedAt'] == null ? undefined : (new Date(json['checkoutCompletedAt'])),
194
133
  'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
195
134
  'site': SiteLiteResourceFromJSON(json['site']),
@@ -214,14 +153,6 @@ export function CartListResourceToJSONTyped(value?: CartListResource | null, ign
214
153
  'id': value['id'],
215
154
  'guestEmail': value['guestEmail'],
216
155
  'source': value['source'],
217
- 'shippingType': value['shippingType'],
218
- 'shippingSubtotal': value['shippingSubtotal'],
219
- 'overrideShipping': value['overrideShipping'],
220
- 'insuranceAmount': value['insuranceAmount'],
221
- 'includeInsurance': value['includeInsurance'],
222
- 'overrideInsurance': value['overrideInsurance'],
223
- 'useAsBillingAddress': value['useAsBillingAddress'],
224
- 'expiryDate': value['expiryDate'].toISOString(),
225
156
  'checkoutCompletedAt': value['checkoutCompletedAt'] == null ? value['checkoutCompletedAt'] : value['checkoutCompletedAt'].toISOString(),
226
157
  'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
227
158
  'site': SiteLiteResourceToJSON(value['site']),
@@ -129,10 +129,10 @@ export interface CartResource {
129
129
  overrideShipping: boolean;
130
130
  /**
131
131
  *
132
- * @type {number}
132
+ * @type {string}
133
133
  * @memberof CartResource
134
134
  */
135
- insuranceAmount?: number | null;
135
+ lockedInsuranceAmount?: string | null;
136
136
  /**
137
137
  *
138
138
  * @type {boolean}
@@ -315,7 +315,7 @@ export function CartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolea
315
315
  'shippingType': json['shippingType'],
316
316
  'shippingSubtotal': json['shippingSubtotal'] == null ? undefined : json['shippingSubtotal'],
317
317
  'overrideShipping': json['overrideShipping'],
318
- 'insuranceAmount': json['insuranceAmount'] == null ? undefined : json['insuranceAmount'],
318
+ 'lockedInsuranceAmount': json['lockedInsuranceAmount'] == null ? undefined : json['lockedInsuranceAmount'],
319
319
  'includeInsurance': json['includeInsurance'],
320
320
  'overrideInsurance': json['overrideInsurance'],
321
321
  'useAsBillingAddress': json['useAsBillingAddress'],
@@ -363,7 +363,7 @@ export function CartResourceToJSONTyped(value?: CartResource | null, ignoreDiscr
363
363
  'shippingType': value['shippingType'],
364
364
  'shippingSubtotal': value['shippingSubtotal'],
365
365
  'overrideShipping': value['overrideShipping'],
366
- 'insuranceAmount': value['insuranceAmount'],
366
+ 'lockedInsuranceAmount': value['lockedInsuranceAmount'],
367
367
  'includeInsurance': value['includeInsurance'],
368
368
  'overrideInsurance': value['overrideInsurance'],
369
369
  'useAsBillingAddress': value['useAsBillingAddress'],
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * My API
5
+ * API documentation for my Laravel app
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface DetachCouponRequest
20
+ */
21
+ export interface DetachCouponRequest {
22
+ /**
23
+ *
24
+ * @type {Array<number>}
25
+ * @memberof DetachCouponRequest
26
+ */
27
+ couponIds: Array<number>;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the DetachCouponRequest interface.
32
+ */
33
+ export function instanceOfDetachCouponRequest(value: object): value is DetachCouponRequest {
34
+ if (!('couponIds' in value) || value['couponIds'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function DetachCouponRequestFromJSON(json: any): DetachCouponRequest {
39
+ return DetachCouponRequestFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function DetachCouponRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DetachCouponRequest {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'couponIds': json['coupon_ids'],
49
+ };
50
+ }
51
+
52
+ export function DetachCouponRequestToJSON(json: any): DetachCouponRequest {
53
+ return DetachCouponRequestToJSONTyped(json, false);
54
+ }
55
+
56
+ export function DetachCouponRequestToJSONTyped(value?: DetachCouponRequest | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'coupon_ids': value['couponIds'],
64
+ };
65
+ }
66
+
@@ -74,7 +74,7 @@ export interface ExternalApiLogResource {
74
74
  * @type {string}
75
75
  * @memberof ExternalApiLogResource
76
76
  */
77
- requestPayload: string;
77
+ requestPayload?: string | null;
78
78
  /**
79
79
  *
80
80
  * @type {string}
@@ -106,7 +106,6 @@ export function instanceOfExternalApiLogResource(value: object): value is Extern
106
106
  if (!('exteranlApiLoggableId' in value) || value['exteranlApiLoggableId'] === undefined) return false;
107
107
  if (!('endpoint' in value) || value['endpoint'] === undefined) return false;
108
108
  if (!('responseCode' in value) || value['responseCode'] === undefined) return false;
109
- if (!('requestPayload' in value) || value['requestPayload'] === undefined) return false;
110
109
  if (!('responsePayload' in value) || value['responsePayload'] === undefined) return false;
111
110
  if (!('site' in value) || value['site'] === undefined) return false;
112
111
  return true;
@@ -129,7 +128,7 @@ export function ExternalApiLogResourceFromJSONTyped(json: any, ignoreDiscriminat
129
128
  'exteranlApiLoggableId': json['exteranlApiLoggableId'],
130
129
  'endpoint': json['endpoint'],
131
130
  'responseCode': json['responseCode'],
132
- 'requestPayload': json['requestPayload'],
131
+ 'requestPayload': json['requestPayload'] == null ? undefined : json['requestPayload'],
133
132
  'responsePayload': json['responsePayload'],
134
133
  'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
135
134
  'site': SiteLiteResourceFromJSON(json['site']),