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

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 (62) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +8 -3
  3. package/dist/apis/CartsApi.d.ts +6 -6
  4. package/dist/apis/CartsApi.js +3 -5
  5. package/dist/models/AddressFrontendResource.d.ts +1 -1
  6. package/dist/models/AddressFrontendResource.js +1 -3
  7. package/dist/models/AddressResource.d.ts +2 -2
  8. package/dist/models/AddressResource.js +4 -4
  9. package/dist/models/AdminCartResource.d.ts +34 -4
  10. package/dist/models/AdminCartResource.js +32 -10
  11. package/dist/models/AttachCouponCartRequest.d.ts +2 -2
  12. package/dist/models/AttachCouponCartRequest.js +3 -3
  13. package/dist/models/DetachCouponCartRequest.d.ts +32 -0
  14. package/dist/models/DetachCouponCartRequest.js +51 -0
  15. package/dist/models/DiscountType.d.ts +26 -0
  16. package/dist/models/DiscountType.js +52 -0
  17. package/dist/models/DiscountValueType.d.ts +25 -0
  18. package/dist/models/DiscountValueType.js +51 -0
  19. package/dist/models/FrontendCartResource.d.ts +12 -0
  20. package/dist/models/FrontendCartResource.js +8 -0
  21. package/dist/models/LineItemListResource.d.ts +27 -3
  22. package/dist/models/LineItemListResource.js +19 -3
  23. package/dist/models/ProductChildCartLiteResource.d.ts +70 -0
  24. package/dist/models/ProductChildCartLiteResource.js +77 -0
  25. package/dist/models/ProductChildCartLiteResourceArrayResponse.d.ts +33 -0
  26. package/dist/models/ProductChildCartLiteResourceArrayResponse.js +50 -0
  27. package/dist/models/StoreFrontendResource.d.ts +1 -1
  28. package/dist/models/StoreFrontendResource.js +1 -3
  29. package/dist/models/StoreResource.d.ts +1 -1
  30. package/dist/models/StoreResource.js +1 -3
  31. package/dist/models/StoreSpecialDateResource.d.ts +2 -2
  32. package/dist/models/StoreSpecialDateResource.js +1 -3
  33. package/dist/models/index.d.ts +5 -0
  34. package/dist/models/index.js +5 -0
  35. package/docs/AdminCartResource.md +16 -6
  36. package/docs/AttachCouponCartRequest.md +2 -2
  37. package/docs/CartsApi.md +8 -8
  38. package/docs/DetachCouponCartRequest.md +34 -0
  39. package/docs/DiscountType.md +32 -0
  40. package/docs/DiscountValueType.md +32 -0
  41. package/docs/FrontendCartResource.md +4 -0
  42. package/docs/LineItemListResource.md +9 -1
  43. package/docs/ProductChildCartLiteResource.md +46 -0
  44. package/docs/ProductChildCartLiteResourceArrayResponse.md +34 -0
  45. package/docs/StoreSpecialDateResource.md +1 -1
  46. package/package.json +1 -1
  47. package/src/apis/CartsApi.ts +12 -14
  48. package/src/models/AddressFrontendResource.ts +2 -3
  49. package/src/models/AddressResource.ts +5 -5
  50. package/src/models/AdminCartResource.ts +60 -14
  51. package/src/models/AttachCouponCartRequest.ts +5 -5
  52. package/src/models/DetachCouponCartRequest.ts +66 -0
  53. package/src/models/DiscountType.ts +54 -0
  54. package/src/models/DiscountValueType.ts +53 -0
  55. package/src/models/FrontendCartResource.ts +18 -0
  56. package/src/models/LineItemListResource.ts +46 -10
  57. package/src/models/ProductChildCartLiteResource.ts +135 -0
  58. package/src/models/ProductChildCartLiteResourceArrayResponse.ts +73 -0
  59. package/src/models/StoreFrontendResource.ts +2 -3
  60. package/src/models/StoreResource.ts +2 -3
  61. package/src/models/StoreSpecialDateResource.ts +3 -4
  62. package/src/models/index.ts +5 -0
@@ -82,6 +82,7 @@ docs/DestroyAttributeValueRequest.md
82
82
  docs/DetachAccessoriesProductRangeRequest.md
