@digital8/lighting-illusions-ts-sdk 0.0.1933 → 0.0.1934

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 (92) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +8 -2
  3. package/dist/apis/OrdersApi.d.ts +37 -2
  4. package/dist/apis/OrdersApi.js +126 -1
  5. package/dist/models/AddressFrontendResource.d.ts +1 -1
  6. package/dist/models/AddressFrontendResource.js +1 -3
  7. package/dist/models/AddressResource.d.ts +7 -1
  8. package/dist/models/AddressResource.js +7 -1
  9. package/dist/models/AdminOrderResource.d.ts +16 -4
  10. package/dist/models/AdminOrderResource.js +15 -7
  11. package/dist/models/AttachCouponOrderRequest.d.ts +32 -0
  12. package/dist/models/AttachCouponOrderRequest.js +51 -0
  13. package/dist/models/CartListResource.d.ts +6 -0
  14. package/dist/models/CartListResource.js +4 -0
  15. package/dist/models/CartResource.d.ts +15 -3
  16. package/dist/models/CartResource.js +12 -6
  17. package/dist/models/DetachCouponOrderRequest.d.ts +32 -0
  18. package/dist/models/DetachCouponOrderRequest.js +51 -0
  19. package/dist/models/ExternalApiLogResource.d.ts +1 -1
  20. package/dist/models/ExternalApiLogResource.js +1 -3
  21. package/dist/models/GetAllOrderRequest.d.ts +1 -0
  22. package/dist/models/GetAllOrderRequest.js +2 -1
  23. package/dist/models/IndexOrderRequest.d.ts +1 -0
  24. package/dist/models/IndexOrderRequest.js +2 -1
  25. package/dist/models/OrderListResource.d.ts +18 -0
  26. package/dist/models/OrderListResource.js +10 -0
  27. package/dist/models/OrderStatusWithCountResource.d.ts +50 -0
  28. package/dist/models/OrderStatusWithCountResource.js +63 -0
  29. package/dist/models/OrderStatusWithCountResourceArrayResponse.d.ts +33 -0
  30. package/dist/models/OrderStatusWithCountResourceArrayResponse.js +50 -0
  31. package/dist/models/StoreCartRequest.d.ts +6 -0
  32. package/dist/models/StoreCartRequest.js +2 -0
  33. package/dist/models/StoreCartRequestShippingAddress.d.ts +6 -0
  34. package/dist/models/StoreCartRequestShippingAddress.js +2 -0
  35. package/dist/models/StoreFrontendResource.d.ts +2 -2
  36. package/dist/models/StoreFrontendResource.js +6 -2
  37. package/dist/models/StoreResource.d.ts +1 -1
  38. package/dist/models/StoreResource.js +1 -3
  39. package/dist/models/StoreStoreRequestAddress.d.ts +6 -0
  40. package/dist/models/StoreStoreRequestAddress.js +2 -0
  41. package/dist/models/UpdateCartRequest.d.ts +6 -0
  42. package/dist/models/UpdateCartRequest.js +2 -0
  43. package/dist/models/UpdateOrderRequest.d.ts +6 -0
  44. package/dist/models/UpdateOrderRequest.js +2 -0
  45. package/dist/models/UpdateOrderRequestBillingAddress.d.ts +1 -7
  46. package/dist/models/UpdateOrderRequestBillingAddress.js +3 -5
  47. package/dist/models/UpdateOrderRequestShippingAddress.d.ts +1 -7
  48. package/dist/models/UpdateOrderRequestShippingAddress.js +2 -6
  49. package/dist/models/index.d.ts +4 -0
  50. package/dist/models/index.js +4 -0
  51. package/docs/AddressResource.md +2 -0
  52. package/docs/AdminOrderResource.md +7 -3
  53. package/docs/AttachCouponOrderRequest.md +34 -0
  54. package/docs/CartListResource.md +2 -0
  55. package/docs/CartResource.md +8 -4
  56. package/docs/DetachCouponOrderRequest.md +34 -0
  57. package/docs/OrderListResource.md +6 -0
  58. package/docs/OrderStatusWithCountResource.md +40 -0
  59. package/docs/OrderStatusWithCountResourceArrayResponse.md +34 -0
  60. package/docs/OrdersApi.md +141 -3
  61. package/docs/StoreCartRequest.md +2 -0
  62. package/docs/StoreCartRequestShippingAddress.md +2 -0
  63. package/docs/StoreStoreRequestAddress.md +2 -0
  64. package/docs/UpdateCartRequest.md +2 -0
  65. package/docs/UpdateOrderRequest.md +2 -0
  66. package/docs/UpdateOrderRequestBillingAddress.md +2 -4
  67. package/docs/UpdateOrderRequestShippingAddress.md +2 -4
  68. package/package.json +1 -1
  69. package/src/apis/OrdersApi.ts +124 -3
  70. package/src/models/AddressFrontendResource.ts +2 -3
  71. package/src/models/AddressResource.ts +12 -2
  72. package/src/models/AdminOrderResource.ts +28 -10
  73. package/src/models/AttachCouponOrderRequest.ts +66 -0
  74. package/src/models/CartListResource.ts +9 -0
  75. package/src/models/CartResource.ts +26 -9
  76. package/src/models/DetachCouponOrderRequest.ts +66 -0
  77. package/src/models/ExternalApiLogResource.ts +2 -3
  78. package/src/models/GetAllOrderRequest.ts +2 -1
  79. package/src/models/IndexOrderRequest.ts +2 -1
  80. package/src/models/OrderListResource.ts +26 -0
  81. package/src/models/OrderStatusWithCountResource.ts +93 -0
  82. package/src/models/OrderStatusWithCountResourceArrayResponse.ts +73 -0
  83. package/src/models/StoreCartRequest.ts +8 -0
  84. package/src/models/StoreCartRequestShippingAddress.ts +8 -0
  85. package/src/models/StoreFrontendResource.ts +6 -4
  86. package/src/models/StoreResource.ts +2 -3
  87. package/src/models/StoreStoreRequestAddress.ts +8 -0
  88. package/src/models/UpdateCartRequest.ts +8 -0
  89. package/src/models/UpdateOrderRequest.ts +8 -0
  90. package/src/models/UpdateOrderRequestBillingAddress.ts +4 -12
  91. package/src/models/UpdateOrderRequestShippingAddress.ts +3 -12
  92. package/src/models/index.ts +4 -0
