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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/.openapi-generator/FILES +0 -10
  2. package/README.md +2 -7
  3. package/dist/apis/index.d.ts +0 -1
  4. package/dist/apis/index.js +0 -1
  5. package/dist/models/AddressFrontendResource.d.ts +1 -1
  6. package/dist/models/AddressFrontendResource.js +3 -1
  7. package/dist/models/AddressResource.d.ts +2 -2
  8. package/dist/models/AddressResource.js +4 -4
  9. package/dist/models/ExternalApiLogResource.d.ts +1 -1
  10. package/dist/models/ExternalApiLogResource.js +1 -3
  11. package/dist/models/StoreCartRequest.d.ts +2 -2
  12. package/dist/models/StoreCartRequest.js +2 -6
  13. package/dist/models/StoreCartRequestShippingAddress.d.ts +4 -4
  14. package/dist/models/StoreCartRequestShippingAddress.js +4 -12
  15. package/dist/models/StoreFrontendResource.d.ts +2 -2
  16. package/dist/models/StoreFrontendResource.js +6 -2
  17. package/dist/models/StoreResource.d.ts +2 -2
  18. package/dist/models/StoreResource.js +6 -2
  19. package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
  20. package/dist/models/StoreSpecialDateFrontendResource.js +3 -1
  21. package/dist/models/UpdateCartRequest.d.ts +2 -2
  22. package/dist/models/UpdateCartRequest.js +2 -6
  23. package/dist/models/index.d.ts +0 -4
  24. package/dist/models/index.js +0 -4
  25. package/docs/StoreSpecialDateFrontendResource.md +1 -1
  26. package/package.json +1 -1
  27. package/src/apis/index.ts +0 -1
  28. package/src/models/AddressFrontendResource.ts +3 -2
  29. package/src/models/AddressResource.ts +5 -5
  30. package/src/models/ExternalApiLogResource.ts +2 -3
  31. package/src/models/StoreCartRequest.ts +4 -6
  32. package/src/models/StoreCartRequestShippingAddress.ts +8 -12
  33. package/src/models/StoreFrontendResource.ts +6 -4
  34. package/src/models/StoreResource.ts +6 -4
  35. package/src/models/StoreSpecialDateFrontendResource.ts +4 -3
  36. package/src/models/UpdateCartRequest.ts +4 -6
  37. package/src/models/index.ts +0 -4
  38. package/dist/apis/CouponsApi.d.ts +0 -33
  39. package/dist/apis/CouponsApi.js +0 -138
  40. package/dist/models/VerifyCouponRequest.d.ts +0 -63
  41. package/dist/models/VerifyCouponRequest.js +0 -64
  42. package/dist/models/VerifyCouponRequestProductsInner.d.ts +0 -38
  43. package/dist/models/VerifyCouponRequestProductsInner.js +0 -51
  44. package/dist/models/VerifyCouponResource.d.ts +0 -38
  45. package/dist/models/VerifyCouponResource.js +0 -55
  46. package/dist/models/VerifyCouponResourceArrayResponse.d.ts +0 -33
  47. package/dist/models/VerifyCouponResourceArrayResponse.js +0 -50
  48. package/docs/CouponsApi.md +0 -74
  49. package/docs/VerifyCouponRequest.md +0 -44
  50. package/docs/VerifyCouponRequestProductsInner.md +0 -36
  51. package/docs/VerifyCouponResource.md +0 -36
  52. package/docs/VerifyCouponResourceArrayResponse.md +0 -34
  53. package/src/apis/CouponsApi.ts +0 -77
  54. package/src/models/VerifyCouponRequest.ts +0 -115
  55. package/src/models/VerifyCouponRequestProductsInner.ts +0 -73
  56. package/src/models/VerifyCouponResource.ts +0 -75
  57. package/src/models/VerifyCouponResourceArrayResponse.ts +0 -73
