@digital8/lighting-illusions-ts-sdk 0.0.1897 → 0.0.1898

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/.openapi-generator/FILES +18 -0
  2. package/README.md +12 -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 +3 -1
  7. package/dist/models/AddressResource.d.ts +1 -1
  8. package/dist/models/AddressResource.js +1 -3
  9. package/dist/models/CartCouponResource.d.ts +50 -0
  10. package/dist/models/CartCouponResource.js +63 -0
  11. package/dist/models/CartCouponResourceArrayResponse.d.ts +33 -0
  12. package/dist/models/CartCouponResourceArrayResponse.js +50 -0
  13. package/dist/models/CartResource.d.ts +37 -6
  14. package/dist/models/CartResource.js +35 -12
  15. package/dist/models/DetachCouponCartRequest.d.ts +32 -0
  16. package/dist/models/DetachCouponCartRequest.js +51 -0
  17. package/dist/models/DiscountType.d.ts +26 -0
  18. package/dist/models/DiscountType.js +52 -0
  19. package/dist/models/DiscountValueType.d.ts +25 -0
  20. package/dist/models/DiscountValueType.js +51 -0
  21. package/dist/models/LineItemDiscountResource.d.ts +50 -0
  22. package/dist/models/LineItemDiscountResource.js +63 -0
  23. package/dist/models/LineItemDiscountResourceArrayResponse.d.ts +33 -0
  24. package/dist/models/LineItemDiscountResourceArrayResponse.js +50 -0
  25. package/dist/models/LineItemListResource.d.ts +29 -4
  26. package/dist/models/LineItemListResource.js +23 -4
  27. package/dist/models/ProductChildCartLiteResource.d.ts +70 -0
  28. package/dist/models/ProductChildCartLiteResource.js +77 -0
  29. package/dist/models/ProductChildCartLiteResourceArrayResponse.d.ts +33 -0
  30. package/dist/models/ProductChildCartLiteResourceArrayResponse.js +50 -0
  31. package/dist/models/StoreListResource.d.ts +1 -1
  32. package/dist/models/StoreListResource.js +3 -1
  33. package/dist/models/StoreResource.d.ts +1 -1
  34. package/dist/models/StoreResource.js +3 -1
  35. package/dist/models/StoreSpecialDateResource.d.ts +2 -2
  36. package/dist/models/StoreSpecialDateResource.js +1 -3
  37. package/dist/models/index.d.ts +9 -0
  38. package/dist/models/index.js +9 -0
  39. package/docs/CartCouponResource.md +40 -0
  40. package/docs/CartCouponResourceArrayResponse.md +34 -0
  41. package/docs/CartResource.md +17 -7
  42. package/docs/CartsApi.md +8 -8
  43. package/docs/DetachCouponCartRequest.md +34 -0
  44. package/docs/DiscountType.md +32 -0
  45. package/docs/DiscountValueType.md +32 -0
  46. package/docs/LineItemDiscountResource.md +40 -0
  47. package/docs/LineItemDiscountResourceArrayResponse.md +34 -0
  48. package/docs/LineItemListResource.md +9 -1
  49. package/docs/ProductChildCartLiteResource.md +46 -0
  50. package/docs/ProductChildCartLiteResourceArrayResponse.md +34 -0
  51. package/docs/StoreSpecialDateResource.md +1 -1
  52. package/package.json +1 -1
  53. package/src/apis/CartsApi.ts +12 -14
  54. package/src/models/AddressFrontendResource.ts +3 -2
  55. package/src/models/AddressResource.ts +2 -3
  56. package/src/models/CartCouponResource.ts +93 -0
  57. package/src/models/CartCouponResourceArrayResponse.ts +73 -0
  58. package/src/models/CartResource.ts +71 -18
  59. package/src/models/DetachCouponCartRequest.ts +66 -0
  60. package/src/models/DiscountType.ts +54 -0
  61. package/src/models/DiscountValueType.ts +53 -0
  62. package/src/models/LineItemDiscountResource.ts +93 -0
  63. package/src/models/LineItemDiscountResourceArrayResponse.ts +73 -0
  64. package/src/models/LineItemListResource.ts +56 -12
  65. package/src/models/ProductChildCartLiteResource.ts +135 -0
  66. package/src/models/ProductChildCartLiteResourceArrayResponse.ts +73 -0
  67. package/src/models/StoreListResource.ts +3 -2
  68. package/src/models/StoreResource.ts +3 -2
  69. package/src/models/StoreSpecialDateResource.ts +3 -4
  70. package/src/models/index.ts +9 -0