@@ -100,6 +100,12 @@ export interface AdminOrderResource {
100
100
  * @memberof AdminOrderResource
101
101
  */
102
102
  insuranceAmount: number;
103
+ /**
104
+ *
105
+ * @type {boolean}
106
+ * @memberof AdminOrderResource
107
+ */
108
+ includeInsurance: boolean;
103
109
  /**
104
110
  *
105
111
  * @type {boolean}
@@ -124,6 +130,12 @@ export interface AdminOrderResource {
124
130
  * @memberof AdminOrderResource
125
131
  */
126
132
  isNetsuiteLocked: boolean;
133
+ /**
134
+ *
135
+ * @type {boolean}
136
+ * @memberof AdminOrderResource
137
+ */
138
+ isDisabled: boolean;
127
139
  /**
128
140
  *
129
141
  * @type {string}
@@ -147,7 +159,7 @@ export interface AdminOrderResource {
147
159
  * @type {number}
148
160
  * @memberof AdminOrderResource
149
161
  */
150
- cartDiscountAmount: number;
162
+ subtotalDiscountAmount: number;
151
163
  /**
152
164
  *
153
165
  * @type {number}
@@ -159,7 +171,7 @@ export interface AdminOrderResource {
159
171
  * @type {number}
160
172
  * @memberof AdminOrderResource
161
173
  */
162
- shippingAmount?: number | null;
174
+ shippingAmount: number;
163
175
  /**
164
176
  *
165
177
  * @type {number}
@@ -264,10 +276,10 @@ export interface AdminOrderResource {
264
276
  billingAddress: object;
265
277
  /**
266
278
  *
267
- * @type {object}
279
+ * @type {string}
268
280
  * @memberof AdminOrderResource
269
281
  */
270
- omnisendSync: object;
282
+ omnisendSync?: string | null;
271
283
  }
272
284
 