@@ -1,38 +0,0 @@
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 VerifyCouponResource
16
- */
17
- export interface VerifyCouponResource {
18
- /**
19
- *
20
- * @type {number}
21
- * @memberof VerifyCouponResource
22
- */
23
- couponId: number;
24
- /**
25
- *
26
- * @type {number}
27
- * @memberof VerifyCouponResource
28
- */
29
- discountAmount: number;
30
- }
31
- /**
32
- * Check if a given object implements the VerifyCouponResource interface.
33
- */
34
- export declare function instanceOfVerifyCouponResource(value: object): value is VerifyCouponResource;
35
- export declare function VerifyCouponResourceFromJSON(json: any): VerifyCouponResource;
36
- export declare function VerifyCouponResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifyCouponResource;
37
- export declare function VerifyCouponResourceToJSON(json: any): VerifyCouponResource;
38
- export declare function VerifyCouponResourceToJSONTyped(value?: VerifyCouponResource | null, ignoreDiscriminator?: boolean): any;
@@ -1,55 +0,0 @@
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.instanceOfVerifyCouponResource = instanceOfVerifyCouponResource;
17
- exports.VerifyCouponResourceFromJSON = VerifyCouponResourceFromJSON;
18
- exports.VerifyCouponResourceFromJSONTyped = VerifyCouponResourceFromJSONTyped;
19
- exports.VerifyCouponResourceToJSON = VerifyCouponResourceToJSON;
20
- exports.VerifyCouponResourceToJSONTyped = VerifyCouponResourceToJSONTyped;
21
- /**
22
- * Check if a given object implements the VerifyCouponResource interface.
23
- */
24
- function instanceOfVerifyCouponResource(value) {
25
- if (!('couponId' in value) || value['couponId'] === undefined)
26
- return false;
27
- if (!('discountAmount' in value) || value['discountAmount'] === undefined)
28
- return false;
29
- return true;
30
- }
31
- function VerifyCouponResourceFromJSON(json) {
32
- return VerifyCouponResourceFromJSONTyped(json, false);
33
- }
34
- function VerifyCouponResourceFromJSONTyped(json, ignoreDiscriminator) {
35
- if (json == null) {
36
- return json;
37
- }
38
- return {
39
- 'couponId': json['coupon_id'],
40
- 'discountAmount': json['discount_amount'],
41
- };
42
- }
43
- function VerifyCouponResourceToJSON(json) {
44
- return VerifyCouponResourceToJSONTyped(json, false);
45
- }
46
- function VerifyCouponResourceToJSONTyped(value, ignoreDiscriminator) {
47
- if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
48
- if (value == null) {
49
- return value;
50
- }
51
- return {
52
- 'coupon_id': value['couponId'],
53
- 'discount_amount': value['discountAmount'],
54
- };
55
- }
@@ -1,33 +0,0 @@
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 { VerifyCouponResource } from './VerifyCouponResource';
13
- /**
14
- *
15
- * @export
16
- * @interface VerifyCouponResourceArrayResponse
17
- */
18
- export interface VerifyCouponResourceArrayResponse {
19
- /**
20
- *
21
- * @type {Array<VerifyCouponResource>}
22
- * @memberof VerifyCouponResourceArrayResponse
23
- */
24
- data?: Array<VerifyCouponResource>;
25
- }
26
- /**
27
- * Check if a given object implements the VerifyCouponResourceArrayResponse interface.
28
- */
29
- export declare function instanceOfVerifyCouponResourceArrayResponse(value: object): value is VerifyCouponResourceArrayResponse;
30
- export declare function VerifyCouponResourceArrayResponseFromJSON(json: any): VerifyCouponResourceArrayResponse;
31
- export declare function VerifyCouponResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifyCouponResourceArrayResponse;
32
- export declare function VerifyCouponResourceArrayResponseToJSON(json: any): VerifyCouponResourceArrayResponse;
33
- export declare function VerifyCouponResourceArrayResponseToJSONTyped(value?: VerifyCouponResourceArrayResponse | null, ignoreDiscriminator?: boolean): any;
@@ -1,50 +0,0 @@
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.instanceOfVerifyCouponResourceArrayResponse = instanceOfVerifyCouponResourceArrayResponse;
17
- exports.VerifyCouponResourceArrayResponseFromJSON = VerifyCouponResourceArrayResponseFromJSON;
18
- exports.VerifyCouponResourceArrayResponseFromJSONTyped = VerifyCouponResourceArrayResponseFromJSONTyped;
19
- exports.VerifyCouponResourceArrayResponseToJSON = VerifyCouponResourceArrayResponseToJSON;
20
- exports.VerifyCouponResourceArrayResponseToJSONTyped = VerifyCouponResourceArrayResponseToJSONTyped;
21
- var VerifyCouponResource_1 = require("./VerifyCouponResource");
22
- /**
23
- * Check if a given object implements the VerifyCouponResourceArrayResponse interface.
24
- */
25
- function instanceOfVerifyCouponResourceArrayResponse(value) {
26
- return true;
27
- }
28
- function VerifyCouponResourceArrayResponseFromJSON(json) {
29
- return VerifyCouponResourceArrayResponseFromJSONTyped(json, false);
30
- }
31
- function VerifyCouponResourceArrayResponseFromJSONTyped(json, ignoreDiscriminator) {
32
- if (json == null) {
33
- return json;
34
- }
35
- return {
36
- 'data': json['data'] == null ? undefined : (json['data'].map(VerifyCouponResource_1.VerifyCouponResourceFromJSON)),
37
- };
38
- }
39
- function VerifyCouponResourceArrayResponseToJSON(json) {
40
- return VerifyCouponResourceArrayResponseToJSONTyped(json, false);
41
- }
42
- function VerifyCouponResourceArrayResponseToJSONTyped(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(VerifyCouponResource_1.VerifyCouponResourceToJSON)),
49
- };
50
- }
@@ -1,74 +0,0 @@
1
- # CouponsApi
2
-
3
- All URIs are relative to *http://localhost/api*
4
-
5
- | Method | HTTP request | Description |
6
- |------------- | ------------- | -------------|
7
- | [**verifyCoupon**](CouponsApi.md#verifycouponoperation) | **POST** /admin-api/coupons/verify | Auto-generated: verifyCoupon |
8
-
9
-
10
-
11
- ## verifyCoupon
12
-
13
- > VerifyCouponResourceArrayResponse verifyCoupon(verifyCouponRequest)
14
-
15
- Auto-generated: verifyCoupon
16
-
17
- ### Example
18
-
19
- ```ts
20
- import {
21
- Configuration,
22
- CouponsApi,
23
- } from '@digital8/lighting-illusions-ts-sdk';
24
- import type { VerifyCouponOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
25
-
26
- async function example() {
27
- console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
28
- const api = new CouponsApi();
29
-
30
- const body = {
31
- // VerifyCouponRequest (optional)
32
- verifyCouponRequest: ...,
33
- } satisfies VerifyCouponOperationRequest;
34
-
35
- try {
36
- const data = await api.verifyCoupon(body);
37
- console.log(data);
38
- } catch (error) {
39
- console.error(error);
40
- }
41
- }
42
-
43
- // Run the test
44
- example().catch(console.error);
45
- ```
46
-
47
- ### Parameters
48
-
49
-
50
- | Name | Type | Description | Notes |
51
- |------------- | ------------- | ------------- | -------------|
52
- | **verifyCouponRequest** | [VerifyCouponRequest](VerifyCouponRequest.md) | | [Optional] |
53
-
54
- ### Return type
55
-
56
- [**VerifyCouponResourceArrayResponse**](VerifyCouponResourceArrayResponse.md)
57
-
58
- ### Authorization
59
-
60
- No authorization required
61
-
62
- ### HTTP request headers
63
-
64
- - **Content-Type**: `application/json`
65
- - **Accept**: `application/json`
66
-
67
-
68
- ### HTTP response details
69
- | Status code | Description | Response headers |
70
- |-------------|-------------|------------------|
71
- | **200** | Successful resource response | - |
72
-
73
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
74
-
@@ -1,44 +0,0 @@
1
-
2
- # VerifyCouponRequest
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `siteId` | number
10
- `customerId` | number
11
- `cartId` | number
12
- `products` | [Array&lt;VerifyCouponRequestProductsInner&gt;](VerifyCouponRequestProductsInner.md)
13
- `couponCode` | string
14
- `couponIds` | Array&lt;number&gt;
15
-
16
- ## Example
17
-
18
- ```typescript
19
- import type { VerifyCouponRequest } from '@digital8/lighting-illusions-ts-sdk'
20
-
21
- // TODO: Update the object below with actual values
22
- const example = {
23
- "siteId": null,
24
- "customerId": null,
25
- "cartId": null,
26
- "products": null,
27
- "couponCode": null,
28
- "couponIds": null,
29
- } satisfies VerifyCouponRequest
30
-
31
- console.log(example)
32
-
33
- // Convert the instance to a JSON string
34
- const exampleJSON: string = JSON.stringify(example)
35
- console.log(exampleJSON)
36
-
37
- // Parse the JSON string back to an object
38
- const exampleParsed = JSON.parse(exampleJSON) as VerifyCouponRequest
39
- console.log(exampleParsed)
40
- ```
41
-
42
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
43
-
44
-
@@ -1,36 +0,0 @@
1
-
2
- # VerifyCouponRequestProductsInner
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `productChildId` | number
10
- `quantity` | number
11
-
12
- ## Example
13
-
14
- ```typescript
15
- import type { VerifyCouponRequestProductsInner } from '@digital8/lighting-illusions-ts-sdk'
16
-
17
- // TODO: Update the object below with actual values
18
- const example = {
19
- "productChildId": null,
20
- "quantity": null,
21
- } satisfies VerifyCouponRequestProductsInner
22
-
23
- console.log(example)
24
-
25
- // Convert the instance to a JSON string
26
- const exampleJSON: string = JSON.stringify(example)
27
- console.log(exampleJSON)
28
-
29
- // Parse the JSON string back to an object
30
- const exampleParsed = JSON.parse(exampleJSON) as VerifyCouponRequestProductsInner
31
- console.log(exampleParsed)
32
- ```
33
-
34
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
-
36
-
@@ -1,36 +0,0 @@
1
-
2
- # VerifyCouponResource
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `couponId` | number
10
- `discountAmount` | number
11
-
12
- ## Example
13
-
14
- ```typescript
15
- import type { VerifyCouponResource } from '@digital8/lighting-illusions-ts-sdk'
16
-
17
- // TODO: Update the object below with actual values
18
- const example = {
19
- "couponId": null,
20
- "discountAmount": null,
21
- } satisfies VerifyCouponResource
22
-
23
- console.log(example)
24
-
25
- // Convert the instance to a JSON string
26
- const exampleJSON: string = JSON.stringify(example)
27
- console.log(exampleJSON)
28
-
29
- // Parse the JSON string back to an object
30
- const exampleParsed = JSON.parse(exampleJSON) as VerifyCouponResource
31
- console.log(exampleParsed)
32
- ```
33
-
34
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
-
36
-
@@ -1,34 +0,0 @@
1
-
2
- # VerifyCouponResourceArrayResponse
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `data` | [Array&lt;VerifyCouponResource&gt;](VerifyCouponResource.md)
10
-
11
- ## Example
12
-
13
- ```typescript
14
- import type { VerifyCouponResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
15
-
16
- // TODO: Update the object below with actual values
17
- const example = {
18
- "data": null,
19
- } satisfies VerifyCouponResourceArrayResponse
20
-
21
- console.log(example)
22
-
23
- // Convert the instance to a JSON string
24
- const exampleJSON: string = JSON.stringify(example)
25
- console.log(exampleJSON)
26
-
27
- // Parse the JSON string back to an object
28
- const exampleParsed = JSON.parse(exampleJSON) as VerifyCouponResourceArrayResponse
29
- console.log(exampleParsed)
30
- ```
31
-
32
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
33
-
34
-
@@ -1,77 +0,0 @@
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
-
16
- import * as runtime from '../runtime';
17
- import type {
18
- VerifyCouponRequest,
19
- VerifyCouponResourceArrayResponse,
20
- } from '../models/index';
21
- import {
22
- VerifyCouponRequestFromJSON,
23
- VerifyCouponRequestToJSON,
24
- VerifyCouponResourceArrayResponseFromJSON,
25
- VerifyCouponResourceArrayResponseToJSON,
26
- } from '../models/index';
27
-
28
- export interface VerifyCouponOperationRequest {
29
- verifyCouponRequest?: VerifyCouponRequest;
30
- }
31
-
32
- /**
33
- *
34
- */
35
- export class CouponsApi extends runtime.BaseAPI {
36
-
37
- /**
38
- * Creates request options for verifyCoupon without sending the request
39
- */
40
- async verifyCouponRequestOpts(requestParameters: VerifyCouponOperationRequest): Promise<runtime.RequestOpts> {
41
- const queryParameters: any = {};
42
-
43
- const headerParameters: runtime.HTTPHeaders = {};
44
-
45
- headerParameters['Content-Type'] = 'application/json';
46
-
47
-
48
- let urlPath = `/admin-api/coupons/verify`;
49
-
50
- return {
51
- path: urlPath,
52
- method: 'POST',
53
- headers: headerParameters,
54
- query: queryParameters,
55
- body: VerifyCouponRequestToJSON(requestParameters['verifyCouponRequest']),
56
- };
57
- }
58
-
59
- /**
60
- * Auto-generated: verifyCoupon
61
- */
62
- async verifyCouponRaw(requestParameters: VerifyCouponOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VerifyCouponResourceArrayResponse>> {
63
- const requestOptions = await this.verifyCouponRequestOpts(requestParameters);
64
- const response = await this.request(requestOptions, initOverrides);
65
-
66
- return new runtime.JSONApiResponse(response, (jsonValue) => VerifyCouponResourceArrayResponseFromJSON(jsonValue));
67
- }
68
-
69
- /**
70
- * Auto-generated: verifyCoupon
71
- */
72
- async verifyCoupon(requestParameters: VerifyCouponOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VerifyCouponResourceArrayResponse> {
73
- const response = await this.verifyCouponRaw(requestParameters, initOverrides);
74
- return await response.value();
75
- }
76
-
77
- }
@@ -1,115 +0,0 @@
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
- import type { VerifyCouponRequestProductsInner } from './VerifyCouponRequestProductsInner';
17
- import {
18
- VerifyCouponRequestProductsInnerFromJSON,
19
- VerifyCouponRequestProductsInnerFromJSONTyped,
20
- VerifyCouponRequestProductsInnerToJSON,
21
- VerifyCouponRequestProductsInnerToJSONTyped,
22
- } from './VerifyCouponRequestProductsInner';
23
-
24
- /**
25
- *
26
- * @export
27
- * @interface VerifyCouponRequest
28
- */
29
- export interface VerifyCouponRequest {
30
- /**
31
- *
32
- * @type {number}
33
- * @memberof VerifyCouponRequest
34
- */
35
- siteId: number;
36
- /**
37
- *
38
- * @type {number}
39
- * @memberof VerifyCouponRequest
40
- */
41
- customerId: number;
42
- /**
43
- *
44
- * @type {number}
45
- * @memberof VerifyCouponRequest
46
- */
47
- cartId?: number | null;
48
- /**
49
- *
50
- * @type {Array<VerifyCouponRequestProductsInner>}
51
- * @memberof VerifyCouponRequest
52
- */
53
- products?: Array<VerifyCouponRequestProductsInner>;
54
- /**
55
- *
56
- * @type {string}
57
- * @memberof VerifyCouponRequest
58
- */
59
- couponCode?: string | null;
60
- /**
61
- *
62
- * @type {Array<number>}
63
- * @memberof VerifyCouponRequest
64
- */
65
- couponIds?: Array<number>;
66
- }
67
-
68
- /**
69
- * Check if a given object implements the VerifyCouponRequest interface.
70
- */
71
- export function instanceOfVerifyCouponRequest(value: object): value is VerifyCouponRequest {
72
- if (!('siteId' in value) || value['siteId'] === undefined) return false;
73
- if (!('customerId' in value) || value['customerId'] === undefined) return false;
74
- return true;
75
- }
76
-
77
- export function VerifyCouponRequestFromJSON(json: any): VerifyCouponRequest {
78
- return VerifyCouponRequestFromJSONTyped(json, false);
79
- }
80
-
81
- export function VerifyCouponRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifyCouponRequest {
82
- if (json == null) {
83
- return json;
84
- }
85
- return {
86
-
87
- 'siteId': json['site_id'],
88
- 'customerId': json['customer_id'],
89
- 'cartId': json['cart_id'] == null ? undefined : json['cart_id'],
90
- 'products': json['products'] == null ? undefined : ((json['products'] as Array<any>).map(VerifyCouponRequestProductsInnerFromJSON)),
91
- 'couponCode': json['coupon_code'] == null ? undefined : json['coupon_code'],
92
- 'couponIds': json['coupon_ids'] == null ? undefined : json['coupon_ids'],
93
- };
94
- }
95
-
96
- export function VerifyCouponRequestToJSON(json: any): VerifyCouponRequest {
97
- return VerifyCouponRequestToJSONTyped(json, false);
98
- }
99
-
100
- export function VerifyCouponRequestToJSONTyped(value?: VerifyCouponRequest | null, ignoreDiscriminator: boolean = false): any {
101
- if (value == null) {
102
- return value;
103
- }
104
-
105
- return {
106
-
107
- 'site_id': value['siteId'],
108
- 'customer_id': value['customerId'],
109
- 'cart_id': value['cartId'],
110
- 'products': value['products'] == null ? undefined : ((value['products'] as Array<any>).map(VerifyCouponRequestProductsInnerToJSON)),
111
- 'coupon_code': value['couponCode'],
112
- 'coupon_ids': value['couponIds'],
113
- };
114
- }
115
-
@@ -1,73 +0,0 @@
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 VerifyCouponRequestProductsInner
20
- */
21
- export interface VerifyCouponRequestProductsInner {
22
- /**
23
- *
24
- * @type {number}
25
- * @memberof VerifyCouponRequestProductsInner
26
- */
27
- productChildId?: number;
28
- /**
29
- *
30
- * @type {number}
31
- * @memberof VerifyCouponRequestProductsInner
32
- */
33
- quantity?: number;
34
- }
35
-
36
- /**
37
- * Check if a given object implements the VerifyCouponRequestProductsInner interface.
38
- */
39
- export function instanceOfVerifyCouponRequestProductsInner(value: object): value is VerifyCouponRequestProductsInner {
40
- return true;
41
- }
42
-
43
- export function VerifyCouponRequestProductsInnerFromJSON(json: any): VerifyCouponRequestProductsInner {
44
- return VerifyCouponRequestProductsInnerFromJSONTyped(json, false);
45
- }
46
-
47
- export function VerifyCouponRequestProductsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifyCouponRequestProductsInner {
48
- if (json == null) {
49
- return json;
50
- }
51
- return {
52
-
53
- 'productChildId': json['product_child_id'] == null ? undefined : json['product_child_id'],
54
- 'quantity': json['quantity'] == null ? undefined : json['quantity'],
55
- };
56
- }
57
-
58
- export function VerifyCouponRequestProductsInnerToJSON(json: any): VerifyCouponRequestProductsInner {
59
- return VerifyCouponRequestProductsInnerToJSONTyped(json, false);
60
- }
61
-
62
- export function VerifyCouponRequestProductsInnerToJSONTyped(value?: VerifyCouponRequestProductsInner | null, ignoreDiscriminator: boolean = false): any {
63
- if (value == null) {
64
- return value;
65
- }
66
-
67
- return {
68
-
69
- 'product_child_id': value['productChildId'],
70
- 'quantity': value['quantity'],
71
- };
72
- }
73
-