@digital8/lighting-illusions-ts-sdk 0.0.2378 → 0.0.2379

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 (117) hide show
  1. package/.openapi-generator/FILES +0 -30
  2. package/README.md +2 -22
  3. package/dist/apis/index.d.ts +0 -1
  4. package/dist/apis/index.js +0 -1
  5. package/dist/models/AddressResource.d.ts +2 -2
  6. package/dist/models/AddressResource.js +4 -4
  7. package/dist/models/CreateSupplierRequest.d.ts +6 -0
  8. package/dist/models/CreateSupplierRequest.js +2 -0
  9. package/dist/models/OrderFulfillmentResource.d.ts +1 -1
  10. package/dist/models/OrderFulfillmentResource.js +3 -1
  11. package/dist/models/ProductCategoryLiteResource.d.ts +0 -6
  12. package/dist/models/ProductCategoryLiteResource.js +0 -4
  13. package/dist/models/ProductChildListResource.d.ts +0 -6
  14. package/dist/models/ProductChildListResource.js +0 -4
  15. package/dist/models/SearchCartsRequest.d.ts +0 -6
  16. package/dist/models/SearchCartsRequest.js +0 -2
  17. package/dist/models/SearchOrdersRequest.d.ts +0 -6
  18. package/dist/models/SearchOrdersRequest.js +0 -2
  19. package/dist/models/StoreFrontendResource.d.ts +1 -1
  20. package/dist/models/StoreFrontendResource.js +3 -1
  21. package/dist/models/StoreResource.d.ts +2 -2
  22. package/dist/models/StoreResource.js +4 -4
  23. package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
  24. package/dist/models/StoreSpecialDateFrontendResource.js +1 -3
  25. package/dist/models/SupplierFrontendResource.d.ts +6 -0
  26. package/dist/models/SupplierFrontendResource.js +4 -0
  27. package/dist/models/SupplierResource.d.ts +6 -0
  28. package/dist/models/SupplierResource.js +4 -0
  29. package/dist/models/UpdateSupplierRequest.d.ts +6 -0
  30. package/dist/models/UpdateSupplierRequest.js +2 -0
  31. package/dist/models/index.d.ts +0 -14
  32. package/dist/models/index.js +0 -14
  33. package/docs/CreateSupplierRequest.md +2 -0
  34. package/docs/ProductCategoryLiteResource.md +0 -2
  35. package/docs/ProductChildListResource.md +0 -2
  36. package/docs/SearchCartsRequest.md +0 -2
  37. package/docs/SearchOrdersRequest.md +0 -2
  38. package/docs/StoreSpecialDateFrontendResource.md +1 -1
  39. package/docs/SupplierFrontendResource.md +2 -0
  40. package/docs/SupplierResource.md +2 -0
  41. package/docs/UpdateSupplierRequest.md +2 -0
  42. package/package.json +1 -1
  43. package/src/apis/index.ts +0 -1
  44. package/src/models/AddressResource.ts +5 -5
  45. package/src/models/CreateSupplierRequest.ts +8 -0
  46. package/src/models/OrderFulfillmentResource.ts +3 -2
  47. package/src/models/ProductCategoryLiteResource.ts +0 -9
  48. package/src/models/ProductChildListResource.ts +0 -9
  49. package/src/models/SearchCartsRequest.ts +0 -8
  50. package/src/models/SearchOrdersRequest.ts +0 -8
  51. package/src/models/StoreFrontendResource.ts +3 -2
  52. package/src/models/StoreResource.ts +5 -5
  53. package/src/models/StoreSpecialDateFrontendResource.ts +3 -4
  54. package/src/models/SupplierFrontendResource.ts +9 -0
  55. package/src/models/SupplierResource.ts +9 -0
  56. package/src/models/UpdateSupplierRequest.ts +8 -0
  57. package/src/models/index.ts +0 -14
  58. package/dist/apis/CouponsApi.d.ts +0 -116
  59. package/dist/apis/CouponsApi.js +0 -440
  60. package/dist/models/CouponListResource.d.ts +0 -99
  61. package/dist/models/CouponListResource.js +0 -90
  62. package/dist/models/CouponListResourceArrayResponse.d.ts +0 -33
  63. package/dist/models/CouponListResourceArrayResponse.js +0 -50
  64. package/dist/models/CouponLiteResource.d.ts +0 -44
  65. package/dist/models/CouponLiteResource.js +0 -57
  66. package/dist/models/CouponLiteResourceArrayResponse.d.ts +0 -33
  67. package/dist/models/CouponLiteResourceArrayResponse.js +0 -50
  68. package/dist/models/CouponResource.d.ts +0 -163
  69. package/dist/models/CouponResource.js +0 -134
  70. package/dist/models/CouponResourceArrayResponse.d.ts +0 -33
  71. package/dist/models/CouponResourceArrayResponse.js +0 -50
  72. package/dist/models/CouponType.d.ts +0 -26
  73. package/dist/models/CouponType.js +0 -52
  74. package/dist/models/CreateCouponRequest.d.ts +0 -134
  75. package/dist/models/CreateCouponRequest.js +0 -114
  76. package/dist/models/CreateCouponRequestCouponablesInner.d.ts +0 -48
  77. package/dist/models/CreateCouponRequestCouponablesInner.js +0 -61
  78. package/dist/models/PaginatedCouponListResourceResponse.d.ts +0 -40
  79. package/dist/models/PaginatedCouponListResourceResponse.js +0 -57
  80. package/dist/models/PaginatedCouponResourceResponse.d.ts +0 -40
  81. package/dist/models/PaginatedCouponResourceResponse.js +0 -57
  82. package/dist/models/SearchAllCouponsRequest.d.ts +0 -101
  83. package/dist/models/SearchAllCouponsRequest.js +0 -85
  84. package/dist/models/SearchCouponsRequest.d.ts +0 -137
  85. package/dist/models/SearchCouponsRequest.js +0 -97
  86. package/dist/models/UpdateCouponRequest.d.ts +0 -128
  87. package/dist/models/UpdateCouponRequest.js +0 -110
  88. package/docs/CouponListResource.md +0 -56
  89. package/docs/CouponListResourceArrayResponse.md +0 -34
  90. package/docs/CouponLiteResource.md +0 -38
  91. package/docs/CouponLiteResourceArrayResponse.md +0 -34
  92. package/docs/CouponResource.md +0 -76
  93. package/docs/CouponResourceArrayResponse.md +0 -34
  94. package/docs/CouponType.md +0 -32
  95. package/docs/CouponsApi.md +0 -407
  96. package/docs/CreateCouponRequest.md +0 -62
  97. package/docs/CreateCouponRequestCouponablesInner.md +0 -36
  98. package/docs/PaginatedCouponListResourceResponse.md +0 -36
  99. package/docs/PaginatedCouponResourceResponse.md +0 -36
  100. package/docs/SearchAllCouponsRequest.md +0 -50
  101. package/docs/SearchCouponsRequest.md +0 -62
  102. package/docs/UpdateCouponRequest.md +0 -60
  103. package/src/apis/CouponsApi.ts +0 -345
  104. package/src/models/CouponListResource.ts +0 -170
  105. package/src/models/CouponListResourceArrayResponse.ts +0 -73
  106. package/src/models/CouponLiteResource.ts +0 -83
  107. package/src/models/CouponLiteResourceArrayResponse.ts +0 -73
  108. package/src/models/CouponResource.ts +0 -288
  109. package/src/models/CouponResourceArrayResponse.ts +0 -73
  110. package/src/models/CouponType.ts +0 -54
  111. package/src/models/CreateCouponRequest.ts +0 -216
  112. package/src/models/CreateCouponRequestCouponablesInner.ts +0 -86
  113. package/src/models/PaginatedCouponListResourceResponse.ts +0 -90
  114. package/src/models/PaginatedCouponResourceResponse.ts +0 -90
  115. package/src/models/SearchAllCouponsRequest.ts +0 -154
  116. package/src/models/SearchCouponsRequest.ts +0 -202
  117. package/src/models/UpdateCouponRequest.ts +0 -207