273
285
  /**
@@ -279,13 +291,16 @@ export function instanceOfAdminOrderResource(value: object): value is AdminOrder
279
291
  if (!('shippingType' in value) || value['shippingType'] === undefined) return false;
280
292
  if (!('overrideShipping' in value) || value['overrideShipping'] === undefined) return false;
281
293
  if (!('insuranceAmount' in value) || value['insuranceAmount'] === undefined) return false;
294
+ if (!('includeInsurance' in value) || value['includeInsurance'] === undefined) return false;
282
295
  if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined) return false;
283
296
  if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined) return false;
284
297
  if (!('isNetsuiteLocked' in value) || value['isNetsuiteLocked'] === undefined) return false;
298
+ if (!('isDisabled' in value) || value['isDisabled'] === undefined) return false;
285
299
  if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
286
300
  if (!('productDiscountAmount' in value) || value['productDiscountAmount'] === undefined) return false;
287
- if (!('cartDiscountAmount' in value) || value['cartDiscountAmount'] === undefined) return false;
301
+ if (!('subtotalDiscountAmount' in value) || value['subtotalDiscountAmount'] === undefined) return false;
288
302
  if (!('shippingDiscountAmount' in value) || value['shippingDiscountAmount'] === undefined) return false;
303
+ if (!('shippingAmount' in value) || value['shippingAmount'] === undefined) return false;
289
304
  if (!('total' in value) || value['total'] === undefined) return false;
290
305
  if (!('discountAmount' in value) || value['discountAmount'] === undefined) return false;
291
306
  if (!('finalTotalAmount' in value) || value['finalTotalAmount'] === undefined) return false;
@@ -303,7 +318,6 @@ export function instanceOfAdminOrderResource(value: object): value is AdminOrder
303
318
  if (!('coupons' in value) || value['coupons'] === undefined) return false;
304
319
  if (!('shippingAddress' in value) || value['shippingAddress'] === undefined) return false;
305
320
  if (!('billingAddress' in value) || value['billingAddress'] === undefined) return false;
306
- if (!('omnisendSync' in value) || value['omnisendSync'] === undefined) return false;
307
321
  return true;
308
322
  }
309
323
 
@@ -328,16 +342,18 @@ export function AdminOrderResourceFromJSONTyped(json: any, ignoreDiscriminator:
328
342
  'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
329
343
  'overrideShipping': json['override_shipping'],
330
344
  'insuranceAmount': json['insurance_amount'],
345
+ 'includeInsurance': json['include_insurance'],
331
346
  'overrideInsurance': json['override_insurance'],
332
347
  'useAsBillingAddress': json['use_as_billing_address'],
333
348
  'netsuiteId': json['netsuite_id'] == null ? undefined : json['netsuite_id'],
334
349
  'isNetsuiteLocked': json['is_netsuite_locked'],
350
+ 'isDisabled': json['is_disabled'],
335
351
  'omnisendId': json['omnisend_id'] == null ? undefined : json['omnisend_id'],
336
352
  'subtotal': json['subtotal'],
337
353
  'productDiscountAmount': json['product_discount_amount'],
338
- 'cartDiscountAmount': json['cart_discount_amount'],
354
+ 'subtotalDiscountAmount': json['subtotal_discount_amount'],
339
355
  'shippingDiscountAmount': json['shipping_discount_amount'],
340
- 'shippingAmount': json['shipping_amount'] == null ? undefined : json['shipping_amount'],
356
+ 'shippingAmount': json['shipping_amount'],
341
357
  'total': json['total'],
342
358
  'discountAmount': json['discount_amount'],
343
359
  'finalTotalAmount': json['final_total_amount'],
@@ -355,7 +371,7 @@ export function AdminOrderResourceFromJSONTyped(json: any, ignoreDiscriminator:
355
371
  'coupons': json['coupons'],
356
372
  'shippingAddress': json['shipping_address'],
357
373
  'billingAddress': json['billing_address'],
358
- 'omnisendSync': json['omnisend_sync'],
374
+ 'omnisendSync': json['omnisend_sync'] == null ? undefined : json['omnisend_sync'],
359
375
  };
360
376
  }
361
377
 
@@ -381,14 +397,16 @@ export function AdminOrderResourceToJSONTyped(value?: AdminOrderResource | null,
381
397
  'shipping_subtotal': value['shippingSubtotal'],
382
398
  'override_shipping': value['overrideShipping'],
383
399
  'insurance_amount': value['insuranceAmount'],
400
+ 'include_insurance': value['includeInsurance'],
384
401
  'override_insurance': value['overrideInsurance'],
385
402
  'use_as_billing_address': value['useAsBillingAddress'],
386
403
  'netsuite_id': value['netsuiteId'],
387
404
  'is_netsuite_locked': value['isNetsuiteLocked'],
405
+ 'is_disabled': value['isDisabled'],
388
406
  'omnisend_id': value['omnisendId'],
389
407
  'subtotal': value['subtotal'],
390
408
  'product_discount_amount': value['productDiscountAmount'],
391
- 'cart_discount_amount': value['cartDiscountAmount'],
409
+ 'subtotal_discount_amount': value['subtotalDiscountAmount'],
392
410
  'shipping_discount_amount': value['shippingDiscountAmount'],
393
411
  'shipping_amount': value['shippingAmount'],
394
412
  'total': value['total'],
@@ -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 AttachCouponOrderRequest
20
+ */
21
+ export interface AttachCouponOrderRequest {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AttachCouponOrderRequest
26
+ */
27
+ couponCode: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the AttachCouponOrderRequest interface.
32
+ */
33
+ export function instanceOfAttachCouponOrderRequest(value: object): value is AttachCouponOrderRequest {
34
+ if (!('couponCode' in value) || value['couponCode'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function AttachCouponOrderRequestFromJSON(json: any): AttachCouponOrderRequest {
39
+ return AttachCouponOrderRequestFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function AttachCouponOrderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttachCouponOrderRequest {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'couponCode': json['coupon_code'],
49
+ };
50
+ }
51
+
52
+ export function AttachCouponOrderRequestToJSON(json: any): AttachCouponOrderRequest {
53
+ return AttachCouponOrderRequestToJSONTyped(json, false);
54
+ }
55
+
56
+ export function AttachCouponOrderRequestToJSONTyped(value?: AttachCouponOrderRequest | 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
+
@@ -83,6 +83,12 @@ export interface CartListResource {
83
83
  * @memberof CartListResource
84
84
  */
85
85
  insuranceAmount?: number | null;
86
+ /**
87
+ *
88
+ * @type {boolean}
89
+ * @memberof CartListResource
90
+ */
91
+ includeInsurance: boolean;
86
92
  /**
87
93
  *
88
94
  * @type {boolean}
@@ -151,6 +157,7 @@ export interface CartListResource {
151
157
  export function instanceOfCartListResource(value: object): value is CartListResource {
152
158
  if (!('source' in value) || value['source'] === undefined) return false;
153
159
  if (!('overrideShipping' in value) || value['overrideShipping'] === undefined) return false;
160
+ if (!('includeInsurance' in value) || value['includeInsurance'] === undefined) return false;
154
161
  if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined) return false;
155
162
  if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined) return false;
156
163
  if (!('expiryDate' in value) || value['expiryDate'] === undefined) return false;
@@ -179,6 +186,7 @@ export function CartListResourceFromJSONTyped(json: any, ignoreDiscriminator: bo
179
186
  'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
180
187
  'overrideShipping': json['override_shipping'],
181
188
  'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
189
+ 'includeInsurance': json['include_insurance'],
182
190
  'overrideInsurance': json['override_insurance'],
183
191
  'useAsBillingAddress': json['use_as_billing_address'],
184
192
  'expiryDate': (new Date(json['expiry_date'])),
@@ -210,6 +218,7 @@ export function CartListResourceToJSONTyped(value?: CartListResource | null, ign
210
218
  'shipping_subtotal': value['shippingSubtotal'],
211
219
  'override_shipping': value['overrideShipping'],
212
220
  'insurance_amount': value['insuranceAmount'],
221
+ 'include_insurance': value['includeInsurance'],
213
222
  'override_insurance': value['overrideInsurance'],
214
223
  'use_as_billing_address': value['useAsBillingAddress'],
215
224
  'expiry_date': value['expiryDate'].toISOString(),
@@ -129,10 +129,16 @@ 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;
135
+ insuranceSubtotal?: string | null;
136
+ /**
137
+ *
138
+ * @type {boolean}
139
+ * @memberof CartResource
140
+ */
141
+ includeInsurance: boolean;
136
142
  /**
137
143
  *
138
144
  * @type {boolean}
@@ -205,6 +211,12 @@ export interface CartResource {
205
211
  * @memberof CartResource
206
212
  */
207
213
  shippingAmount: number;
214
+ /**
215
+ *
216
+ * @type {number}
217
+ * @memberof CartResource
218
+ */
219
+ insuranceAmount: number;
208
220
  /**
209
221
  *
210
222
  * @type {number}
@@ -234,7 +246,7 @@ export interface CartResource {
234
246
  * @type {number}
235
247
  * @memberof CartResource
236
248
  */
237
- cartDiscountAmount: number;
249
+ subtotalDiscountAmount: number;
238
250
  /**
239
251
  *
240
252
  * @type {number}
@@ -257,7 +269,7 @@ export function instanceOfCartResource(value: object): value is CartResource {
257
269
  if (!('expiryDate' in value) || value['expiryDate'] === undefined) return false;
258
270
  if (!('shippingType' in value) || value['shippingType'] === undefined) return false;
259
271
  if (!('overrideShipping' in value) || value['overrideShipping'] === undefined) return false;
260
- if (!('insuranceAmount' in value) || value['insuranceAmount'] === undefined) return false;
272
+ if (!('includeInsurance' in value) || value['includeInsurance'] === undefined) return false;
261
273
  if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined) return false;
262
274
  if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined) return false;
263
275
  if (!('admin' in value) || value['admin'] === undefined) return false;
@@ -270,11 +282,12 @@ export function instanceOfCartResource(value: object): value is CartResource {
270
282
  if (!('discountPreview' in value) || value['discountPreview'] === undefined) return false;
271
283
  if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
272
284
  if (!('shippingAmount' in value) || value['shippingAmount'] === undefined) return false;
285
+ if (!('insuranceAmount' in value) || value['insuranceAmount'] === undefined) return false;
273
286
  if (!('total' in value) || value['total'] === undefined) return false;
274
287
  if (!('discountAmount' in value) || value['discountAmount'] === undefined) return false;
275
288
  if (!('productDiscountAmount' in value) || value['productDiscountAmount'] === undefined) return false;
276
289
  if (!('shippingDiscountAmount' in value) || value['shippingDiscountAmount'] === undefined) return false;
277
- if (!('cartDiscountAmount' in value) || value['cartDiscountAmount'] === undefined) return false;
290
+ if (!('subtotalDiscountAmount' in value) || value['subtotalDiscountAmount'] === undefined) return false;
278
291
  if (!('finalTotalAmount' in value) || value['finalTotalAmount'] === undefined) return false;
279
292
  if (!('status' in value) || value['status'] === undefined) return false;
280
293
  return true;
@@ -302,7 +315,8 @@ export function CartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolea
302
315
  'shippingType': json['shipping_type'],
303
316
  'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
304
317
  'overrideShipping': json['override_shipping'],
305
- 'insuranceAmount': json['insurance_amount'],
318
+ 'insuranceSubtotal': json['insurance_subtotal'] == null ? undefined : json['insurance_subtotal'],
319
+ 'includeInsurance': json['include_insurance'],
306
320
  'overrideInsurance': json['override_insurance'],
307
321
  'useAsBillingAddress': json['use_as_billing_address'],
308
322
  'admin': json['admin'],
@@ -315,11 +329,12 @@ export function CartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolea
315
329
  'discountPreview': json['discount_preview'],
316
330
  'subtotal': json['subtotal'],
317
331
  'shippingAmount': json['shipping_amount'],
332
+ 'insuranceAmount': json['insurance_amount'],
318
333
  'total': json['total'],
319
334
  'discountAmount': json['discount_amount'],
320
335
  'productDiscountAmount': json['product_discount_amount'],
321
336
  'shippingDiscountAmount': json['shipping_discount_amount'],
322
- 'cartDiscountAmount': json['cart_discount_amount'],
337
+ 'subtotalDiscountAmount': json['subtotal_discount_amount'],
323
338
  'finalTotalAmount': json['final_total_amount'],
324
339
  'status': json['status'],
325
340
  };
@@ -348,7 +363,8 @@ export function CartResourceToJSONTyped(value?: CartResource | null, ignoreDiscr
348
363
  'shipping_type': value['shippingType'],
349
364
  'shipping_subtotal': value['shippingSubtotal'],
350
365
  'override_shipping': value['overrideShipping'],
351
- 'insurance_amount': value['insuranceAmount'],
366
+ 'insurance_subtotal': value['insuranceSubtotal'],
367
+ 'include_insurance': value['includeInsurance'],
352
368
  'override_insurance': value['overrideInsurance'],
353
369
  'use_as_billing_address': value['useAsBillingAddress'],
354
370
  'admin': value['admin'],
@@ -361,11 +377,12 @@ export function CartResourceToJSONTyped(value?: CartResource | null, ignoreDiscr
361
377
  'discount_preview': value['discountPreview'],
362
378
  'subtotal': value['subtotal'],
363
379
  'shipping_amount': value['shippingAmount'],
380
+ 'insurance_amount': value['insuranceAmount'],
364
381
  'total': value['total'],
365
382
  'discount_amount': value['discountAmount'],
366
383
  'product_discount_amount': value['productDiscountAmount'],
367
384
  'shipping_discount_amount': value['shippingDiscountAmount'],
368
- 'cart_discount_amount': value['cartDiscountAmount'],
385
+ 'subtotal_discount_amount': value['subtotalDiscountAmount'],
369
386
  'final_total_amount': value['finalTotalAmount'],
370
387
  'status': value['status'],
371
388
  };
@@ -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 DetachCouponOrderRequest
20
+ */
21
+ export interface DetachCouponOrderRequest {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof DetachCouponOrderRequest
26
+ */
27
+ couponId: number;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the DetachCouponOrderRequest interface.
32
+ */
33
+ export function instanceOfDetachCouponOrderRequest(value: object): value is DetachCouponOrderRequest {
34
+ if (!('couponId' in value) || value['couponId'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function DetachCouponOrderRequestFromJSON(json: any): DetachCouponOrderRequest {
39
+ return DetachCouponOrderRequestFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function DetachCouponOrderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DetachCouponOrderRequest {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'couponId': json['coupon_id'],
49
+ };
50
+ }
51
+
52
+ export function DetachCouponOrderRequestToJSON(json: any): DetachCouponOrderRequest {
53
+ return DetachCouponOrderRequestToJSONTyped(json, false);
54
+ }
55
+
56
+ export function DetachCouponOrderRequestToJSONTyped(value?: DetachCouponOrderRequest | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'coupon_id': value['couponId'],
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']),
@@ -89,7 +89,8 @@ export const GetAllOrderRequestSortByEnum = {
89
89
  Id: 'id',
90
90
  CreatedAt: 'created_at',
91
91
  PlacedAt: 'placed_at',
92
- UpdatedAt: 'updated_at'
92
+ UpdatedAt: 'updated_at',
93
+ NsId: 'ns_id'
93
94
  } as const;
94
95
  export type GetAllOrderRequestSortByEnum = typeof GetAllOrderRequestSortByEnum[keyof typeof GetAllOrderRequestSortByEnum];
95
96
 
@@ -125,7 +125,8 @@ export const IndexOrderRequestSortByEnum = {
125
125
  Id: 'id',
126
126
  CreatedAt: 'created_at',
127
127
  PlacedAt: 'placed_at',
128
- UpdatedAt: 'updated_at'
128
+ UpdatedAt: 'updated_at',
129
+ NsId: 'ns_id'
129
130
  } as const;
130
131
  export type IndexOrderRequestSortByEnum = typeof IndexOrderRequestSortByEnum[keyof typeof IndexOrderRequestSortByEnum];
131
132
 
@@ -71,6 +71,24 @@ export interface OrderListResource {
71
71
  * @memberof OrderListResource
72
72
  */
73
73
  updatedAt?: Date | null;
74
+ /**
75
+ *
76
+ * @type {string}
77
+ * @memberof OrderListResource
78
+ */
79
+ source: string;
80
+ /**
81
+ *
82
+ * @type {string}
83
+ * @memberof OrderListResource
84
+ */
85
+ netsuiteId?: string | null;
86
+ /**
87
+ *
88
+ * @type {boolean}
89
+ * @memberof OrderListResource
90
+ */
91
+ isNetsuiteLocked: boolean;
74
92
  /**
75
93
  *
76
94
  * @type {number}
@@ -120,6 +138,8 @@ export interface OrderListResource {
120
138
  */
121
139
  export function instanceOfOrderListResource(value: object): value is OrderListResource {
122
140
  if (!('placedAt' in value) || value['placedAt'] === undefined) return false;
141
+ if (!('source' in value) || value['source'] === undefined) return false;
142
+ if (!('isNetsuiteLocked' in value) || value['isNetsuiteLocked'] === undefined) return false;
123
143
  if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
124
144
  if (!('finalTotalAmount' in value) || value['finalTotalAmount'] === undefined) return false;
125
145
  if (!('cartStatusContext' in value) || value['cartStatusContext'] === undefined) return false;
@@ -145,6 +165,9 @@ export function OrderListResourceFromJSONTyped(json: any, ignoreDiscriminator: b
145
165
  'placedAt': (new Date(json['placed_at'])),
146
166
  'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
147
167
  'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
168
+ 'source': json['source'],
169
+ 'netsuiteId': json['netsuite_id'] == null ? undefined : json['netsuite_id'],
170
+ 'isNetsuiteLocked': json['is_netsuite_locked'],
148
171
  'subtotal': json['subtotal'],
149
172
  'finalTotalAmount': json['final_total_amount'],
150
173
  'cartStatusContext': json['cart_status_context'],
@@ -171,6 +194,9 @@ export function OrderListResourceToJSONTyped(value?: OrderListResource | null, i
171
194
  'placed_at': value['placedAt'].toISOString(),
172
195
  'created_at': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
173
196
  'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
197
+ 'source': value['source'],
198
+ 'netsuite_id': value['netsuiteId'],
199
+ 'is_netsuite_locked': value['isNetsuiteLocked'],
174
200
  'subtotal': value['subtotal'],
175
201
  'final_total_amount': value['finalTotalAmount'],
176
202
  'cart_status_context': value['cartStatusContext'],
@@ -0,0 +1,93 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * My API
5
+ * API documentation for my Laravel app
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface OrderStatusWithCountResource
20
+ */
21
+ export interface OrderStatusWithCountResource {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof OrderStatusWithCountResource
26
+ */
27
+ id: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof OrderStatusWithCountResource
32
+ */
33
+ name: string;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof OrderStatusWithCountResource
38
+ */
39
+ isOrderNetsuiteSyncable: boolean;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof OrderStatusWithCountResource
44
+ */
45
+ ordersCount: number;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the OrderStatusWithCountResource interface.
50
+ */
51
+ export function instanceOfOrderStatusWithCountResource(value: object): value is OrderStatusWithCountResource {
52
+ if (!('id' in value) || value['id'] === undefined) return false;
53
+ if (!('name' in value) || value['name'] === undefined) return false;
54
+ if (!('isOrderNetsuiteSyncable' in value) || value['isOrderNetsuiteSyncable'] === undefined) return false;
55
+ if (!('ordersCount' in value) || value['ordersCount'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function OrderStatusWithCountResourceFromJSON(json: any): OrderStatusWithCountResource {
60
+ return OrderStatusWithCountResourceFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function OrderStatusWithCountResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderStatusWithCountResource {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'id': json['id'],
70
+ 'name': json['name'],
71
+ 'isOrderNetsuiteSyncable': json['is_order_netsuite_syncable'],
72
+ 'ordersCount': json['orders_count'],
73
+ };
74
+ }
75
+
76
+ export function OrderStatusWithCountResourceToJSON(json: any): OrderStatusWithCountResource {
77
+ return OrderStatusWithCountResourceToJSONTyped(json, false);
78
+ }
79
+
80
+ export function OrderStatusWithCountResourceToJSONTyped(value?: OrderStatusWithCountResource | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'id': value['id'],
88
+ 'name': value['name'],
89
+ 'is_order_netsuite_syncable': value['isOrderNetsuiteSyncable'],
90
+ 'orders_count': value['ordersCount'],
91
+ };
92
+ }
93
+