@digital8/lighting-illusions-ts-sdk 0.0.2348 → 0.0.2349

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 (187) hide show
  1. package/.openapi-generator/FILES +34 -14
  2. package/README.md +24 -9
  3. package/dist/apis/CouponsApi.d.ts +116 -0
  4. package/dist/apis/CouponsApi.js +440 -0
  5. package/dist/apis/index.d.ts +1 -1
  6. package/dist/apis/index.js +1 -1
  7. package/dist/models/AddressFrontendResource.d.ts +1 -1
  8. package/dist/models/AddressFrontendResource.js +1 -3
  9. package/dist/models/AddressResource.d.ts +2 -2
  10. package/dist/models/AddressResource.js +2 -6
  11. package/dist/models/AdminOrderResource.d.ts +3 -2
  12. package/dist/models/AdminOrderResource.js +3 -2
  13. package/dist/models/CartCouponResource.d.ts +50 -0
  14. package/dist/models/{AppliedCouponResource.js → CartCouponResource.js} +13 -13
  15. package/dist/models/CartCouponResourceArrayResponse.d.ts +33 -0
  16. package/dist/models/CartCouponResourceArrayResponse.js +50 -0
  17. package/dist/models/CartListResource.d.ts +0 -6
  18. package/dist/models/CartListResource.js +0 -4
  19. package/dist/models/CategoryAutomationFieldType.d.ts +0 -2
  20. package/dist/models/CategoryAutomationFieldType.js +1 -3
  21. package/dist/models/CouponListResource.d.ts +99 -0
  22. package/dist/models/CouponListResource.js +90 -0
  23. package/dist/models/CouponListResourceArrayResponse.d.ts +33 -0
  24. package/dist/models/CouponListResourceArrayResponse.js +50 -0
  25. package/dist/models/CouponLiteResource.d.ts +44 -0
  26. package/dist/models/CouponLiteResource.js +57 -0
  27. package/dist/models/CouponLiteResourceArrayResponse.d.ts +33 -0
  28. package/dist/models/CouponLiteResourceArrayResponse.js +50 -0
  29. package/dist/models/CouponResource.d.ts +163 -0
  30. package/dist/models/CouponResource.js +134 -0
  31. package/dist/models/CouponResourceArrayResponse.d.ts +33 -0
  32. package/dist/models/CouponResourceArrayResponse.js +50 -0
  33. package/dist/models/CouponType.d.ts +26 -0
  34. package/dist/models/CouponType.js +52 -0
  35. package/dist/models/CreateCouponRequest.d.ts +134 -0
  36. package/dist/models/CreateCouponRequest.js +114 -0
  37. package/dist/models/CreateCouponRequestCouponablesInner.d.ts +48 -0
  38. package/dist/models/CreateCouponRequestCouponablesInner.js +61 -0
  39. package/dist/models/CreatePageComponentRequest.d.ts +4 -4
  40. package/dist/models/CreatePageComponentRequest.js +4 -4
  41. package/dist/models/CreateProductCategoryRequestAutomationRulesInner.d.ts +0 -2
  42. package/dist/models/CreateProductCategoryRequestAutomationRulesInner.js +1 -3
  43. package/dist/models/CreateSupplierRequest.d.ts +0 -6
  44. package/dist/models/CreateSupplierRequest.js +0 -2
  45. package/dist/models/ExternalApiLogResource.d.ts +1 -1
  46. package/dist/models/ExternalApiLogResource.js +1 -3
  47. package/dist/models/FrontendCartResource.d.ts +0 -18
  48. package/dist/models/FrontendCartResource.js +0 -12
  49. package/dist/models/FrontendOrderResource.d.ts +3 -3
  50. package/dist/models/FrontendOrderResource.js +3 -3
  51. package/dist/models/OrderFulfillmentResource.d.ts +3 -3
  52. package/dist/models/OrderFulfillmentResource.js +6 -4
  53. package/dist/models/OrderStatusWithCountResource.d.ts +0 -12
  54. package/dist/models/OrderStatusWithCountResource.js +0 -8
  55. package/dist/models/PaginatedCouponListResourceResponse.d.ts +40 -0
  56. package/dist/models/PaginatedCouponListResourceResponse.js +57 -0
  57. package/dist/models/PaginatedCouponResourceResponse.d.ts +40 -0
  58. package/dist/models/PaginatedCouponResourceResponse.js +57 -0
  59. package/dist/models/ProductClassResource.d.ts +2 -2
  60. package/dist/models/SearchAllCouponsRequest.d.ts +101 -0
  61. package/dist/models/SearchAllCouponsRequest.js +85 -0
  62. package/dist/models/SearchAllOrdersRequest.d.ts +0 -6
  63. package/dist/models/SearchAllOrdersRequest.js +0 -2
  64. package/dist/models/SearchCartsRequest.d.ts +6 -0
  65. package/dist/models/SearchCartsRequest.js +2 -0
  66. package/dist/models/SearchCouponsRequest.d.ts +137 -0
  67. package/dist/models/SearchCouponsRequest.js +97 -0
  68. package/dist/models/SearchOrdersRequest.d.ts +6 -6
  69. package/dist/models/SearchOrdersRequest.js +2 -2
  70. package/dist/models/StoreFrontendResource.d.ts +2 -2
  71. package/dist/models/StoreFrontendResource.js +4 -4
  72. package/dist/models/StoreListResource.d.ts +1 -1
  73. package/dist/models/StoreListResource.js +1 -3
  74. package/dist/models/StoreResource.d.ts +2 -2
  75. package/dist/models/StoreResource.js +2 -6
  76. package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
  77. package/dist/models/StoreSpecialDateFrontendResource.js +1 -3
  78. package/dist/models/SupplierFrontendResource.d.ts +0 -6
  79. package/dist/models/SupplierFrontendResource.js +0 -4
  80. package/dist/models/SupplierResource.d.ts +0 -6
  81. package/dist/models/SupplierResource.js +0 -4
  82. package/dist/models/UpdateCouponRequest.d.ts +128 -0
  83. package/dist/models/UpdateCouponRequest.js +110 -0
  84. package/dist/models/UpdatePageComponentRequest.d.ts +4 -4
  85. package/dist/models/UpdatePageComponentRequest.js +4 -4
  86. package/dist/models/UpdateSupplierRequest.d.ts +0 -6
  87. package/dist/models/UpdateSupplierRequest.js +0 -2
  88. package/dist/models/index.d.ts +16 -6
  89. package/dist/models/index.js +16 -6
  90. package/docs/AdminOrderResource.md +1 -1
  91. package/docs/{AppliedCouponResource.md → CartCouponResource.md} +4 -4
  92. package/docs/{AppliedCouponResourceArrayResponse.md → CartCouponResourceArrayResponse.md} +5 -5
  93. package/docs/CartListResource.md +0 -2
  94. package/docs/CouponListResource.md +56 -0
  95. package/docs/{ProductClassLiteResourceArrayResponse.md → CouponListResourceArrayResponse.md} +5 -5
  96. package/docs/{ProductClassLiteResource.md → CouponLiteResource.md} +6 -6
  97. package/docs/CouponLiteResourceArrayResponse.md +34 -0
  98. package/docs/CouponResource.md +76 -0
  99. package/docs/CouponResourceArrayResponse.md +34 -0
  100. package/docs/CouponType.md +32 -0
  101. package/docs/CouponsApi.md +407 -0
  102. package/docs/CreateCouponRequest.md +62 -0
  103. package/docs/CreateCouponRequestCouponablesInner.md +36 -0
  104. package/docs/CreatePageComponentRequest.md +2 -2
  105. package/docs/CreateSupplierRequest.md +0 -2
  106. package/docs/FrontendCartResource.md +0 -6
  107. package/docs/FrontendOrderResource.md +1 -1
  108. package/docs/OrderStatusWithCountResource.md +0 -4
  109. package/docs/{PaginatedProductClassLiteResourceResponse.md → PaginatedCouponListResourceResponse.md} +5 -5
  110. package/docs/PaginatedCouponResourceResponse.md +36 -0
  111. package/docs/ProductClassResource.md +1 -1
  112. package/docs/{SearchAllProductClassesRequest.md → SearchAllCouponsRequest.md} +10 -4
  113. package/docs/SearchAllOrdersRequest.md +0 -2
  114. package/docs/SearchCartsRequest.md +2 -0
  115. package/docs/SearchCouponsRequest.md +62 -0
  116. package/docs/SearchOrdersRequest.md +2 -2
  117. package/docs/StoreSpecialDateFrontendResource.md +1 -1
  118. package/docs/SupplierFrontendResource.md +0 -2
  119. package/docs/SupplierResource.md +0 -2
  120. package/docs/UpdateCouponRequest.md +60 -0
  121. package/docs/UpdatePageComponentRequest.md +2 -2
  122. package/docs/UpdateSupplierRequest.md +0 -2
  123. package/package.json +1 -1
  124. package/src/apis/CouponsApi.ts +345 -0
  125. package/src/apis/index.ts +1 -1
  126. package/src/models/AddressFrontendResource.ts +2 -3
  127. package/src/models/AddressResource.ts +4 -6
  128. package/src/models/AdminOrderResource.ts +11 -4
  129. package/src/models/{AppliedCouponResource.ts → CartCouponResource.ts} +14 -14
  130. package/src/models/CartCouponResourceArrayResponse.ts +73 -0
  131. package/src/models/CartListResource.ts +0 -9
  132. package/src/models/CategoryAutomationFieldType.ts +1 -3
  133. package/src/models/CouponListResource.ts +170 -0
  134. package/src/models/CouponListResourceArrayResponse.ts +73 -0
  135. package/src/models/CouponLiteResource.ts +83 -0
  136. package/src/models/CouponLiteResourceArrayResponse.ts +73 -0
  137. package/src/models/CouponResource.ts +288 -0
  138. package/src/models/CouponResourceArrayResponse.ts +73 -0
  139. package/src/models/CouponType.ts +54 -0
  140. package/src/models/CreateCouponRequest.ts +216 -0
  141. package/src/models/CreateCouponRequestCouponablesInner.ts +86 -0
  142. package/src/models/CreatePageComponentRequest.ts +8 -8
  143. package/src/models/CreateProductCategoryRequestAutomationRulesInner.ts +1 -3
  144. package/src/models/CreateSupplierRequest.ts +0 -8
  145. package/src/models/ExternalApiLogResource.ts +2 -3
  146. package/src/models/FrontendCartResource.ts +0 -27
  147. package/src/models/FrontendOrderResource.ts +11 -11
  148. package/src/models/OrderFulfillmentResource.ts +8 -7
  149. package/src/models/OrderStatusWithCountResource.ts +0 -18
  150. package/src/models/PaginatedCouponListResourceResponse.ts +90 -0
  151. package/src/models/PaginatedCouponResourceResponse.ts +90 -0
  152. package/src/models/ProductClassResource.ts +2 -2
  153. package/src/models/SearchAllCouponsRequest.ts +154 -0
  154. package/src/models/SearchAllOrdersRequest.ts +0 -8
  155. package/src/models/SearchCartsRequest.ts +8 -0
  156. package/src/models/SearchCouponsRequest.ts +202 -0
  157. package/src/models/SearchOrdersRequest.ts +8 -8
  158. package/src/models/StoreFrontendResource.ts +5 -5
  159. package/src/models/StoreListResource.ts +2 -3
  160. package/src/models/StoreResource.ts +4 -6
  161. package/src/models/StoreSpecialDateFrontendResource.ts +3 -4
  162. package/src/models/SupplierFrontendResource.ts +0 -9
  163. package/src/models/SupplierResource.ts +0 -9
  164. package/src/models/UpdateCouponRequest.ts +207 -0
  165. package/src/models/UpdatePageComponentRequest.ts +8 -8
  166. package/src/models/UpdateSupplierRequest.ts +0 -8
  167. package/src/models/index.ts +16 -6
  168. package/dist/apis/ProductClassApi.d.ts +0 -34
  169. package/dist/apis/ProductClassApi.js +0 -139
  170. package/dist/models/AppliedCouponResource.d.ts +0 -50
  171. package/dist/models/AppliedCouponResourceArrayResponse.d.ts +0 -33
  172. package/dist/models/AppliedCouponResourceArrayResponse.js +0 -50
  173. package/dist/models/PaginatedProductClassLiteResourceResponse.d.ts +0 -40
  174. package/dist/models/PaginatedProductClassLiteResourceResponse.js +0 -57
  175. package/dist/models/ProductClassLiteResource.d.ts +0 -44
  176. package/dist/models/ProductClassLiteResource.js +0 -57
  177. package/dist/models/ProductClassLiteResourceArrayResponse.d.ts +0 -33
  178. package/dist/models/ProductClassLiteResourceArrayResponse.js +0 -50
  179. package/dist/models/SearchAllProductClassesRequest.d.ts +0 -78
  180. package/dist/models/SearchAllProductClassesRequest.js +0 -74
  181. package/docs/ProductClassApi.md +0 -74
  182. package/src/apis/ProductClassApi.ts +0 -76
  183. package/src/models/AppliedCouponResourceArrayResponse.ts +0 -73
  184. package/src/models/PaginatedProductClassLiteResourceResponse.ts +0 -90
  185. package/src/models/ProductClassLiteResource.ts +0 -83
  186. package/src/models/ProductClassLiteResourceArrayResponse.ts +0 -73
  187. package/src/models/SearchAllProductClassesRequest.ts +0 -125