@@ -49,6 +49,8 @@ docs/AttributeResourceArrayResponse.md
49
49
  docs/AttributeType.md
50
50
  docs/AttributeValueResource.md
51
51
  docs/AttributeValueResourceArrayResponse.md
52
+ docs/CartCouponResource.md
53
+ docs/CartCouponResourceArrayResponse.md
52
54
  docs/CartListResource.md
53
55
  docs/CartListResourceArrayResponse.md
54
56
  docs/CartOrderSource.md
@@ -82,6 +84,7 @@ docs/DestroyAttributeValueRequest.md
82
84
  docs/DetachAccessoriesProductRangeRequest.md
83
85
  docs/DetachAssetableOverlayTemplateRequest.md
84
86
  docs/DetachAttributesProductRangeRequest.md
87
+ docs/DetachCouponCartRequest.md
85
88
  docs/DetachDocumentablesDocumentRequest.md
86
89
  docs/DetachDocumentablesDocumentRequestDocumentablesInner.md
87
90
  docs/DetachDocumentsProductChildRequest.md
@@ -89,6 +92,8 @@ docs/DetachDocumentsProductRangeRequest.md
89
92
  docs/DetachProductsProductCategoryRequest.md
90
93
  docs/DetachStoresSupplierRequest.md
91
94
  docs/DetachSuppliersStoreRequest.md
95
+ docs/DiscountType.md
96
+ docs/DiscountValueType.md
92
97
  docs/DocumentApi.md
93
98
  docs/DocumentFileForUploadResource.md
94
99
  docs/DocumentFileForUploadResourceArrayResponse.md
@@ -168,6 +173,8 @@ docs/LabelResource.md
168
173
  docs/LabelResourceArrayResponse.md
169
174
  docs/LiAddressResource.md
170
175
  docs/LiAddressResourceArrayResponse.md
176
+ docs/LineItemDiscountResource.md
177
+ docs/LineItemDiscountResourceArrayResponse.md
171
178
  docs/LineItemListResource.md
172
179
  docs/LineItemListResourceArrayResponse.md
173
180
  docs/ListAssetsProductRegistrationRequest.md
@@ -282,6 +289,8 @@ docs/ProductChildAttributeGroupedResource.md
282
289
  docs/ProductChildAttributeGroupedResourceArrayResponse.md
283
290
  docs/ProductChildAttributeResource.md
284
291
  docs/ProductChildAttributeResourceArrayResponse.md
292
+ docs/ProductChildCartLiteResource.md
293
+ docs/ProductChildCartLiteResourceArrayResponse.md
285
294
  docs/ProductChildListResource.md
286
295
  docs/ProductChildListResourceArrayResponse.md
287
296
  docs/ProductChildLiteResource.md
@@ -560,6 +569,8 @@ src/models/AttributeResourceArrayResponse.ts
560
569
  src/models/AttributeType.ts
561
570
  src/models/AttributeValueResource.ts
562
571
  src/models/AttributeValueResourceArrayResponse.ts
572
+ src/models/CartCouponResource.ts
573
+ src/models/CartCouponResourceArrayResponse.ts
563
574
  src/models/CartListResource.ts
564
575
  src/models/CartListResourceArrayResponse.ts
565
576
  src/models/CartOrderSource.ts
@@ -590,6 +601,7 @@ src/models/DestroyAttributeValueRequest.ts
590
601
  src/models/DetachAccessoriesProductRangeRequest.ts
591
602
  src/models/DetachAssetableOverlayTemplateRequest.ts
592
603
  src/models/DetachAttributesProductRangeRequest.ts
604
+ src/models/DetachCouponCartRequest.ts
593
605
  src/models/DetachDocumentablesDocumentRequest.ts