83
83
  docs/DetachAssetableOverlayTemplateRequest.md
84
84
  docs/DetachAttributesProductRangeRequest.md
85
+ docs/DetachCouponCartRequest.md
85
86
  docs/DetachDocumentablesDocumentRequest.md
86
87
  docs/DetachDocumentablesDocumentRequestDocumentablesInner.md
87
88
  docs/DetachDocumentsProductChildRequest.md
@@ -89,6 +90,8 @@ docs/DetachDocumentsProductRangeRequest.md
89
90
  docs/DetachProductsProductCategoryRequest.md
90
91
  docs/DetachStoresSupplierRequest.md
91
92
  docs/DetachSuppliersStoreRequest.md
93
+ docs/DiscountType.md
94
+ docs/DiscountValueType.md
92
95
  docs/DocumentApi.md
93
96
  docs/DocumentFileForUploadResource.md
94
97
  docs/DocumentFileForUploadResourceArrayResponse.md
@@ -284,6 +287,8 @@ docs/ProductChildAttributeGroupedResource.md
284
287
  docs/ProductChildAttributeGroupedResourceArrayResponse.md
285
288
  docs/ProductChildAttributeResource.md
286
289
  docs/ProductChildAttributeResourceArrayResponse.md
290
+ docs/ProductChildCartLiteResource.md
291
+ docs/ProductChildCartLiteResourceArrayResponse.md
287
292
  docs/ProductChildListResource.md
288
293
  docs/ProductChildListResourceArrayResponse.md
289
294
  docs/ProductChildLiteResource.md
@@ -592,6 +597,7 @@ src/models/DestroyAttributeValueRequest.ts
592
597
  src/models/DetachAccessoriesProductRangeRequest.ts
593
598
  src/models/DetachAssetableOverlayTemplateRequest.ts
594
599
  src/models/DetachAttributesProductRangeRequest.ts
600
+ src/models/DetachCouponCartRequest.ts
595
601
  src/models/DetachDocumentablesDocumentRequest.ts
596
602
  src/models/DetachDocumentablesDocumentRequestDocumentablesInner.ts
597
603
  src/models/DetachDocumentsProductChildRequest.ts
@@ -599,6 +605,8 @@ src/models/DetachDocumentsProductRangeRequest.ts
599
605
  src/models/DetachProductsProductCategoryRequest.ts
600
606
  src/models/DetachStoresSupplierRequest.ts
601
607
  src/models/DetachSuppliersStoreRequest.ts
608
+ src/models/DiscountType.ts
609
+ src/models/DiscountValueType.ts
602
610
  src/models/DocumentFileForUploadResource.ts
603
611
  src/models/DocumentFileForUploadResourceArrayResponse.ts
604
612
  src/models/DocumentFrontendResource.ts
@@ -785,6 +793,8 @@ src/models/ProductChildAttributeGroupedResource.ts
785
793
  src/models/ProductChildAttributeGroupedResourceArrayResponse.ts
786
794
  src/models/ProductChildAttributeResource.ts
787
795
  src/models/ProductChildAttributeResourceArrayResponse.ts
796
+ src/models/ProductChildCartLiteResource.ts
797
+ src/models/ProductChildCartLiteResourceArrayResponse.ts
788
798
  src/models/ProductChildListResource.ts
789
799
  src/models/ProductChildListResourceArrayResponse.ts
790
800
  src/models/ProductChildLiteResource.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @digital8/lighting-illusions-ts-sdk@0.0.1841