@@ -0,0 +1,407 @@
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
+
@@ -0,0 +1,62 @@
1
+
2
+ # CreateCouponRequest
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `siteId` | 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
+ `startDate` | string
20
+ `endDate` | string
21
+ `isForAllProducts` | boolean
22
+ `isForAllCustomers` | boolean
23
+ `couponables` | [Array<CreateCouponRequestCouponablesInner>](CreateCouponRequestCouponablesInner.md)
24
+
25
+ ## Example
26
+
27
+ ```typescript
28
+ import type { CreateCouponRequest } from '@digital8/lighting-illusions-ts-sdk'
29
+
30
+ // TODO: Update the object below with actual values
31
+ const example = {
32
+ "siteId": null,
33
+ "name": null,
34
+ "code": null,
35
+ "type": null,
36
+ "discountType": null,
37
+ "discountAmount": null,
38
+ "minAmount": null,
39
+ "minProducts": null,
40
+ "totalUseLimit": null,
41
+ "customerUseLimit": null,
42
+ "startDate": null,
43
+ "endDate": null,
44
+ "isForAllProducts": null,
45
+ "isForAllCustomers": null,
46
+ "couponables": null,
47
+ } satisfies CreateCouponRequest
48
+
49
+ console.log(example)
50
+
51
+ // Convert the instance to a JSON string
52
+ const exampleJSON: string = JSON.stringify(example)
53
+ console.log(exampleJSON)
54
+
55
+ // Parse the JSON string back to an object
56
+ const exampleParsed = JSON.parse(exampleJSON) as CreateCouponRequest
57
+ console.log(exampleParsed)
58
+ ```
59
+
60
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
61
+
62
+
@@ -0,0 +1,36 @@
1
+
2
+ # CreateCouponRequestCouponablesInner
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `type` | string
10
+ `id` | number
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { CreateCouponRequestCouponablesInner } from '@digital8/lighting-illusions-ts-sdk'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "type": null,
20
+ "id": null,
21
+ } satisfies CreateCouponRequestCouponablesInner
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 CreateCouponRequestCouponablesInner
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
+
@@ -11,8 +11,8 @@ Name | Type
11
11
  `type` | string