594
606
  src/models/DetachDocumentablesDocumentRequestDocumentablesInner.ts
595
607
  src/models/DetachDocumentsProductChildRequest.ts
@@ -597,6 +609,8 @@ src/models/DetachDocumentsProductRangeRequest.ts
597
609
  src/models/DetachProductsProductCategoryRequest.ts
598
610
  src/models/DetachStoresSupplierRequest.ts
599
611
  src/models/DetachSuppliersStoreRequest.ts
612
+ src/models/DiscountType.ts
613
+ src/models/DiscountValueType.ts
600
614
  src/models/DocumentFileForUploadResource.ts
601
615
  src/models/DocumentFileForUploadResourceArrayResponse.ts
602
616
  src/models/DocumentFrontendResource.ts
@@ -672,6 +686,8 @@ src/models/LabelResource.ts
672
686
  src/models/LabelResourceArrayResponse.ts
673
687
  src/models/LiAddressResource.ts
674
688
  src/models/LiAddressResourceArrayResponse.ts
689
+ src/models/LineItemDiscountResource.ts
690
+ src/models/LineItemDiscountResourceArrayResponse.ts
675
691
  src/models/LineItemListResource.ts
676
692
  src/models/LineItemListResourceArrayResponse.ts
677
693
  src/models/ListAssetsProductRegistrationRequest.ts
@@ -781,6 +797,8 @@ src/models/ProductChildAttributeGroupedResource.ts
781
797
  src/models/ProductChildAttributeGroupedResourceArrayResponse.ts
782
798
  src/models/ProductChildAttributeResource.ts
783
799
  src/models/ProductChildAttributeResourceArrayResponse.ts
800
+ src/models/ProductChildCartLiteResource.ts
801
+ src/models/ProductChildCartLiteResourceArrayResponse.ts
784
802
  src/models/ProductChildListResource.ts
785
803
  src/models/ProductChildListResourceArrayResponse.ts
786
804
  src/models/ProductChildLiteResource.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @digital8/lighting-illusions-ts-sdk@0.0.1897
1
+ # @digital8/lighting-illusions-ts-sdk@0.0.1898
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
@@ -290,6 +290,8 @@ All URIs are relative to *http://localhost/api*
290
290
  - [AttributeType](docs/AttributeType.md)
291
291
  - [AttributeValueResource](docs/AttributeValueResource.md)
292
292
  - [AttributeValueResourceArrayResponse](docs/AttributeValueResourceArrayResponse.md)
293
+ - [CartCouponResource](docs/CartCouponResource.md)
294
+ - [CartCouponResourceArrayResponse](docs/CartCouponResourceArrayResponse.md)
293
295
  - [CartListResource](docs/CartListResource.md)
294
296
  - [CartListResourceArrayResponse](docs/CartListResourceArrayResponse.md)
295
297
  - [CartOrderSource](docs/CartOrderSource.md)
@@ -320,6 +322,7 @@ All URIs are relative to *http://localhost/api*
320
322
  - [DetachAccessoriesProductRangeRequest](docs/DetachAccessoriesProductRangeRequest.md)
321
323
  - [DetachAssetableOverlayTemplateRequest](docs/DetachAssetableOverlayTemplateRequest.md)
322
324
  - [DetachAttributesProductRangeRequest](docs/DetachAttributesProductRangeRequest.md)
325
+ - [DetachCouponCartRequest](docs/DetachCouponCartRequest.md)
323
326
  - [DetachDocumentablesDocumentRequest](docs/DetachDocumentablesDocumentRequest.md)
324
327
  - [DetachDocumentablesDocumentRequestDocumentablesInner](docs/DetachDocumentablesDocumentRequestDocumentablesInner.md)
325
328
  - [DetachDocumentsProductChildRequest](docs/DetachDocumentsProductChildRequest.md)
@@ -327,6 +330,8 @@ All URIs are relative to *http://localhost/api*
327
330
  - [DetachProductsProductCategoryRequest](docs/DetachProductsProductCategoryRequest.md)
328
331
  - [DetachStoresSupplierRequest](docs/DetachStoresSupplierRequest.md)