1
+ # @digital8/lighting-illusions-ts-sdk@0.0.1843
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -77,7 +77,7 @@ All URIs are relative to *http://localhost/api*
77
77
  *CartsApi* | [**attachCouponCart**](docs/CartsApi.md#attachcouponcartoperation) | **POST** /admin-api/carts/{cart}/coupons/attach | Auto-generated: attachCouponCart
78
78
  *CartsApi* | [**attachItemCart**](docs/CartsApi.md#attachitemcartoperation) | **POST** /admin-api/carts/{cart}/items/attach | Auto-generated: attachItemCart
79
79
  *CartsApi* | [**destroyCart**](docs/CartsApi.md#destroycart) | **DELETE** /admin-api/carts/{cart}/delete | Auto-generated: destroyCart
80
- *CartsApi* | [**detachCouponCart**](docs/CartsApi.md#detachcouponcart) | **DELETE** /admin-api/carts/{cart}/coupons/{coupon}/detach | Auto-generated: detachCouponCart
80
+ *CartsApi* | [**detachCouponCart**](docs/CartsApi.md#detachcouponcartoperation) | **DELETE** /admin-api/carts/{cart}/coupons/detach | Auto-generated: detachCouponCart
81
81
  *CartsApi* | [**detachItemCart**](docs/CartsApi.md#detachitemcart) | **DELETE** /admin-api/carts/{cart}/items/{lineItem}/detach | Auto-generated: detachItemCart
82
82
  *CartsApi* | [**indexCart**](docs/CartsApi.md#indexcartoperation) | **POST** /admin-api/carts/list | Auto-generated: indexCart
83
83
  *CartsApi* | [**sendPaymentLinkCart**](docs/CartsApi.md#sendpaymentlinkcart) | **POST** /admin-api/carts/{cart}/send-payment-link | Auto-generated: sendPaymentLinkCart
@@ -320,6 +320,7 @@ All URIs are relative to *http://localhost/api*
320
320
  - [DetachAccessoriesProductRangeRequest](docs/DetachAccessoriesProductRangeRequest.md)
321
321
  - [DetachAssetableOverlayTemplateRequest](docs/DetachAssetableOverlayTemplateRequest.md)
322
322
  - [DetachAttributesProductRangeRequest](docs/DetachAttributesProductRangeRequest.md)
323
+ - [DetachCouponCartRequest](docs/DetachCouponCartRequest.md)
323
324
  - [DetachDocumentablesDocumentRequest](docs/DetachDocumentablesDocumentRequest.md)
324
325
  - [DetachDocumentablesDocumentRequestDocumentablesInner](docs/DetachDocumentablesDocumentRequestDocumentablesInner.md)
325
326
  - [DetachDocumentsProductChildRequest](docs/DetachDocumentsProductChildRequest.md)
@@ -327,6 +328,8 @@ All URIs are relative to *http://localhost/api*
327
328
  - [DetachProductsProductCategoryRequest](docs/DetachProductsProductCategoryRequest.md)
328
329
  - [DetachStoresSupplierRequest](docs/DetachStoresSupplierRequest.md)
329
330
  - [DetachSuppliersStoreRequest](docs/DetachSuppliersStoreRequest.md)
331
+ - [DiscountType](docs/DiscountType.md)
332
+ - [DiscountValueType](docs/DiscountValueType.md)
330
333
  - [DocumentFileForUploadResource](docs/DocumentFileForUploadResource.md)
331
334
  - [DocumentFileForUploadResourceArrayResponse](docs/DocumentFileForUploadResourceArrayResponse.md)
332
335
  - [DocumentFrontendResource](docs/DocumentFrontendResource.md)
@@ -513,6 +516,8 @@ All URIs are relative to *http://localhost/api*
513
516
  - [ProductChildAttributeGroupedResourceArrayResponse](docs/ProductChildAttributeGroupedResourceArrayResponse.md)
514
517
  - [ProductChildAttributeResource](docs/ProductChildAttributeResource.md)
515
518
  - [ProductChildAttributeResourceArrayResponse](docs/ProductChildAttributeResourceArrayResponse.md)
519
+ - [ProductChildCartLiteResource](docs/ProductChildCartLiteResource.md)
520
+ - [ProductChildCartLiteResourceArrayResponse](docs/ProductChildCartLiteResourceArrayResponse.md)
516
521
  - [ProductChildListResource](docs/ProductChildListResource.md)
517
522
  - [ProductChildListResourceArrayResponse](docs/ProductChildListResourceArrayResponse.md)
518
523
  - [ProductChildLiteResource](docs/ProductChildLiteResource.md)
@@ -726,7 +731,7 @@ and is automatically generated by the
726
731
  [OpenAPI Generator](https://openapi-generator.tech) project:
727
732
 
728
733
  - API version: `1.0.0`
729
- - Package version: `0.0.1841`
734
+ - Package version: `0.0.1843`
730
735
  - Generator version: `7.21.0`
731
736
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
732
737
 
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AdminCartResource, AttachCouponCartRequest, AttachItemCartRequest, GenericResponse, IndexCartRequest, PaginatedCartListResourceResponse, StoreCartRequest, UpdateCartRequest, UpdateItemCartRequest } from '../models/index';
13
+ import type { AdminCartResource, AttachCouponCartRequest, AttachItemCartRequest, DetachCouponCartRequest, GenericResponse, IndexCartRequest, PaginatedCartListResourceResponse, StoreCartRequest, UpdateCartRequest, UpdateItemCartRequest } from '../models/index';
14
14
  export interface AttachCouponCartOperationRequest {
15
15
  cart: number;
16
16
  attachCouponCartRequest?: AttachCouponCartRequest;
@@ -22,9 +22,9 @@ export interface AttachItemCartOperationRequest {
22
22
  export interface DestroyCartRequest {
23
23
  cart: number;
24
24
  }
25
- export interface DetachCouponCartRequest {
25
+ export interface DetachCouponCartOperationRequest {
26
26
  cart: number;
27
- coupon: number;
27
+ detachCouponCartRequest?: DetachCouponCartRequest;
28
28
  }
29
29
  export interface DetachItemCartRequest {
30
30
  cart: number;
@@ -94,15 +94,15 @@ export declare class CartsApi extends runtime.BaseAPI {
94
94
  /**
95
95
  * Creates request options for detachCouponCart without sending the request
96
96
  */
97
- detachCouponCartRequestOpts(requestParameters: DetachCouponCartRequest): Promise<runtime.RequestOpts>;
97
+ detachCouponCartRequestOpts(requestParameters: DetachCouponCartOperationRequest): Promise<runtime.RequestOpts>;
98
98
  /**
99
99
  * Auto-generated: detachCouponCart
100
100
  */
101
- detachCouponCartRaw(requestParameters: DetachCouponCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminCartResource>>;
101
+ detachCouponCartRaw(requestParameters: DetachCouponCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminCartResource>>;
102
102
  /**
103
103
  * Auto-generated: detachCouponCart
104
104
  */
105
- detachCouponCart(requestParameters: DetachCouponCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminCartResource>;
105
+ detachCouponCart(requestParameters: DetachCouponCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminCartResource>;
106
106
  /**
107
107
  * Creates request options for detachItemCart without sending the request
108
108
  */
@@ -266,19 +266,17 @@ var CartsApi = /** @class */ (function (_super) {
266
266
  if (requestParameters['cart'] == null) {
267
267
  throw new runtime.RequiredError('cart', 'Required parameter "cart" was null or undefined when calling detachCouponCart().');
268
268
  }
269
- if (requestParameters['coupon'] == null) {
270
- throw new runtime.RequiredError('coupon', 'Required parameter "coupon" was null or undefined when calling detachCouponCart().');
271
- }
272
269
  queryParameters = {};
273
270
  headerParameters = {};
274
- urlPath = "/admin-api/carts/{cart}/coupons/{coupon}/detach";
271
+ headerParameters['Content-Type'] = 'application/json';
272
+ urlPath = "/admin-api/carts/{cart}/coupons/detach";
275
273
  urlPath = urlPath.replace("{".concat("cart", "}"), encodeURIComponent(String(requestParameters['cart'])));
276
- urlPath = urlPath.replace("{".concat("coupon", "}"), encodeURIComponent(String(requestParameters['coupon'])));
277
274
  return [2 /*return*/, {
278
275
  path: urlPath,
279
276
  method: 'DELETE',
280
277
  headers: headerParameters,
281
278
  query: queryParameters,
279
+ body: (0, index_1.DetachCouponCartRequestToJSON)(requestParameters['detachCouponCartRequest']),
282
280
  }];
283
281
  });
284
282
  });
@@ -32,7 +32,7 @@ export interface AddressFrontendResource {
32
32
  * @type {string}
33
33
  * @memberof AddressFrontendResource
34
34
  */
35
- line2: string;
35
+ line2?: string | null;
36
36
  /**
37
37
  *
38
38
  * @type {string}
@@ -26,8 +26,6 @@ function instanceOfAddressFrontendResource(value) {
26
26
  return false;
27
27
  if (!('line1' in value) || value['line1'] === undefined)
28
28
  return false;
29
- if (!('line2' in value) || value['line2'] === undefined)
30
- return false;
31
29
  if (!('postcode' in value) || value['postcode'] === undefined)
32
30
  return false;
33
31
  if (!('suburb' in value) || value['suburb'] === undefined)
@@ -50,7 +48,7 @@ function AddressFrontendResourceFromJSONTyped(json, ignoreDiscriminator) {
50
48
  return {
51
49
  'company': json['company'],
52
50
  'line1': json['line1'],
53
- 'line2': json['line2'],
51
+ 'line2': json['line2'] == null ? undefined : json['line2'],
54
52
  'postcode': json['postcode'],
55
53
  'suburb': json['suburb'],
56
54
  'country': json['country'],
@@ -26,7 +26,7 @@ export interface AddressResource {
26
26
  * @type {string}
27
27
  * @memberof AddressResource
28
28
  */
29
- company: string;
29
+ company?: string | null;
30
30
  /**
31
31
  *
32
32
  * @type {string}
@@ -38,7 +38,7 @@ export interface AddressResource {
38
38
  * @type {string}
39
39
  * @memberof AddressResource
40
40
  */
41
- line2?: string | null;
41
+ line2: string;
42
42
  /**
43
43
  *
44
44
  * @type {string}
@@ -22,10 +22,10 @@ exports.AddressResourceToJSONTyped = AddressResourceToJSONTyped;
22
22
  * Check if a given object implements the AddressResource interface.
23
23
  */
24
24
  function instanceOfAddressResource(value) {
25
- if (!('company' in value) || value['company'] === undefined)
26
- return false;
27
25
  if (!('line1' in value) || value['line1'] === undefined)
28
26
  return false;
27
+ if (!('line2' in value) || value['line2'] === undefined)
28
+ return false;
29
29
  if (!('postcode' in value) || value['postcode'] === undefined)
30
30
  return false;
31
31
  if (!('suburb' in value) || value['suburb'] === undefined)
@@ -47,9 +47,9 @@ function AddressResourceFromJSONTyped(json, ignoreDiscriminator) {
47
47
  }
48
48
  return {
49
49
  'id': json['id'] == null ? undefined : json['id'],
50
- 'company': json['company'],
50
+ 'company': json['company'] == null ? undefined : json['company'],
51
51
  'line1': json['line_1'],
52
- 'line2': json['line_2'] == null ? undefined : json['line_2'],
52
+ 'line2': json['line_2'],
53
53
  'postcode': json['postcode'],
54
54
  'suburb': json['suburb'],
55
55
  'country': json['country'],
@@ -108,7 +108,7 @@ export interface AdminCartResource {
108
108
  * @type {number}
109
109
  * @memberof AdminCartResource
110
110
  */
111
- insuranceAmount?: number | null;
111
+ insuranceAmount: number;
112
112
  /**
113
113
  *
114
114
  * @type {boolean}
@@ -163,6 +163,12 @@ export interface AdminCartResource {
163
163
  * @memberof AdminCartResource
164
164
  */
165
165
  billingAddress: AddressResource | null;
166
+ /**
167
+ *
168
+ * @type {number}
169
+ * @memberof AdminCartResource
170
+ */
171
+ discountPreview: number;
166
172
  /**
167
173
  *
168
174
  * @type {number}
@@ -174,19 +180,43 @@ export interface AdminCartResource {
174
180
  * @type {number}
175
181
  * @memberof AdminCartResource
176
182
  */
177
- discountPreview: number;
183
+ shippingAmount: number;
184
+ /**
185
+ *
186
+ * @type {number}
187
+ * @memberof AdminCartResource
188
+ */
189
+ total: number;
190
+ /**
191
+ *
192
+ * @type {number}
193
+ * @memberof AdminCartResource
194
+ */
195
+ discountAmount: number;
196
+ /**
197
+ *
198
+ * @type {number}
199
+ * @memberof AdminCartResource
200
+ */
201
+ productDiscountAmount: number;
202
+ /**
203
+ *
204
+ * @type {number}
205
+ * @memberof AdminCartResource
206
+ */
207
+ shippingDiscountAmount: number;
178
208
  /**
179
209
  *
180
210
  * @type {number}
181
211
  * @memberof AdminCartResource
182
212
  */
183
- shippingEstimate: number;
213
+ cartDiscountAmount: number;
184
214
  /**
185
215
  *
186
216
  * @type {number}
187
217
  * @memberof AdminCartResource
188
218
  */
189
- insuranceEstimate: number;
219
+ finalTotalAmount: number;
190
220
  /**
191
221
  *
192
222
  * @type {string}
@@ -36,6 +36,8 @@ function instanceOfAdminCartResource(value) {
36
36
  return false;
37
37
  if (!('overrideShipping' in value) || value['overrideShipping'] === undefined)
38
38
  return false;
39
+ if (!('insuranceAmount' in value) || value['insuranceAmount'] === undefined)
40
+ return false;
39
41
  if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined)
40
42
  return false;
41
43
  if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined)
@@ -54,13 +56,23 @@ function instanceOfAdminCartResource(value) {
54
56
  return false;
55
57
  if (!('billingAddress' in value) || value['billingAddress'] === undefined)
56
58
  return false;
59
+ if (!('discountPreview' in value) || value['discountPreview'] === undefined)
60
+ return false;
57
61
  if (!('subtotal' in value) || value['subtotal'] === undefined)
58
62
  return false;
59
- if (!('discountPreview' in value) || value['discountPreview'] === undefined)
63
+ if (!('shippingAmount' in value) || value['shippingAmount'] === undefined)
64
+ return false;
65
+ if (!('total' in value) || value['total'] === undefined)
66
+ return false;
67
+ if (!('discountAmount' in value) || value['discountAmount'] === undefined)
60
68
  return false;
61
- if (!('shippingEstimate' in value) || value['shippingEstimate'] === undefined)
69
+ if (!('productDiscountAmount' in value) || value['productDiscountAmount'] === undefined)
62
70
  return false;
63
- if (!('insuranceEstimate' in value) || value['insuranceEstimate'] === undefined)
71
+ if (!('shippingDiscountAmount' in value) || value['shippingDiscountAmount'] === undefined)
72
+ return false;
73
+ if (!('cartDiscountAmount' in value) || value['cartDiscountAmount'] === undefined)
74
+ return false;
75
+ if (!('finalTotalAmount' in value) || value['finalTotalAmount'] === undefined)
64
76
  return false;
65
77
  if (!('status' in value) || value['status'] === undefined)
66
78
  return false;
@@ -88,7 +100,7 @@ function AdminCartResourceFromJSONTyped(json, ignoreDiscriminator) {
88
100
  'shippingType': json['shipping_type'],
89
101
  'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
90
102
  'overrideShipping': json['override_shipping'],
91
- 'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
103
+ 'insuranceAmount': json['insurance_amount'],
92
104
  'overrideInsurance': json['override_insurance'],
93
105
  'useAsBillingAddress': json['use_as_billing_address'],
94
106
  'admin': json['admin'],
@@ -98,10 +110,15 @@ function AdminCartResourceFromJSONTyped(json, ignoreDiscriminator) {
98
110
  'coupons': json['coupons'],
99
111
  'shippingAddress': (0, AddressResource_1.AddressResourceFromJSON)(json['shipping_address']),
100
112
  'billingAddress': (0, AddressResource_1.AddressResourceFromJSON)(json['billing_address']),
101
- 'subtotal': json['subtotal'],
102
113
  'discountPreview': json['discount_preview'],
103
- 'shippingEstimate': json['shipping_estimate'],
104
- 'insuranceEstimate': json['insurance_estimate'],
114
+ 'subtotal': json['subtotal'],
115
+ 'shippingAmount': json['shipping_amount'],
116
+ 'total': json['total'],
117
+ 'discountAmount': json['discount_amount'],
118
+ 'productDiscountAmount': json['product_discount_amount'],
119
+ 'shippingDiscountAmount': json['shipping_discount_amount'],
120
+ 'cartDiscountAmount': json['cart_discount_amount'],
121
+ 'finalTotalAmount': json['final_total_amount'],
105
122
  'status': json['status'],
106
123
  };
107
124
  }
@@ -138,10 +155,15 @@ function AdminCartResourceToJSONTyped(value, ignoreDiscriminator) {
138
155
  'coupons': value['coupons'],
139
156
  'shipping_address': (0, AddressResource_1.AddressResourceToJSON)(value['shippingAddress']),
140
157
  'billing_address': (0, AddressResource_1.AddressResourceToJSON)(value['billingAddress']),
141
- 'subtotal': value['subtotal'],
142
158
  'discount_preview': value['discountPreview'],
143
- 'shipping_estimate': value['shippingEstimate'],
144
- 'insurance_estimate': value['insuranceEstimate'],
159
+ 'subtotal': value['subtotal'],
160
+ 'shipping_amount': value['shippingAmount'],
161
+ 'total': value['total'],
162
+ 'discount_amount': value['discountAmount'],
163
+ 'product_discount_amount': value['productDiscountAmount'],
164
+ 'shipping_discount_amount': value['shippingDiscountAmount'],
165
+ 'cart_discount_amount': value['cartDiscountAmount'],
166
+ 'final_total_amount': value['finalTotalAmount'],
145
167
  'status': value['status'],
146
168
  };
147
169
  }
@@ -17,10 +17,10 @@
17
17
  export interface AttachCouponCartRequest {
18
18
  /**
19
19
  *
20
- * @type {number}
20
+ * @type {Array<number>}
21
21
  * @memberof AttachCouponCartRequest
22
22
  */
23
- couponId: number;
23
+ couponIds: Array<number>;
24
24
  }
25
25
  /**
26
26
  * Check if a given object implements the AttachCouponCartRequest interface.
@@ -22,7 +22,7 @@ exports.AttachCouponCartRequestToJSONTyped = AttachCouponCartRequestToJSONTyped;
22
22
  * Check if a given object implements the AttachCouponCartRequest interface.
23
23
  */
24
24
  function instanceOfAttachCouponCartRequest(value) {
25
- if (!('couponId' in value) || value['couponId'] === undefined)
25
+ if (!('couponIds' in value) || value['couponIds'] === undefined)
26
26
  return false;
27
27
  return true;
28
28
  }
@@ -34,7 +34,7 @@ function AttachCouponCartRequestFromJSONTyped(json, ignoreDiscriminator) {
34
34
  return json;
35
35
  }
36
36
  return {
37
- 'couponId': json['coupon_id'],
37
+ 'couponIds': json['coupon_ids'],
38
38
  };
39
39
  }
40
40
  function AttachCouponCartRequestToJSON(json) {
@@ -46,6 +46,6 @@ function AttachCouponCartRequestToJSONTyped(value, ignoreDiscriminator) {
46
46
  return value;
47
47
  }
48
48
  return {
49
- 'coupon_id': value['couponId'],
49
+ 'coupon_ids': value['couponIds'],
50
50
  };
51
51
  }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * My API
3
+ * API documentation for my Laravel app
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface DetachCouponCartRequest
16
+ */
17
+ export interface DetachCouponCartRequest {
18
+ /**
19
+ *
20
+ * @type {Array<number>}
21
+ * @memberof DetachCouponCartRequest
22
+ */
23
+ couponIds: Array<number>;
24
+ }
25
+ /**
26
+ * Check if a given object implements the DetachCouponCartRequest interface.
27
+ */
28
+ export declare function instanceOfDetachCouponCartRequest(value: object): value is DetachCouponCartRequest;
29
+ export declare function DetachCouponCartRequestFromJSON(json: any): DetachCouponCartRequest;
30
+ export declare function DetachCouponCartRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DetachCouponCartRequest;
31
+ export declare function DetachCouponCartRequestToJSON(json: any): DetachCouponCartRequest;
32
+ export declare function DetachCouponCartRequestToJSONTyped(value?: DetachCouponCartRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * My API
6
+ * API documentation for my Laravel app
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfDetachCouponCartRequest = instanceOfDetachCouponCartRequest;
17
+ exports.DetachCouponCartRequestFromJSON = DetachCouponCartRequestFromJSON;
18
+ exports.DetachCouponCartRequestFromJSONTyped = DetachCouponCartRequestFromJSONTyped;
19
+ exports.DetachCouponCartRequestToJSON = DetachCouponCartRequestToJSON;
20
+ exports.DetachCouponCartRequestToJSONTyped = DetachCouponCartRequestToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the DetachCouponCartRequest interface.
23
+ */
24
+ function instanceOfDetachCouponCartRequest(value) {
25
+ if (!('couponIds' in value) || value['couponIds'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function DetachCouponCartRequestFromJSON(json) {
30
+ return DetachCouponCartRequestFromJSONTyped(json, false);
31
+ }
32
+ function DetachCouponCartRequestFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'couponIds': json['coupon_ids'],
38
+ };
39
+ }
40
+ function DetachCouponCartRequestToJSON(json) {
41
+ return DetachCouponCartRequestToJSONTyped(json, false);
42
+ }
43
+ function DetachCouponCartRequestToJSONTyped(value, ignoreDiscriminator) {
44
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'coupon_ids': value['couponIds'],
50
+ };
51
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * My API
3
+ * API documentation for my Laravel app
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ */
16
+ export declare const DiscountType: {
17
+ readonly Shipping: "shipping";
18
+ readonly Subtotal: "subtotal";
19
+ readonly Product: "product";
20
+ };
21
+ export type DiscountType = typeof DiscountType[keyof typeof DiscountType];
22
+ export declare function instanceOfDiscountType(value: any): boolean;
23
+ export declare function DiscountTypeFromJSON(json: any): DiscountType;
24
+ export declare function DiscountTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DiscountType;
25
+ export declare function DiscountTypeToJSON(value?: DiscountType | null): any;
26
+ export declare function DiscountTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): DiscountType;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * My API
6
+ * API documentation for my Laravel app
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.DiscountType = void 0;
17
+ exports.instanceOfDiscountType = instanceOfDiscountType;
18
+ exports.DiscountTypeFromJSON = DiscountTypeFromJSON;
19
+ exports.DiscountTypeFromJSONTyped = DiscountTypeFromJSONTyped;
20
+ exports.DiscountTypeToJSON = DiscountTypeToJSON;
21
+ exports.DiscountTypeToJSONTyped = DiscountTypeToJSONTyped;
22
+ /**
23
+ *
24
+ * @export
25
+ */
26
+ exports.DiscountType = {
27
+ Shipping: 'shipping',
28
+ Subtotal: 'subtotal',
29
+ Product: 'product'
30
+ };
31
+ function instanceOfDiscountType(value) {
32
+ for (var key in exports.DiscountType) {
33
+ if (Object.prototype.hasOwnProperty.call(exports.DiscountType, key)) {
34
+ if (exports.DiscountType[key] === value) {
35
+ return true;
36
+ }
37
+ }
38
+ }
39
+ return false;
40
+ }
41
+ function DiscountTypeFromJSON(json) {
42
+ return DiscountTypeFromJSONTyped(json, false);
43
+ }
44
+ function DiscountTypeFromJSONTyped(json, ignoreDiscriminator) {
45
+ return json;
46
+ }
47
+ function DiscountTypeToJSON(value) {
48
+ return value;
49
+ }
50
+ function DiscountTypeToJSONTyped(value, ignoreDiscriminator) {
51
+ return value;
52
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * My API
3
+ * API documentation for my Laravel app
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ */
16
+ export declare const DiscountValueType: {
17
+ readonly FixedValue: "fixed_value";
18
+ readonly Percentage: "percentage";
19
+ };
20
+ export type DiscountValueType = typeof DiscountValueType[keyof typeof DiscountValueType];
21
+ export declare function instanceOfDiscountValueType(value: any): boolean;
22
+ export declare function DiscountValueTypeFromJSON(json: any): DiscountValueType;
23
+ export declare function DiscountValueTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DiscountValueType;
24
+ export declare function DiscountValueTypeToJSON(value?: DiscountValueType | null): any;
25
+ export declare function DiscountValueTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): DiscountValueType;