12
12
  `disabled` | boolean
13
13
  `order` | number
14
- `startDate` | string
15
- `endDate` | string
14
+ `startDate` | Date
15
+ `endDate` | Date
16
16
  `componentData` | object
17
17
  `relations` | [Array<CreatePageComponentRequestRelationsInner>](CreatePageComponentRequestRelationsInner.md)
18
18
 
@@ -9,7 +9,6 @@ Name | Type
9
9
  `name` | string
10
10
  `slug` | string
11
11
  `supplierEta` | number
12
- `productEnquiriesOnly` | boolean
13
12
  `seo` | [Array<CreateBlogCategoryRequestSeoInner>](CreateBlogCategoryRequestSeoInner.md)
14
13
  `altText` | string
15
14
  `mimeType` | string
@@ -28,7 +27,6 @@ const example = {
28
27
  "name": null,
29
28
  "slug": null,
30
29
  "supplierEta": null,
31
- "productEnquiriesOnly": null,
32
30
  "seo": null,
33
31
  "altText": null,
34
32
  "mimeType": null,
@@ -18,14 +18,11 @@ Name | Type
18
18
  `lineItems` | [Array<FrontendLineItemResource>](FrontendLineItemResource.md)
19
19
  `coupons` | [Array<FrontendCartResourceCouponsInner>](FrontendCartResourceCouponsInner.md)
20
20
  `subtotal` | number
21
- `subtotalAfterDiscounts` | number
22
21
  `promotionalDiscount` | number
23
22
  `couponSubtotalDiscount` | number
24
23
  `couponShippingDiscount` | number
25
24
  `shipping` | number
26
25
  `transitInsurance` | number
27
- `deliveryShippingQuote` | number
28
- `transitInsuranceQuote` | number
29
26
  `gst` | number
30
27
  `grandTotal` | number
31
28
 
@@ -48,14 +45,11 @@ const example = {
48
45
  "lineItems": null,
49
46
  "coupons": null,
50
47
  "subtotal": null,
51
- "subtotalAfterDiscounts": null,
52
48
  "promotionalDiscount": null,
53
49
  "couponSubtotalDiscount": null,
54
50
  "couponShippingDiscount": null,
55
51
  "shipping": null,
56
52
  "transitInsurance": null,
57
- "deliveryShippingQuote": null,
58
- "transitInsuranceQuote": null,
59
53
  "gst": null,
60
54
  "grandTotal": null,
61
55
  } satisfies FrontendCartResource
@@ -19,7 +19,7 @@ Name | Type
19
19
  `shippingAddress` | [AddressResource](AddressResource.md)
20
20
  `billingAddress` | [AddressResource](AddressResource.md)
21
21
  `lineItems` | [Array<FrontendLineItemResource>](FrontendLineItemResource.md)
22
- `coupons` | [Array<FrontendCartResourceCouponsInner>](FrontendCartResourceCouponsInner.md)
22
+ `coupons` | [Array<CartCouponLiteResource>](CartCouponLiteResource.md)
23
23
  `subtotal` | number
24
24
  `promotionalDiscount` | number
25
25
  `couponSubtotalDiscount` | number
@@ -8,8 +8,6 @@ Name | Type
8
8
  ------------ | -------------
9
9
  `id` | number
10
10
  `name` | string
11
- `shortName` | string
12
- `displayOrder` | number
13
11
  `isOrderNetsuiteSyncable` | boolean
14
12
  `ordersCount` | number
15
13
 
@@ -22,8 +20,6 @@ import type { OrderStatusWithCountResource } from '@digital8/lighting-illusions-
22
20
  const example = {
23
21
  "id": null,
24
22
  "name": null,
25
- "shortName": null,
26
- "displayOrder": null,
27
23
  "isOrderNetsuiteSyncable": null,
28
24
  "ordersCount": null,
29
25
  } satisfies OrderStatusWithCountResource
@@ -1,24 +1,24 @@
1
1
 
2
- # PaginatedProductClassLiteResourceResponse
2
+ # PaginatedCouponListResourceResponse
3
3
 
4
4
 
5
5
  ## Properties
6
6
 
7
7
  Name | Type
8
8
  ------------ | -------------
9
- `data` | [Array<ProductClassLiteResource>](ProductClassLiteResource.md)
9
+ `data` | [Array<CouponListResource>](CouponListResource.md)
10
10
  `meta` | [PagingMetadata](PagingMetadata.md)
11
11
 
12
12
  ## Example
13
13
 
14
14
  ```typescript
15
- import type { PaginatedProductClassLiteResourceResponse } from '@digital8/lighting-illusions-ts-sdk'
15
+ import type { PaginatedCouponListResourceResponse } from '@digital8/lighting-illusions-ts-sdk'
16
16
 
17
17
  // TODO: Update the object below with actual values
18
18
  const example = {
19
19
  "data": null,
20
20
  "meta": null,
21
- } satisfies PaginatedProductClassLiteResourceResponse
21
+ } satisfies PaginatedCouponListResourceResponse
22
22
 
23
23
  console.log(example)
24
24
 
@@ -27,7 +27,7 @@ const exampleJSON: string = JSON.stringify(example)
27
27
  console.log(exampleJSON)
28
28
 
29
29
  // Parse the JSON string back to an object
30
- const exampleParsed = JSON.parse(exampleJSON) as PaginatedProductClassLiteResourceResponse
30
+ const exampleParsed = JSON.parse(exampleJSON) as PaginatedCouponListResourceResponse
31
31
  console.log(exampleParsed)
32
32
  ```
33
33
 
@@ -0,0 +1,36 @@
1
+
2
+ # PaginatedCouponResourceResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `data` | [Array<CouponResource>](CouponResource.md)
10
+ `meta` | [PagingMetadata](PagingMetadata.md)
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { PaginatedCouponResourceResponse } from '@digital8/lighting-illusions-ts-sdk'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "data": null,
20
+ "meta": null,
21
+ } satisfies PaginatedCouponResourceResponse
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 PaginatedCouponResourceResponse
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
+
@@ -9,7 +9,7 @@ Name | Type
9
9
  `id` | number
10
10
  `netsuiteId` | string
11
11
  `name` | string
12
- `parentId` | number
12
+ `parentId` | string
13
13
 
14
14
  ## Example
15
15