329
332
  - [DetachSuppliersStoreRequest](docs/DetachSuppliersStoreRequest.md)
333
+ - [DiscountType](docs/DiscountType.md)
334
+ - [DiscountValueType](docs/DiscountValueType.md)
330
335
  - [DocumentFileForUploadResource](docs/DocumentFileForUploadResource.md)
331
336
  - [DocumentFileForUploadResourceArrayResponse](docs/DocumentFileForUploadResourceArrayResponse.md)
332
337
  - [DocumentFrontendResource](docs/DocumentFrontendResource.md)
@@ -402,6 +407,8 @@ All URIs are relative to *http://localhost/api*
402
407
  - [LabelResourceArrayResponse](docs/LabelResourceArrayResponse.md)
403
408
  - [LiAddressResource](docs/LiAddressResource.md)
404
409
  - [LiAddressResourceArrayResponse](docs/LiAddressResourceArrayResponse.md)
410
+ - [LineItemDiscountResource](docs/LineItemDiscountResource.md)
411
+ - [LineItemDiscountResourceArrayResponse](docs/LineItemDiscountResourceArrayResponse.md)
405
412
  - [LineItemListResource](docs/LineItemListResource.md)
406
413
  - [LineItemListResourceArrayResponse](docs/LineItemListResourceArrayResponse.md)
407
414
  - [ListAssetsProductRegistrationRequest](docs/ListAssetsProductRegistrationRequest.md)
@@ -511,6 +518,8 @@ All URIs are relative to *http://localhost/api*
511
518
  - [ProductChildAttributeGroupedResourceArrayResponse](docs/ProductChildAttributeGroupedResourceArrayResponse.md)
512
519
  - [ProductChildAttributeResource](docs/ProductChildAttributeResource.md)
513
520
  - [ProductChildAttributeResourceArrayResponse](docs/ProductChildAttributeResourceArrayResponse.md)
521
+ - [ProductChildCartLiteResource](docs/ProductChildCartLiteResource.md)
522
+ - [ProductChildCartLiteResourceArrayResponse](docs/ProductChildCartLiteResourceArrayResponse.md)
514
523
  - [ProductChildListResource](docs/ProductChildListResource.md)
515
524
  - [ProductChildListResourceArrayResponse](docs/ProductChildListResourceArrayResponse.md)
516
525
  - [ProductChildLiteResource](docs/ProductChildLiteResource.md)