@@ -1,56 +0,0 @@
1
-
2
- # CouponListResource
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `id` | number
10
- `name` | string
11
- `code` | string
12
- `type` | string
13
- `discountType` | string
14
- `discountAmount` | number
15
- `startDate` | Date
16
- `endDate` | Date
17
- `isAbandonedCart` | boolean
18
- `site` | [SiteLiteResource](SiteLiteResource.md)
19
- `ordersCount` | number
20
- `cartsCount` | number
21
-
22
- ## Example
23
-
24
- ```typescript
25
- import type { CouponListResource } from '@digital8/lighting-illusions-ts-sdk'
26
-
27
- // TODO: Update the object below with actual values
28
- const example = {
29
- "id": null,
30
- "name": null,
31
- "code": null,
32
- "type": null,
33
- "discountType": null,
34
- "discountAmount": null,
35
- "startDate": null,
36
- "endDate": null,
37
- "isAbandonedCart": null,
38
- "site": null,
39
- "ordersCount": null,
40
- "cartsCount": null,
41
- } satisfies CouponListResource
42
-
43
- console.log(example)
44
-
45
- // Convert the instance to a JSON string
46
- const exampleJSON: string = JSON.stringify(example)
47
- console.log(exampleJSON)
48
-
49
- // Parse the JSON string back to an object
50
- const exampleParsed = JSON.parse(exampleJSON) as CouponListResource
51
- console.log(exampleParsed)
52
- ```
53
-
54
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
55
-
56
-
@@ -1,34 +0,0 @@
1
-
2
- # CouponListResourceArrayResponse
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `data` | [Array<CouponListResource>](CouponListResource.md)
10
-
11
- ## Example
12
-
13
- ```typescript
14
- import type { CouponListResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
15
-
16
- // TODO: Update the object below with actual values
17
- const example = {
18
- "data": null,
19
- } satisfies CouponListResourceArrayResponse
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 CouponListResourceArrayResponse
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,38 +0,0 @@
1
-
2
- # CouponLiteResource
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `id` | number
10
- `name` | string
11
- `code` | string
12
-
13
- ## Example
14
-
15
- ```typescript
16
- import type { CouponLiteResource } from '@digital8/lighting-illusions-ts-sdk'
17
-
18
- // TODO: Update the object below with actual values
19
- const example = {
20
- "id": null,
21
- "name": null,
22
- "code": null,
23
- } satisfies CouponLiteResource
24
-
25
- console.log(example)
26
-
27
- // Convert the instance to a JSON string
28
- const exampleJSON: string = JSON.stringify(example)
29
- console.log(exampleJSON)
30
-
31
- // Parse the JSON string back to an object
32
- const exampleParsed = JSON.parse(exampleJSON) as CouponLiteResource
33
- console.log(exampleParsed)
34
- ```
35
-
36
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
37
-
38
-
@@ -1,34 +0,0 @@
1
-
2
- # CouponLiteResourceArrayResponse
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `data` | [Array<CouponLiteResource>](CouponLiteResource.md)
10
-
11
- ## Example
12
-
13
- ```typescript
14
- import type { CouponLiteResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
15
-
16
- // TODO: Update the object below with actual values
17
- const example = {
18
- "data": null,
19
- } satisfies CouponLiteResourceArrayResponse
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 CouponLiteResourceArrayResponse
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,76 +0,0 @@
1
-
2
- # CouponResource
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `id` | number
10
- `name` | string
11
- `code` | string
12
- `type` | string
13
- `discountType` | string
14
- `discountAmount` | number
15
- `minAmount` | number
16
- `minProducts` | number
17
- `totalUseLimit` | number
18
- `customerUseLimit` | number
19
- `isAbandonedCart` | boolean
20
- `isForAllProducts` | boolean
21
- `isForAllCustomers` | boolean
22
- `startDate` | Date
23
- `endDate` | Date
24
- `site` | [SiteLiteResource](SiteLiteResource.md)
25
- `productChildren` | [Array<ProductChildLiteResource>](ProductChildLiteResource.md)
26
- `categories` | [Array<ProductCategoryListResource>](ProductCategoryListResource.md)
27
- `suppliers` | [Array<SupplierListResource>](SupplierListResource.md)
28
- `customers` | [Array<CustomerListResource>](CustomerListResource.md)
29
- `ordersCount` | number
30
- `cartsCount` | number
31
-
32
- ## Example
33
-
34
- ```typescript
35
- import type { CouponResource } from '@digital8/lighting-illusions-ts-sdk'
36
-
37
- // TODO: Update the object below with actual values
38
- const example = {
39
- "id": null,
40
- "name": null,
41
- "code": null,
42
- "type": null,
43
- "discountType": null,
44
- "discountAmount": null,
45
- "minAmount": null,
46
- "minProducts": null,
47
- "totalUseLimit": null,
48
- "customerUseLimit": null,
49
- "isAbandonedCart": null,
50
- "isForAllProducts": null,
51
- "isForAllCustomers": null,
52
- "startDate": null,
53
- "endDate": null,
54
- "site": null,
55
- "productChildren": null,
56
- "categories": null,
57
- "suppliers": null,
58
- "customers": null,
59
- "ordersCount": null,
60
- "cartsCount": null,
61
- } satisfies CouponResource
62
-
63
- console.log(example)
64
-
65
- // Convert the instance to a JSON string
66
- const exampleJSON: string = JSON.stringify(example)
67
- console.log(exampleJSON)
68
-
69
- // Parse the JSON string back to an object
70
- const exampleParsed = JSON.parse(exampleJSON) as CouponResource
71
- console.log(exampleParsed)
72
- ```
73
-
74
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
75
-
76
-
@@ -1,34 +0,0 @@
1
-
2
- # CouponResourceArrayResponse
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `data` | [Array<CouponResource>](CouponResource.md)
10
-
11
- ## Example
12
-
13
- ```typescript
14
- import type { CouponResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
15
-
16
- // TODO: Update the object below with actual values
17
- const example = {
18
- "data": null,
19
- } satisfies CouponResourceArrayResponse
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 CouponResourceArrayResponse
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,32 +0,0 @@
1
-
2
- # CouponType
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
-
10
- ## Example
11
-
12
- ```typescript
13
- import type { CouponType } from '@digital8/lighting-illusions-ts-sdk'
14
-
15
- // TODO: Update the object below with actual values
16
- const example = {
17
- } satisfies CouponType
18
-
19
- console.log(example)
20
-
21
- // Convert the instance to a JSON string
22
- const exampleJSON: string = JSON.stringify(example)
23
- console.log(exampleJSON)
24
-
25
- // Parse the JSON string back to an object
26
- const exampleParsed = JSON.parse(exampleJSON) as CouponType
27
- console.log(exampleParsed)
28
- ```
29
-
30
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
31
-
32
-
@@ -1,407 +0,0 @@
1
- # CouponsApi
2
-
3
- All URIs are relative to *http://localhost/api*
4
-
5
- | Method | HTTP request | Description |
6
- |------------- | ------------- | -------------|
7
- | [**destroyCoupon**](CouponsApi.md#destroycoupon) | **DELETE** /admin-api/coupons/{coupon}/delete | Auto-generated: destroyCoupon |
8
- | [**getAllCoupon**](CouponsApi.md#getallcoupon) | **POST** /admin-api/coupons/all | Auto-generated: getAllCoupon |
9
- | [**indexCoupon**](CouponsApi.md#indexcoupon) | **POST** /admin-api/coupons/list | Auto-generated: indexCoupon |
10
- | [**showCoupon**](CouponsApi.md#showcoupon) | **GET** /admin-api/coupons/{coupon} | Auto-generated: showCoupon |
11
- | [**storeCoupon**](CouponsApi.md#storecoupon) | **POST** /admin-api/coupons/create | Auto-generated: storeCoupon |
12
- | [**updateCoupon**](CouponsApi.md#updatecouponoperation) | **PUT** /admin-api/coupons/{coupon}/update | Auto-generated: updateCoupon |
13
-
14
-
15
-
16
- ## destroyCoupon
17
-
18
- > GenericResponse destroyCoupon(coupon)
19
-
20
- Auto-generated: destroyCoupon
21
-
22
- ### Example
23
-
24
- ```ts
25
- import {
26
- Configuration,
27
- CouponsApi,
28
- } from '@digital8/lighting-illusions-ts-sdk';
29
- import type { DestroyCouponRequest } from '@digital8/lighting-illusions-ts-sdk';
30
-
31
- async function example() {
32
- console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
33
- const api = new CouponsApi();
34
-
35
- const body = {
36
- // number | The id of the coupon
37
- coupon: 56,
38
- } satisfies DestroyCouponRequest;
39
-
40
- try {
41
- const data = await api.destroyCoupon(body);
42
- console.log(data);
43
- } catch (error) {
44
- console.error(error);
45
- }
46
- }
47
-
48
- // Run the test
49
- example().catch(console.error);
50
- ```
51
-
52
- ### Parameters
53
-
54
-
55
- | Name | Type | Description | Notes |
56
- |------------- | ------------- | ------------- | -------------|
57
- | **coupon** | `number` | The id of the coupon | [Defaults to `undefined`] |
58
-
59
- ### Return type
60
-
61
- [**GenericResponse**](GenericResponse.md)
62
-
63
- ### Authorization
64
-
65
- No authorization required
66
-
67
- ### HTTP request headers
68
-
69
- - **Content-Type**: Not defined
70
- - **Accept**: `application/json`
71
-
72
-
73
- ### HTTP response details
74
- | Status code | Description | Response headers |
75
- |-------------|-------------|------------------|
76
- | **200** | \\JsonResponse | - |
77
-
78
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
79
-
80
-
81
- ## getAllCoupon
82
-
83
- > CouponLiteResourceArrayResponse getAllCoupon(searchAllCouponsRequest)
84
-
85
- Auto-generated: getAllCoupon
86
-
87
- ### Example
88
-
89
- ```ts
90
- import {
91
- Configuration,
92
- CouponsApi,
93
- } from '@digital8/lighting-illusions-ts-sdk';
94
- import type { GetAllCouponRequest } from '@digital8/lighting-illusions-ts-sdk';
95
-
96
- async function example() {
97
- console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
98
- const api = new CouponsApi();
99
-
100
- const body = {
101
- // SearchAllCouponsRequest (optional)
102
- searchAllCouponsRequest: ...,
103
- } satisfies GetAllCouponRequest;
104
-
105
- try {
106
- const data = await api.getAllCoupon(body);
107
- console.log(data);
108
- } catch (error) {
109
- console.error(error);
110
- }
111
- }
112
-
113
- // Run the test
114
- example().catch(console.error);
115
- ```
116
-
117
- ### Parameters
118
-
119
-
120
- | Name | Type | Description | Notes |
121
- |------------- | ------------- | ------------- | -------------|
122
- | **searchAllCouponsRequest** | [SearchAllCouponsRequest](SearchAllCouponsRequest.md) | | [Optional] |
123
-
124
- ### Return type
125
-
126
- [**CouponLiteResourceArrayResponse**](CouponLiteResourceArrayResponse.md)
127
-
128
- ### Authorization
129
-
130
- No authorization required
131
-
132
- ### HTTP request headers
133
-
134
- - **Content-Type**: `application/json`
135
- - **Accept**: `application/json`
136
-
137
-
138
- ### HTTP response details
139
- | Status code | Description | Response headers |
140
- |-------------|-------------|------------------|
141
- | **200** | Successful resource response | - |
142
-
143
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
144
-
145
-
146
- ## indexCoupon
147
-
148
- > PaginatedCouponListResourceResponse indexCoupon(searchCouponsRequest)
149
-
150
- Auto-generated: indexCoupon
151
-
152
- ### Example
153
-
154
- ```ts
155
- import {
156
- Configuration,
157
- CouponsApi,
158
- } from '@digital8/lighting-illusions-ts-sdk';
159
- import type { IndexCouponRequest } from '@digital8/lighting-illusions-ts-sdk';
160
-
161
- async function example() {
162
- console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
163
- const api = new CouponsApi();
164
-
165
- const body = {
166
- // SearchCouponsRequest (optional)
167
- searchCouponsRequest: ...,
168
- } satisfies IndexCouponRequest;
169
-
170
- try {
171
- const data = await api.indexCoupon(body);
172
- console.log(data);
173
- } catch (error) {
174
- console.error(error);
175
- }
176
- }
177
-
178
- // Run the test
179
- example().catch(console.error);
180
- ```
181
-
182
- ### Parameters
183
-
184
-
185
- | Name | Type | Description | Notes |
186
- |------------- | ------------- | ------------- | -------------|
187
- | **searchCouponsRequest** | [SearchCouponsRequest](SearchCouponsRequest.md) | | [Optional] |
188
-
189
- ### Return type
190
-
191
- [**PaginatedCouponListResourceResponse**](PaginatedCouponListResourceResponse.md)
192
-
193
- ### Authorization
194
-
195
- No authorization required
196
-
197
- ### HTTP request headers
198
-
199
- - **Content-Type**: `application/json`
200
- - **Accept**: `application/json`
201
-
202
-
203
- ### HTTP response details
204
- | Status code | Description | Response headers |
205
- |-------------|-------------|------------------|
206
- | **200** | Paginated response \\JsonResponse<\\ResourcePaginator<\\CouponListResource[]>> | - |
207
-
208
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
209
-
210
-
211
- ## showCoupon
212
-
213
- > CouponResource showCoupon(coupon)
214
-
215
- Auto-generated: showCoupon
216
-
217
- ### Example
218
-
219
- ```ts
220
- import {
221
- Configuration,
222
- CouponsApi,
223
- } from '@digital8/lighting-illusions-ts-sdk';
224
- import type { ShowCouponRequest } from '@digital8/lighting-illusions-ts-sdk';
225
-
226
- async function example() {
227
- console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
228
- const api = new CouponsApi();
229
-
230
- const body = {
231
- // number | The id of the coupon
232
- coupon: 56,
233
- } satisfies ShowCouponRequest;
234
-
235
- try {
236
- const data = await api.showCoupon(body);
237
- console.log(data);
238
- } catch (error) {
239
- console.error(error);
240
- }
241
- }
242
-
243
- // Run the test
244
- example().catch(console.error);
245
- ```
246
-
247
- ### Parameters
248
-
249
-
250
- | Name | Type | Description | Notes |
251
- |------------- | ------------- | ------------- | -------------|
252
- | **coupon** | `number` | The id of the coupon | [Defaults to `undefined`] |
253
-
254
- ### Return type
255
-
256
- [**CouponResource**](CouponResource.md)
257
-
258
- ### Authorization
259
-
260
- No authorization required
261
-
262
- ### HTTP request headers
263
-
264
- - **Content-Type**: Not defined
265
- - **Accept**: `application/json`
266
-
267
-
268
- ### HTTP response details
269
- | Status code | Description | Response headers |
270
- |-------------|-------------|------------------|
271
- | **200** | Successful resource response | - |
272
-
273
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
274
-
275
-
276
- ## storeCoupon
277
-
278
- > CouponResource storeCoupon(createCouponRequest)
279
-
280
- Auto-generated: storeCoupon
281
-
282
- ### Example
283
-
284
- ```ts
285
- import {
286
- Configuration,
287
- CouponsApi,
288
- } from '@digital8/lighting-illusions-ts-sdk';
289
- import type { StoreCouponRequest } from '@digital8/lighting-illusions-ts-sdk';
290
-
291
- async function example() {
292
- console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
293
- const api = new CouponsApi();
294
-
295
- const body = {
296
- // CreateCouponRequest (optional)
297
- createCouponRequest: ...,
298
- } satisfies StoreCouponRequest;
299
-
300
- try {
301
- const data = await api.storeCoupon(body);
302
- console.log(data);
303
- } catch (error) {
304
- console.error(error);
305
- }
306
- }
307
-
308
- // Run the test
309
- example().catch(console.error);
310
- ```
311
-
312
- ### Parameters
313
-
314
-
315
- | Name | Type | Description | Notes |
316
- |------------- | ------------- | ------------- | -------------|
317
- | **createCouponRequest** | [CreateCouponRequest](CreateCouponRequest.md) | | [Optional] |
318
-
319
- ### Return type
320
-
321
- [**CouponResource**](CouponResource.md)
322
-
323
- ### Authorization
324
-
325
- No authorization required
326
-
327
- ### HTTP request headers
328
-
329
- - **Content-Type**: `application/json`
330
- - **Accept**: `application/json`
331
-
332
-
333
- ### HTTP response details
334
- | Status code | Description | Response headers |
335
- |-------------|-------------|------------------|
336
- | **200** | Successful resource response | - |
337
-
338
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
339
-
340
-
341
- ## updateCoupon
342
-
343
- > CouponResource updateCoupon(coupon, updateCouponRequest)
344
-
345
- Auto-generated: updateCoupon
346
-
347
- ### Example
348
-
349
- ```ts
350
- import {
351
- Configuration,
352
- CouponsApi,
353
- } from '@digital8/lighting-illusions-ts-sdk';
354
- import type { UpdateCouponOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
355
-
356
- async function example() {
357
- console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
358
- const api = new CouponsApi();
359
-
360
- const body = {
361
- // number | The id of the coupon
362
- coupon: 56,
363
- // UpdateCouponRequest (optional)
364
- updateCouponRequest: ...,
365
- } satisfies UpdateCouponOperationRequest;
366
-
367
- try {
368
- const data = await api.updateCoupon(body);
369
- console.log(data);
370
- } catch (error) {
371
- console.error(error);
372
- }
373
- }
374
-
375
- // Run the test
376
- example().catch(console.error);
377
- ```
378
-
379
- ### Parameters
380
-
381
-
382
- | Name | Type | Description | Notes |
383
- |------------- | ------------- | ------------- | -------------|
384
- | **coupon** | `number` | The id of the coupon | [Defaults to `undefined`] |
385
- | **updateCouponRequest** | [UpdateCouponRequest](UpdateCouponRequest.md) | | [Optional] |
386
-
387
- ### Return type
388
-
389
- [**CouponResource**](CouponResource.md)
390
-
391
- ### Authorization
392
-
393
- No authorization required
394
-
395
- ### HTTP request headers
396
-
397
- - **Content-Type**: `application/json`
398
- - **Accept**: `application/json`
399
-
400
-
401
- ### HTTP response details
402
- | Status code | Description | Response headers |
403
- |-------------|-------------|------------------|
404
- | **200** | Successful resource response | - |
405
-
406
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
407
-