@@ -724,7 +733,7 @@ and is automatically generated by the
724
733
  [OpenAPI Generator](https://openapi-generator.tech) project:
725
734
 
726
735
  - API version: `1.0.0`
727
- - Package version: `0.0.1897`
736
+ - Package version: `0.0.1898`
728
737
  - Generator version: `7.21.0`
729
738
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
730
739
 
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AttachCouponCartRequest, AttachItemCartRequest, CartResource, GenericResponse, IndexCartRequest, PaginatedCartListResourceResponse, StoreCartRequest, UpdateCartRequest, UpdateItemCartRequest } from '../models/index';
13
+ import type { AttachCouponCartRequest, AttachItemCartRequest, CartResource, 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<CartResource>>;
101
+ detachCouponCartRaw(requestParameters: DetachCouponCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartResource>>;
102
102
  /**
103
103
  * Auto-generated: detachCouponCart
104
104
  */
105
- detachCouponCart(requestParameters: DetachCouponCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartResource>;
105
+ detachCouponCart(requestParameters: DetachCouponCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartResource>;
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
  });
@@ -20,7 +20,7 @@ export interface AddressFrontendResource {
20
20
  * @type {string}
21
21
  * @memberof AddressFrontendResource
22
22
  */
23
- company?: string | null;
23
+ company: string;
24
24
  /**
25
25
  *
26
26
  * @type {string}
@@ -22,6 +22,8 @@ exports.AddressFrontendResourceToJSONTyped = AddressFrontendResourceToJSONTyped;
22
22
  * Check if a given object implements the AddressFrontendResource interface.
23
23
  */
24
24
  function instanceOfAddressFrontendResource(value) {
25
+ if (!('company' in value) || value['company'] === undefined)
26
+ return false;
25
27
  if (!('line1' in value) || value['line1'] === undefined)
26
28
  return false;
27
29
  if (!('postcode' in value) || value['postcode'] === undefined)
@@ -44,7 +46,7 @@ function AddressFrontendResourceFromJSONTyped(json, ignoreDiscriminator) {
44
46
  return json;
45
47
  }
46
48
  return {
47
- 'company': json['company'] == null ? undefined : json['company'],
49
+ 'company': json['company'],
48
50
  'line1': json['line1'],
49
51
  'line2': json['line2'] == null ? undefined : json['line2'],
50
52
  'postcode': json['postcode'],
@@ -32,7 +32,7 @@ export interface AddressResource {
32
32
  * @type {string}
33
33
  * @memberof AddressResource
34
34
  */
35
- addresseeName: string;
35
+ addresseeName?: string | null;
36
36
  /**
37
37
  *
38
38
  * @type {string}
@@ -22,8 +22,6 @@ exports.AddressResourceToJSONTyped = AddressResourceToJSONTyped;
22
22
  * Check if a given object implements the AddressResource interface.
23
23
  */
24
24
  function instanceOfAddressResource(value) {
25
- if (!('addresseeName' in value) || value['addresseeName'] === undefined)
26
- return false;
27
25
  if (!('company' in value) || value['company'] === undefined)
28
26
  return false;
29
27
  if (!('line1' in value) || value['line1'] === undefined)
@@ -50,7 +48,7 @@ function AddressResourceFromJSONTyped(json, ignoreDiscriminator) {
50
48
  return {
51
49
  'id': json['id'] == null ? undefined : json['id'],
52
50
  'sourceAddressId': json['source_address_id'] == null ? undefined : json['source_address_id'],
53
- 'addresseeName': json['addressee_name'],
51
+ 'addresseeName': json['addressee_name'] == null ? undefined : json['addressee_name'],
54
52
  'company': json['company'],
55
53
  'line1': json['line_1'],
56
54
  'line2': json['line_2'] == null ? undefined : json['line_2'],
@@ -0,0 +1,50 @@
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 CartCouponResource
16
+ */
17
+ export interface CartCouponResource {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof CartCouponResource
22
+ */
23
+ id: number;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof CartCouponResource
28
+ */
29
+ code: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof CartCouponResource
34
+ */
35
+ name: string;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof CartCouponResource
40
+ */
41
+ discountTotal: number;
42
+ }
43
+ /**
44
+ * Check if a given object implements the CartCouponResource interface.
45
+ */
46
+ export declare function instanceOfCartCouponResource(value: object): value is CartCouponResource;
47
+ export declare function CartCouponResourceFromJSON(json: any): CartCouponResource;
48
+ export declare function CartCouponResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponResource;
49
+ export declare function CartCouponResourceToJSON(json: any): CartCouponResource;
50
+ export declare function CartCouponResourceToJSONTyped(value?: CartCouponResource | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,63 @@
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.instanceOfCartCouponResource = instanceOfCartCouponResource;
17
+ exports.CartCouponResourceFromJSON = CartCouponResourceFromJSON;
18
+ exports.CartCouponResourceFromJSONTyped = CartCouponResourceFromJSONTyped;
19
+ exports.CartCouponResourceToJSON = CartCouponResourceToJSON;
20
+ exports.CartCouponResourceToJSONTyped = CartCouponResourceToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the CartCouponResource interface.
23
+ */
24
+ function instanceOfCartCouponResource(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('code' in value) || value['code'] === undefined)
28
+ return false;
29
+ if (!('name' in value) || value['name'] === undefined)
30
+ return false;
31
+ if (!('discountTotal' in value) || value['discountTotal'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ function CartCouponResourceFromJSON(json) {
36
+ return CartCouponResourceFromJSONTyped(json, false);
37
+ }
38
+ function CartCouponResourceFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'id': json['id'],
44
+ 'code': json['code'],
45
+ 'name': json['name'],
46
+ 'discountTotal': json['discount_total'],
47
+ };
48
+ }
49
+ function CartCouponResourceToJSON(json) {
50
+ return CartCouponResourceToJSONTyped(json, false);
51
+ }
52
+ function CartCouponResourceToJSONTyped(value, ignoreDiscriminator) {
53
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
54
+ if (value == null) {
55
+ return value;
56
+ }
57
+ return {
58
+ 'id': value['id'],
59
+ 'code': value['code'],
60
+ 'name': value['name'],
61
+ 'discount_total': value['discountTotal'],
62
+ };
63
+ }
@@ -0,0 +1,33 @@
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
+ import type { CartCouponResource } from './CartCouponResource';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface CartCouponResourceArrayResponse
17
+ */
18
+ export interface CartCouponResourceArrayResponse {
19
+ /**
20
+ *
21
+ * @type {Array<CartCouponResource>}
22
+ * @memberof CartCouponResourceArrayResponse
23
+ */
24
+ data?: Array<CartCouponResource>;
25
+ }
26
+ /**
27
+ * Check if a given object implements the CartCouponResourceArrayResponse interface.
28
+ */
29
+ export declare function instanceOfCartCouponResourceArrayResponse(value: object): value is CartCouponResourceArrayResponse;
30
+ export declare function CartCouponResourceArrayResponseFromJSON(json: any): CartCouponResourceArrayResponse;
31
+ export declare function CartCouponResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponResourceArrayResponse;
32
+ export declare function CartCouponResourceArrayResponseToJSON(json: any): CartCouponResourceArrayResponse;
33
+ export declare function CartCouponResourceArrayResponseToJSONTyped(value?: CartCouponResourceArrayResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.instanceOfCartCouponResourceArrayResponse = instanceOfCartCouponResourceArrayResponse;
17
+ exports.CartCouponResourceArrayResponseFromJSON = CartCouponResourceArrayResponseFromJSON;
18
+ exports.CartCouponResourceArrayResponseFromJSONTyped = CartCouponResourceArrayResponseFromJSONTyped;
19
+ exports.CartCouponResourceArrayResponseToJSON = CartCouponResourceArrayResponseToJSON;
20
+ exports.CartCouponResourceArrayResponseToJSONTyped = CartCouponResourceArrayResponseToJSONTyped;
21
+ var CartCouponResource_1 = require("./CartCouponResource");
22
+ /**
23
+ * Check if a given object implements the CartCouponResourceArrayResponse interface.
24
+ */
25
+ function instanceOfCartCouponResourceArrayResponse(value) {
26
+ return true;
27
+ }
28
+ function CartCouponResourceArrayResponseFromJSON(json) {
29
+ return CartCouponResourceArrayResponseFromJSONTyped(json, false);
30
+ }
31
+ function CartCouponResourceArrayResponseFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'data': json['data'] == null ? undefined : (json['data'].map(CartCouponResource_1.CartCouponResourceFromJSON)),
37
+ };
38
+ }
39
+ function CartCouponResourceArrayResponseToJSON(json) {
40
+ return CartCouponResourceArrayResponseToJSONTyped(json, false);
41
+ }
42
+ function CartCouponResourceArrayResponseToJSONTyped(value, ignoreDiscriminator) {
43
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'data': value['data'] == null ? undefined : (value['data'].map(CartCouponResource_1.CartCouponResourceToJSON)),
49
+ };
50
+ }
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { SiteLiteResource } from './SiteLiteResource';
13
13
  import type { LineItemListResource } from './LineItemListResource';
14
+ import type { CartCouponResource } from './CartCouponResource';
14
15
  import type { CustomerListResource } from './CustomerListResource';
15
16
  import type { AddressResource } from './AddressResource';
16
17
  /**
@@ -96,7 +97,7 @@ export interface CartResource {
96
97
  * @type {number}
97
98
  * @memberof CartResource
98
99
  */
99
- insuranceAmount?: number | null;
100
+ insuranceAmount: number;
100
101
  /**
101
102
  *
102
103
  * @type {boolean}
@@ -135,10 +136,10 @@ export interface CartResource {
135
136
  lineItems: Array<LineItemListResource> | null;
136
137
  /**
137
138
  *
138
- * @type {object}
139
+ * @type {Array<CartCouponResource>}
139
140
  * @memberof CartResource
140
141
  */
141
- coupons: object;
142
+ coupons: Array<CartCouponResource> | null;
142
143
  /**
143
144
  *
144
145
  * @type {AddressResource}
@@ -151,6 +152,12 @@ export interface CartResource {
151
152
  * @memberof CartResource
152
153
  */
153
154
  billingAddress: AddressResource | null;
155
+ /**
156
+ *
157
+ * @type {number}
158
+ * @memberof CartResource
159
+ */
160
+ discountPreview: number;
154
161
  /**
155
162
  *
156
163
  * @type {number}
@@ -162,19 +169,43 @@ export interface CartResource {
162
169
  * @type {number}
163
170
  * @memberof CartResource
164
171
  */
165
- discountPreview: number;
172
+ shippingAmount: number;
173
+ /**
174
+ *
175
+ * @type {number}
176
+ * @memberof CartResource
177
+ */
178
+ total: number;
179
+ /**
180
+ *
181
+ * @type {number}
182
+ * @memberof CartResource
183
+ */
184
+ discountAmount: number;
185
+ /**
186
+ *
187
+ * @type {number}
188
+ * @memberof CartResource
189
+ */
190
+ productDiscountAmount: number;
191
+ /**
192
+ *
193
+ * @type {number}
194
+ * @memberof CartResource
195
+ */
196
+ shippingDiscountAmount: number;
166
197
  /**
167
198
  *
168
199
  * @type {number}
169
200
  * @memberof CartResource
170
201
  */
171
- shippingEstimate: number;
202
+ cartDiscountAmount: number;
172
203
  /**
173
204
  *
174
205
  * @type {number}
175
206
  * @memberof CartResource
176
207
  */
177
- insuranceEstimate: number;
208
+ finalTotalAmount: number;
178
209
  /**
179
210
  *
180
211
  * @type {string}
@@ -20,6 +20,7 @@ exports.CartResourceToJSON = CartResourceToJSON;
20
20
  exports.CartResourceToJSONTyped = CartResourceToJSONTyped;
21
21
  var SiteLiteResource_1 = require("./SiteLiteResource");
22
22
  var LineItemListResource_1 = require("./LineItemListResource");
23
+ var CartCouponResource_1 = require("./CartCouponResource");
23
24
  var CustomerListResource_1 = require("./CustomerListResource");
24
25
  var AddressResource_1 = require("./AddressResource");
25
26
  /**
@@ -34,6 +35,8 @@ function instanceOfCartResource(value) {
34
35
  return false;
35
36
  if (!('overrideShipping' in value) || value['overrideShipping'] === undefined)
36
37
  return false;
38
+ if (!('insuranceAmount' in value) || value['insuranceAmount'] === undefined)
39
+ return false;
37
40
  if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined)
38
41
  return false;
39
42
  if (!('useAsBillingAddress' in value) || value['useAsBillingAddress'] === undefined)
@@ -52,13 +55,23 @@ function instanceOfCartResource(value) {
52
55
  return false;
53
56
  if (!('billingAddress' in value) || value['billingAddress'] === undefined)
54
57
  return false;
58
+ if (!('discountPreview' in value) || value['discountPreview'] === undefined)
59
+ return false;
55
60
  if (!('subtotal' in value) || value['subtotal'] === undefined)
56
61
  return false;
57
- if (!('discountPreview' in value) || value['discountPreview'] === undefined)
62
+ if (!('shippingAmount' in value) || value['shippingAmount'] === undefined)
63
+ return false;
64
+ if (!('total' in value) || value['total'] === undefined)
65
+ return false;
66
+ if (!('discountAmount' in value) || value['discountAmount'] === undefined)
58
67
  return false;
59
- if (!('shippingEstimate' in value) || value['shippingEstimate'] === undefined)
68
+ if (!('productDiscountAmount' in value) || value['productDiscountAmount'] === undefined)
60
69
  return false;
61
- if (!('insuranceEstimate' in value) || value['insuranceEstimate'] === undefined)
70
+ if (!('shippingDiscountAmount' in value) || value['shippingDiscountAmount'] === undefined)
71
+ return false;
72
+ if (!('cartDiscountAmount' in value) || value['cartDiscountAmount'] === undefined)
73
+ return false;
74
+ if (!('finalTotalAmount' in value) || value['finalTotalAmount'] === undefined)
62
75
  return false;
63
76
  if (!('status' in value) || value['status'] === undefined)
64
77
  return false;
@@ -84,20 +97,25 @@ function CartResourceFromJSONTyped(json, ignoreDiscriminator) {
84
97
  'shippingType': json['shipping_type'],
85
98
  'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
86
99
  'overrideShipping': json['override_shipping'],
87
- 'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
100
+ 'insuranceAmount': json['insurance_amount'],
88
101
  'overrideInsurance': json['override_insurance'],
89
102
  'useAsBillingAddress': json['use_as_billing_address'],
90
103
  'admin': json['admin'],
91
104
  'site': (0, SiteLiteResource_1.SiteLiteResourceFromJSON)(json['site']),
92
105
  'customer': (0, CustomerListResource_1.CustomerListResourceFromJSON)(json['customer']),
93
106
  'lineItems': (json['line_items'] == null ? null : json['line_items'].map(LineItemListResource_1.LineItemListResourceFromJSON)),
94
- 'coupons': json['coupons'],
107
+ 'coupons': (json['coupons'] == null ? null : json['coupons'].map(CartCouponResource_1.CartCouponResourceFromJSON)),
95
108
  'shippingAddress': (0, AddressResource_1.AddressResourceFromJSON)(json['shipping_address']),
96
109
  'billingAddress': (0, AddressResource_1.AddressResourceFromJSON)(json['billing_address']),
97
- 'subtotal': json['subtotal'],
98
110
  'discountPreview': json['discount_preview'],
99
- 'shippingEstimate': json['shipping_estimate'],
100
- 'insuranceEstimate': json['insurance_estimate'],
111
+ 'subtotal': json['subtotal'],
112
+ 'shippingAmount': json['shipping_amount'],
113
+ 'total': json['total'],
114
+ 'discountAmount': json['discount_amount'],
115
+ 'productDiscountAmount': json['product_discount_amount'],
116
+ 'shippingDiscountAmount': json['shipping_discount_amount'],
117
+ 'cartDiscountAmount': json['cart_discount_amount'],
118
+ 'finalTotalAmount': json['final_total_amount'],
101
119
  'status': json['status'],
102
120
  };
103
121
  }
@@ -129,13 +147,18 @@ function CartResourceToJSONTyped(value, ignoreDiscriminator) {
129
147
  'site': (0, SiteLiteResource_1.SiteLiteResourceToJSON)(value['site']),
130
148
  'customer': (0, CustomerListResource_1.CustomerListResourceToJSON)(value['customer']),
131
149
  'line_items': (value['lineItems'] == null ? null : value['lineItems'].map(LineItemListResource_1.LineItemListResourceToJSON)),
132
- 'coupons': value['coupons'],
150
+ 'coupons': (value['coupons'] == null ? null : value['coupons'].map(CartCouponResource_1.CartCouponResourceToJSON)),
133
151
  'shipping_address': (0, AddressResource_1.AddressResourceToJSON)(value['shippingAddress']),
134
152
  'billing_address': (0, AddressResource_1.AddressResourceToJSON)(value['billingAddress']),
135
- 'subtotal': value['subtotal'],
136
153
  'discount_preview': value['discountPreview'],
137
- 'shipping_estimate': value['shippingEstimate'],
138
- 'insurance_estimate': value['insuranceEstimate'],
154
+ 'subtotal': value['subtotal'],
155
+ 'shipping_amount': value['shippingAmount'],
156
+ 'total': value['total'],
157
+ 'discount_amount': value['discountAmount'],
158
+ 'product_discount_amount': value['productDiscountAmount'],
159
+ 'shipping_discount_amount': value['shippingDiscountAmount'],
160
+ 'cart_discount_amount': value['cartDiscountAmount'],
161
+ 'final_total_amount': value['finalTotalAmount'],
139
162
  'status': value['status'],
140
163
  };
141
164
  }