@emilgroup/discount-sdk-node 1.1.1-beta.1

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 (148) hide show
  1. package/.openapi-generator/FILES +54 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +84 -0
  5. package/api/campaigns-api.ts +1437 -0
  6. package/api/default-api.ts +128 -0
  7. package/api/policy-vouchers-api.ts +1042 -0
  8. package/api/vouchers-api.ts +695 -0
  9. package/api.ts +37 -0
  10. package/base.ts +286 -0
  11. package/common.ts +199 -0
  12. package/configuration.ts +118 -0
  13. package/dist/api/campaigns-api.d.ts +808 -0
  14. package/dist/api/campaigns-api.js +1308 -0
  15. package/dist/api/default-api.d.ts +70 -0
  16. package/dist/api/default-api.js +217 -0
  17. package/dist/api/policy-vouchers-api.d.ts +582 -0
  18. package/dist/api/policy-vouchers-api.js +978 -0
  19. package/dist/api/vouchers-api.d.ts +393 -0
  20. package/dist/api/vouchers-api.js +675 -0
  21. package/dist/api.d.ts +15 -0
  22. package/dist/api.js +33 -0
  23. package/dist/base.d.ts +79 -0
  24. package/dist/base.js +405 -0
  25. package/dist/common.d.ts +92 -0
  26. package/dist/common.js +277 -0
  27. package/dist/configuration.d.ts +96 -0
  28. package/dist/configuration.js +52 -0
  29. package/dist/index.d.ts +15 -0
  30. package/dist/index.js +36 -0
  31. package/dist/models/campaign-class.d.ts +105 -0
  32. package/dist/models/campaign-class.js +24 -0
  33. package/dist/models/charge-policy-voucher-request-dto.d.ts +48 -0
  34. package/dist/models/charge-policy-voucher-request-dto.js +15 -0
  35. package/dist/models/charge-policy-voucher-response-class.d.ts +90 -0
  36. package/dist/models/charge-policy-voucher-response-class.js +21 -0
  37. package/dist/models/check-account-eligibility-request-dto.d.ts +48 -0
  38. package/dist/models/check-account-eligibility-request-dto.js +15 -0
  39. package/dist/models/check-account-eligibility-response-class.d.ts +57 -0
  40. package/dist/models/check-account-eligibility-response-class.js +24 -0
  41. package/dist/models/create-campaign-request-dto.d.ts +42 -0
  42. package/dist/models/create-campaign-request-dto.js +15 -0
  43. package/dist/models/create-campaign-response-class.d.ts +25 -0
  44. package/dist/models/create-campaign-response-class.js +15 -0
  45. package/dist/models/create-eligible-account-request-dto.d.ts +30 -0
  46. package/dist/models/create-eligible-account-request-dto.js +15 -0
  47. package/dist/models/create-eligible-account-response-class.d.ts +25 -0
  48. package/dist/models/create-eligible-account-response-class.js +15 -0
  49. package/dist/models/create-policy-voucher-request-dto.d.ts +48 -0
  50. package/dist/models/create-policy-voucher-request-dto.js +15 -0
  51. package/dist/models/create-policy-voucher-response-class.d.ts +25 -0
  52. package/dist/models/create-policy-voucher-response-class.js +15 -0
  53. package/dist/models/create-product-discount-dto.d.ts +48 -0
  54. package/dist/models/create-product-discount-dto.js +15 -0
  55. package/dist/models/create-voucher-request-dto.d.ts +66 -0
  56. package/dist/models/create-voucher-request-dto.js +20 -0
  57. package/dist/models/create-voucher-response-class.d.ts +25 -0
  58. package/dist/models/create-voucher-response-class.js +15 -0
  59. package/dist/models/eligible-account-class.d.ts +78 -0
  60. package/dist/models/eligible-account-class.js +15 -0
  61. package/dist/models/get-campaign-response-class.d.ts +25 -0
  62. package/dist/models/get-campaign-response-class.js +15 -0
  63. package/dist/models/get-policy-voucher-response-class.d.ts +25 -0
  64. package/dist/models/get-policy-voucher-response-class.js +15 -0
  65. package/dist/models/get-voucher-response-class.d.ts +25 -0
  66. package/dist/models/get-voucher-response-class.js +15 -0
  67. package/dist/models/index.d.ts +37 -0
  68. package/dist/models/index.js +53 -0
  69. package/dist/models/inline-response200.d.ts +54 -0
  70. package/dist/models/inline-response200.js +15 -0
  71. package/dist/models/inline-response503.d.ts +54 -0
  72. package/dist/models/inline-response503.js +15 -0
  73. package/dist/models/list-campaigns-response-class.d.ts +43 -0
  74. package/dist/models/list-campaigns-response-class.js +15 -0
  75. package/dist/models/list-eligible-accounts-response-class.d.ts +43 -0
  76. package/dist/models/list-eligible-accounts-response-class.js +15 -0
  77. package/dist/models/list-policy-vouchers-response-class.d.ts +43 -0
  78. package/dist/models/list-policy-vouchers-response-class.js +15 -0
  79. package/dist/models/list-vouchers-response-class.d.ts +43 -0
  80. package/dist/models/list-vouchers-response-class.js +15 -0
  81. package/dist/models/policy-voucher-class.d.ts +159 -0
  82. package/dist/models/policy-voucher-class.js +21 -0
  83. package/dist/models/policy-voucher-transaction-class.d.ts +126 -0
  84. package/dist/models/policy-voucher-transaction-class.js +26 -0
  85. package/dist/models/product-discount-class.d.ts +90 -0
  86. package/dist/models/product-discount-class.js +15 -0
  87. package/dist/models/redeem-policy-voucher-request-dto.d.ts +48 -0
  88. package/dist/models/redeem-policy-voucher-request-dto.js +15 -0
  89. package/dist/models/redeem-policy-voucher-response-class.d.ts +84 -0
  90. package/dist/models/redeem-policy-voucher-response-class.js +21 -0
  91. package/dist/models/update-campaign-request-dto.d.ts +42 -0
  92. package/dist/models/update-campaign-request-dto.js +15 -0
  93. package/dist/models/update-campaign-response-class.d.ts +25 -0
  94. package/dist/models/update-campaign-response-class.js +15 -0
  95. package/dist/models/update-campaign-status-request-dto.d.ts +33 -0
  96. package/dist/models/update-campaign-status-request-dto.js +24 -0
  97. package/dist/models/update-voucher-request-dto.d.ts +60 -0
  98. package/dist/models/update-voucher-request-dto.js +20 -0
  99. package/dist/models/update-voucher-response-class.d.ts +25 -0
  100. package/dist/models/update-voucher-response-class.js +15 -0
  101. package/dist/models/voucher-class.d.ts +127 -0
  102. package/dist/models/voucher-class.js +20 -0
  103. package/dist/models/withdraw-policy-voucher-request-dto.d.ts +36 -0
  104. package/dist/models/withdraw-policy-voucher-request-dto.js +15 -0
  105. package/dist/models/withdraw-policy-voucher-response-class.d.ts +78 -0
  106. package/dist/models/withdraw-policy-voucher-response-class.js +21 -0
  107. package/git_push.sh +57 -0
  108. package/index.ts +19 -0
  109. package/models/campaign-class.ts +114 -0
  110. package/models/charge-policy-voucher-request-dto.ts +54 -0
  111. package/models/charge-policy-voucher-response-class.ts +99 -0
  112. package/models/check-account-eligibility-request-dto.ts +54 -0
  113. package/models/check-account-eligibility-response-class.ts +66 -0
  114. package/models/create-campaign-request-dto.ts +48 -0
  115. package/models/create-campaign-response-class.ts +31 -0
  116. package/models/create-eligible-account-request-dto.ts +36 -0
  117. package/models/create-eligible-account-response-class.ts +31 -0
  118. package/models/create-policy-voucher-request-dto.ts +54 -0
  119. package/models/create-policy-voucher-response-class.ts +31 -0
  120. package/models/create-product-discount-dto.ts +54 -0
  121. package/models/create-voucher-request-dto.ts +75 -0
  122. package/models/create-voucher-response-class.ts +31 -0
  123. package/models/eligible-account-class.ts +84 -0
  124. package/models/get-campaign-response-class.ts +31 -0
  125. package/models/get-policy-voucher-response-class.ts +31 -0
  126. package/models/get-voucher-response-class.ts +31 -0
  127. package/models/index.ts +37 -0
  128. package/models/inline-response200.ts +48 -0
  129. package/models/inline-response503.ts +48 -0
  130. package/models/list-campaigns-response-class.ts +49 -0
  131. package/models/list-eligible-accounts-response-class.ts +49 -0
  132. package/models/list-policy-vouchers-response-class.ts +49 -0
  133. package/models/list-vouchers-response-class.ts +49 -0
  134. package/models/policy-voucher-class.ts +168 -0
  135. package/models/policy-voucher-transaction-class.ts +136 -0
  136. package/models/product-discount-class.ts +96 -0
  137. package/models/redeem-policy-voucher-request-dto.ts +54 -0
  138. package/models/redeem-policy-voucher-response-class.ts +93 -0
  139. package/models/update-campaign-request-dto.ts +48 -0
  140. package/models/update-campaign-response-class.ts +31 -0
  141. package/models/update-campaign-status-request-dto.ts +42 -0
  142. package/models/update-voucher-request-dto.ts +69 -0
  143. package/models/update-voucher-response-class.ts +31 -0
  144. package/models/voucher-class.ts +136 -0
  145. package/models/withdraw-policy-voucher-request-dto.ts +42 -0
  146. package/models/withdraw-policy-voucher-response-class.ts +87 -0
  147. package/package.json +29 -0
  148. package/tsconfig.json +23 -0
@@ -0,0 +1,695 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL DiscountService
5
+ * The EMIL DiscountService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
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 globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { CreateVoucherRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateVoucherResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { GetVoucherResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { ListVouchersResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { UpdateVoucherRequestDto } from '../models';
33
+ // @ts-ignore
34
+ import { UpdateVoucherResponseClass } from '../models';
35
+ // URLSearchParams not necessarily used
36
+ // @ts-ignore
37
+ import { URL, URLSearchParams } from 'url';
38
+ const FormData = require('form-data');
39
+ /**
40
+ * VouchersApi - axios parameter creator
41
+ * @export
42
+ */
43
+ export const VouchersApiAxiosParamCreator = function (configuration?: Configuration) {
44
+ return {
45
+ /**
46
+ * This will create a voucher.
47
+ * @summary Create the Voucher
48
+ * @param {CreateVoucherRequestDto} createVoucherRequestDto
49
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
50
+ * @param {*} [options] Override http request option.
51
+ * @throws {RequiredError}
52
+ */
53
+ createVoucher: async (createVoucherRequestDto: CreateVoucherRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
54
+ // verify required parameter 'createVoucherRequestDto' is not null or undefined
55
+ assertParamExists('createVoucher', 'createVoucherRequestDto', createVoucherRequestDto)
56
+ const localVarPath = `/discountservice/v1/vouchers`;
57
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
58
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
59
+ let baseOptions;
60
+ let baseAccessToken;
61
+ if (configuration) {
62
+ baseOptions = configuration.baseOptions;
63
+ baseAccessToken = configuration.accessToken;
64
+ }
65
+
66
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
67
+ const localVarHeaderParameter = {} as any;
68
+ const localVarQueryParameter = {} as any;
69
+
70
+ // authentication bearer required
71
+ // http bearer authentication required
72
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
73
+
74
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
75
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
76
+ }
77
+
78
+
79
+
80
+ localVarHeaderParameter['Content-Type'] = 'application/json';
81
+
82
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
83
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
84
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
85
+ localVarRequestOptions.data = serializeDataIfNeeded(createVoucherRequestDto, localVarRequestOptions, configuration)
86
+
87
+ return {
88
+ url: toPathString(localVarUrlObj),
89
+ options: localVarRequestOptions,
90
+ };
91
+ },
92
+ /**
93
+ * This will delete a voucher.
94
+ * @summary Delete the Voucher
95
+ * @param {string} code Unique identifier for the object.
96
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ deleteVoucher: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
101
+ // verify required parameter 'code' is not null or undefined
102
+ assertParamExists('deleteVoucher', 'code', code)
103
+ const localVarPath = `/discountservice/v1/vouchers/{code}`
104
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
105
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
106
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
107
+ let baseOptions;
108
+ let baseAccessToken;
109
+ if (configuration) {
110
+ baseOptions = configuration.baseOptions;
111
+ baseAccessToken = configuration.accessToken;
112
+ }
113
+
114
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
115
+ const localVarHeaderParameter = {} as any;
116
+ const localVarQueryParameter = {} as any;
117
+
118
+ // authentication bearer required
119
+ // http bearer authentication required
120
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
121
+
122
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
123
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
124
+ }
125
+
126
+
127
+
128
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
129
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
130
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
131
+
132
+ return {
133
+ url: toPathString(localVarUrlObj),
134
+ options: localVarRequestOptions,
135
+ };
136
+ },
137
+ /**
138
+ * This will get a voucher.
139
+ * @summary Retrieve the Voucher
140
+ * @param {string} code Unique identifier for the object.
141
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
142
+ * @param {'campaign' | 'productDiscounts'} [expand] You can expand voucher in this endpoint.
143
+ * @param {*} [options] Override http request option.
144
+ * @throws {RequiredError}
145
+ */
146
+ getVoucher: async (code: string, authorization?: string, expand?: 'campaign' | 'productDiscounts', options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
147
+ // verify required parameter 'code' is not null or undefined
148
+ assertParamExists('getVoucher', 'code', code)
149
+ const localVarPath = `/discountservice/v1/vouchers/{code}`
150
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
151
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
152
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
153
+ let baseOptions;
154
+ let baseAccessToken;
155
+ if (configuration) {
156
+ baseOptions = configuration.baseOptions;
157
+ baseAccessToken = configuration.accessToken;
158
+ }
159
+
160
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
161
+ const localVarHeaderParameter = {} as any;
162
+ const localVarQueryParameter = {} as any;
163
+
164
+ // authentication bearer required
165
+ // http bearer authentication required
166
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
167
+
168
+ if (expand !== undefined) {
169
+ localVarQueryParameter['expand'] = expand;
170
+ }
171
+
172
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
173
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
174
+ }
175
+
176
+
177
+
178
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
179
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
180
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
181
+
182
+ return {
183
+ url: toPathString(localVarUrlObj),
184
+ options: localVarRequestOptions,
185
+ };
186
+ },
187
+ /**
188
+ * Returns a list of Vouchers you have previously created. The Vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
189
+ * @summary List Vouchers
190
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
191
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
192
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
193
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, voucherCode, campaignId, discountType, createdAt, discountValue, discountPeriodMonths, productDiscounts.productSlug&lt;/i&gt;
194
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, voucherCode, productSlugsList&lt;/i&gt;
195
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, voucherCode, campaignId, discountPeriodMonths, discountType, discountValue, createdAt&lt;/i&gt;
196
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: campaign, productDiscounts&lt;i&gt;
197
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, voucherCode, campaignId, discountType, createdAt, discountValue, discountPeriodMonths, productDiscounts.productSlug&lt;/i&gt;
198
+ * @param {*} [options] Override http request option.
199
+ * @throws {RequiredError}
200
+ */
201
+ listVouchers: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
202
+ const localVarPath = `/discountservice/v1/vouchers`;
203
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
204
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
205
+ let baseOptions;
206
+ let baseAccessToken;
207
+ if (configuration) {
208
+ baseOptions = configuration.baseOptions;
209
+ baseAccessToken = configuration.accessToken;
210
+ }
211
+
212
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
213
+ const localVarHeaderParameter = {} as any;
214
+ const localVarQueryParameter = {} as any;
215
+
216
+ // authentication bearer required
217
+ // http bearer authentication required
218
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
219
+
220
+ if (pageSize !== undefined) {
221
+ localVarQueryParameter['pageSize'] = pageSize;
222
+ }
223
+
224
+ if (pageToken !== undefined) {
225
+ localVarQueryParameter['pageToken'] = pageToken;
226
+ }
227
+
228
+ if (filter !== undefined) {
229
+ localVarQueryParameter['filter'] = filter;
230
+ }
231
+
232
+ if (search !== undefined) {
233
+ localVarQueryParameter['search'] = search;
234
+ }
235
+
236
+ if (order !== undefined) {
237
+ localVarQueryParameter['order'] = order;
238
+ }
239
+
240
+ if (expand !== undefined) {
241
+ localVarQueryParameter['expand'] = expand;
242
+ }
243
+
244
+ if (filters !== undefined) {
245
+ localVarQueryParameter['filters'] = filters;
246
+ }
247
+
248
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
249
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
250
+ }
251
+
252
+
253
+
254
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
255
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
256
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
257
+
258
+ return {
259
+ url: toPathString(localVarUrlObj),
260
+ options: localVarRequestOptions,
261
+ };
262
+ },
263
+ /**
264
+ * This will update a voucher.
265
+ * @summary Update the Voucher
266
+ * @param {string} code Unique identifier for the object.
267
+ * @param {UpdateVoucherRequestDto} updateVoucherRequestDto
268
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
269
+ * @param {*} [options] Override http request option.
270
+ * @throws {RequiredError}
271
+ */
272
+ updateVoucher: async (code: string, updateVoucherRequestDto: UpdateVoucherRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
273
+ // verify required parameter 'code' is not null or undefined
274
+ assertParamExists('updateVoucher', 'code', code)
275
+ // verify required parameter 'updateVoucherRequestDto' is not null or undefined
276
+ assertParamExists('updateVoucher', 'updateVoucherRequestDto', updateVoucherRequestDto)
277
+ const localVarPath = `/discountservice/v1/vouchers/{code}`
278
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
279
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
280
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
281
+ let baseOptions;
282
+ let baseAccessToken;
283
+ if (configuration) {
284
+ baseOptions = configuration.baseOptions;
285
+ baseAccessToken = configuration.accessToken;
286
+ }
287
+
288
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
289
+ const localVarHeaderParameter = {} as any;
290
+ const localVarQueryParameter = {} as any;
291
+
292
+ // authentication bearer required
293
+ // http bearer authentication required
294
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
295
+
296
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
297
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
298
+ }
299
+
300
+
301
+
302
+ localVarHeaderParameter['Content-Type'] = 'application/json';
303
+
304
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
305
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
306
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
307
+ localVarRequestOptions.data = serializeDataIfNeeded(updateVoucherRequestDto, localVarRequestOptions, configuration)
308
+
309
+ return {
310
+ url: toPathString(localVarUrlObj),
311
+ options: localVarRequestOptions,
312
+ };
313
+ },
314
+ }
315
+ };
316
+
317
+ /**
318
+ * VouchersApi - functional programming interface
319
+ * @export
320
+ */
321
+ export const VouchersApiFp = function(configuration?: Configuration) {
322
+ const localVarAxiosParamCreator = VouchersApiAxiosParamCreator(configuration)
323
+ return {
324
+ /**
325
+ * This will create a voucher.
326
+ * @summary Create the Voucher
327
+ * @param {CreateVoucherRequestDto} createVoucherRequestDto
328
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
329
+ * @param {*} [options] Override http request option.
330
+ * @throws {RequiredError}
331
+ */
332
+ async createVoucher(createVoucherRequestDto: CreateVoucherRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateVoucherResponseClass>> {
333
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createVoucher(createVoucherRequestDto, authorization, options);
334
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
335
+ },
336
+ /**
337
+ * This will delete a voucher.
338
+ * @summary Delete the Voucher
339
+ * @param {string} code Unique identifier for the object.
340
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
341
+ * @param {*} [options] Override http request option.
342
+ * @throws {RequiredError}
343
+ */
344
+ async deleteVoucher(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
345
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteVoucher(code, authorization, options);
346
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
347
+ },
348
+ /**
349
+ * This will get a voucher.
350
+ * @summary Retrieve the Voucher
351
+ * @param {string} code Unique identifier for the object.
352
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
353
+ * @param {'campaign' | 'productDiscounts'} [expand] You can expand voucher in this endpoint.
354
+ * @param {*} [options] Override http request option.
355
+ * @throws {RequiredError}
356
+ */
357
+ async getVoucher(code: string, authorization?: string, expand?: 'campaign' | 'productDiscounts', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetVoucherResponseClass>> {
358
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getVoucher(code, authorization, expand, options);
359
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
360
+ },
361
+ /**
362
+ * Returns a list of Vouchers you have previously created. The Vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
363
+ * @summary List Vouchers
364
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
365
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
366
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
367
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, voucherCode, campaignId, discountType, createdAt, discountValue, discountPeriodMonths, productDiscounts.productSlug&lt;/i&gt;
368
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, voucherCode, productSlugsList&lt;/i&gt;
369
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, voucherCode, campaignId, discountPeriodMonths, discountType, discountValue, createdAt&lt;/i&gt;
370
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: campaign, productDiscounts&lt;i&gt;
371
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, voucherCode, campaignId, discountType, createdAt, discountValue, discountPeriodMonths, productDiscounts.productSlug&lt;/i&gt;
372
+ * @param {*} [options] Override http request option.
373
+ * @throws {RequiredError}
374
+ */
375
+ async listVouchers(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListVouchersResponseClass>> {
376
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listVouchers(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
377
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
378
+ },
379
+ /**
380
+ * This will update a voucher.
381
+ * @summary Update the Voucher
382
+ * @param {string} code Unique identifier for the object.
383
+ * @param {UpdateVoucherRequestDto} updateVoucherRequestDto
384
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
385
+ * @param {*} [options] Override http request option.
386
+ * @throws {RequiredError}
387
+ */
388
+ async updateVoucher(code: string, updateVoucherRequestDto: UpdateVoucherRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateVoucherResponseClass>> {
389
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateVoucher(code, updateVoucherRequestDto, authorization, options);
390
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
391
+ },
392
+ }
393
+ };
394
+
395
+ /**
396
+ * VouchersApi - factory interface
397
+ * @export
398
+ */
399
+ export const VouchersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
400
+ const localVarFp = VouchersApiFp(configuration)
401
+ return {
402
+ /**
403
+ * This will create a voucher.
404
+ * @summary Create the Voucher
405
+ * @param {CreateVoucherRequestDto} createVoucherRequestDto
406
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
407
+ * @param {*} [options] Override http request option.
408
+ * @throws {RequiredError}
409
+ */
410
+ createVoucher(createVoucherRequestDto: CreateVoucherRequestDto, authorization?: string, options?: any): AxiosPromise<CreateVoucherResponseClass> {
411
+ return localVarFp.createVoucher(createVoucherRequestDto, authorization, options).then((request) => request(axios, basePath));
412
+ },
413
+ /**
414
+ * This will delete a voucher.
415
+ * @summary Delete the Voucher
416
+ * @param {string} code Unique identifier for the object.
417
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
418
+ * @param {*} [options] Override http request option.
419
+ * @throws {RequiredError}
420
+ */
421
+ deleteVoucher(code: string, authorization?: string, options?: any): AxiosPromise<void> {
422
+ return localVarFp.deleteVoucher(code, authorization, options).then((request) => request(axios, basePath));
423
+ },
424
+ /**
425
+ * This will get a voucher.
426
+ * @summary Retrieve the Voucher
427
+ * @param {string} code Unique identifier for the object.
428
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
429
+ * @param {'campaign' | 'productDiscounts'} [expand] You can expand voucher in this endpoint.
430
+ * @param {*} [options] Override http request option.
431
+ * @throws {RequiredError}
432
+ */
433
+ getVoucher(code: string, authorization?: string, expand?: 'campaign' | 'productDiscounts', options?: any): AxiosPromise<GetVoucherResponseClass> {
434
+ return localVarFp.getVoucher(code, authorization, expand, options).then((request) => request(axios, basePath));
435
+ },
436
+ /**
437
+ * Returns a list of Vouchers you have previously created. The Vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
438
+ * @summary List Vouchers
439
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
440
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
441
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
442
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, voucherCode, campaignId, discountType, createdAt, discountValue, discountPeriodMonths, productDiscounts.productSlug&lt;/i&gt;
443
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, voucherCode, productSlugsList&lt;/i&gt;
444
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, voucherCode, campaignId, discountPeriodMonths, discountType, discountValue, createdAt&lt;/i&gt;
445
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: campaign, productDiscounts&lt;i&gt;
446
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, voucherCode, campaignId, discountType, createdAt, discountValue, discountPeriodMonths, productDiscounts.productSlug&lt;/i&gt;
447
+ * @param {*} [options] Override http request option.
448
+ * @throws {RequiredError}
449
+ */
450
+ listVouchers(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListVouchersResponseClass> {
451
+ return localVarFp.listVouchers(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
452
+ },
453
+ /**
454
+ * This will update a voucher.
455
+ * @summary Update the Voucher
456
+ * @param {string} code Unique identifier for the object.
457
+ * @param {UpdateVoucherRequestDto} updateVoucherRequestDto
458
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
459
+ * @param {*} [options] Override http request option.
460
+ * @throws {RequiredError}
461
+ */
462
+ updateVoucher(code: string, updateVoucherRequestDto: UpdateVoucherRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateVoucherResponseClass> {
463
+ return localVarFp.updateVoucher(code, updateVoucherRequestDto, authorization, options).then((request) => request(axios, basePath));
464
+ },
465
+ };
466
+ };
467
+
468
+ /**
469
+ * Request parameters for createVoucher operation in VouchersApi.
470
+ * @export
471
+ * @interface VouchersApiCreateVoucherRequest
472
+ */
473
+ export interface VouchersApiCreateVoucherRequest {
474
+ /**
475
+ *
476
+ * @type {CreateVoucherRequestDto}
477
+ * @memberof VouchersApiCreateVoucher
478
+ */
479
+ readonly createVoucherRequestDto: CreateVoucherRequestDto
480
+
481
+ /**
482
+ * Bearer Token: provided by the login endpoint under the name accessToken.
483
+ * @type {string}
484
+ * @memberof VouchersApiCreateVoucher
485
+ */
486
+ readonly authorization?: string
487
+ }
488
+
489
+ /**
490
+ * Request parameters for deleteVoucher operation in VouchersApi.
491
+ * @export
492
+ * @interface VouchersApiDeleteVoucherRequest
493
+ */
494
+ export interface VouchersApiDeleteVoucherRequest {
495
+ /**
496
+ * Unique identifier for the object.
497
+ * @type {string}
498
+ * @memberof VouchersApiDeleteVoucher
499
+ */
500
+ readonly code: string
501
+
502
+ /**
503
+ * Bearer Token: provided by the login endpoint under the name accessToken.
504
+ * @type {string}
505
+ * @memberof VouchersApiDeleteVoucher
506
+ */
507
+ readonly authorization?: string
508
+ }
509
+
510
+ /**
511
+ * Request parameters for getVoucher operation in VouchersApi.
512
+ * @export
513
+ * @interface VouchersApiGetVoucherRequest
514
+ */
515
+ export interface VouchersApiGetVoucherRequest {
516
+ /**
517
+ * Unique identifier for the object.
518
+ * @type {string}
519
+ * @memberof VouchersApiGetVoucher
520
+ */
521
+ readonly code: string
522
+
523
+ /**
524
+ * Bearer Token: provided by the login endpoint under the name accessToken.
525
+ * @type {string}
526
+ * @memberof VouchersApiGetVoucher
527
+ */
528
+ readonly authorization?: string
529
+
530
+ /**
531
+ * You can expand voucher in this endpoint.
532
+ * @type {'campaign' | 'productDiscounts'}
533
+ * @memberof VouchersApiGetVoucher
534
+ */
535
+ readonly expand?: 'campaign' | 'productDiscounts'
536
+ }
537
+
538
+ /**
539
+ * Request parameters for listVouchers operation in VouchersApi.
540
+ * @export
541
+ * @interface VouchersApiListVouchersRequest
542
+ */
543
+ export interface VouchersApiListVouchersRequest {
544
+ /**
545
+ * Bearer Token: provided by the login endpoint under the name accessToken.
546
+ * @type {string}
547
+ * @memberof VouchersApiListVouchers
548
+ */
549
+ readonly authorization?: string
550
+
551
+ /**
552
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
553
+ * @type {number}
554
+ * @memberof VouchersApiListVouchers
555
+ */
556
+ readonly pageSize?: number
557
+
558
+ /**
559
+ * A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
560
+ * @type {string}
561
+ * @memberof VouchersApiListVouchers
562
+ */
563
+ readonly pageToken?: string
564
+
565
+ /**
566
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, voucherCode, campaignId, discountType, createdAt, discountValue, discountPeriodMonths, productDiscounts.productSlug&lt;/i&gt;
567
+ * @type {string}
568
+ * @memberof VouchersApiListVouchers
569
+ */
570
+ readonly filter?: string
571
+
572
+ /**
573
+ * Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, voucherCode, productSlugsList&lt;/i&gt;
574
+ * @type {string}
575
+ * @memberof VouchersApiListVouchers
576
+ */
577
+ readonly search?: string
578
+
579
+ /**
580
+ * Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, voucherCode, campaignId, discountPeriodMonths, discountType, discountValue, createdAt&lt;/i&gt;
581
+ * @type {string}
582
+ * @memberof VouchersApiListVouchers
583
+ */
584
+ readonly order?: string
585
+
586
+ /**
587
+ * Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: campaign, productDiscounts&lt;i&gt;
588
+ * @type {string}
589
+ * @memberof VouchersApiListVouchers
590
+ */
591
+ readonly expand?: string
592
+
593
+ /**
594
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, voucherCode, campaignId, discountType, createdAt, discountValue, discountPeriodMonths, productDiscounts.productSlug&lt;/i&gt;
595
+ * @type {string}
596
+ * @memberof VouchersApiListVouchers
597
+ */
598
+ readonly filters?: string
599
+ }
600
+
601
+ /**
602
+ * Request parameters for updateVoucher operation in VouchersApi.
603
+ * @export
604
+ * @interface VouchersApiUpdateVoucherRequest
605
+ */
606
+ export interface VouchersApiUpdateVoucherRequest {
607
+ /**
608
+ * Unique identifier for the object.
609
+ * @type {string}
610
+ * @memberof VouchersApiUpdateVoucher
611
+ */
612
+ readonly code: string
613
+
614
+ /**
615
+ *
616
+ * @type {UpdateVoucherRequestDto}
617
+ * @memberof VouchersApiUpdateVoucher
618
+ */
619
+ readonly updateVoucherRequestDto: UpdateVoucherRequestDto
620
+
621
+ /**
622
+ * Bearer Token: provided by the login endpoint under the name accessToken.
623
+ * @type {string}
624
+ * @memberof VouchersApiUpdateVoucher
625
+ */
626
+ readonly authorization?: string
627
+ }
628
+
629
+ /**
630
+ * VouchersApi - object-oriented interface
631
+ * @export
632
+ * @class VouchersApi
633
+ * @extends {BaseAPI}
634
+ */
635
+ export class VouchersApi extends BaseAPI {
636
+ /**
637
+ * This will create a voucher.
638
+ * @summary Create the Voucher
639
+ * @param {VouchersApiCreateVoucherRequest} requestParameters Request parameters.
640
+ * @param {*} [options] Override http request option.
641
+ * @throws {RequiredError}
642
+ * @memberof VouchersApi
643
+ */
644
+ public createVoucher(requestParameters: VouchersApiCreateVoucherRequest, options?: AxiosRequestConfig) {
645
+ return VouchersApiFp(this.configuration).createVoucher(requestParameters.createVoucherRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
646
+ }
647
+
648
+ /**
649
+ * This will delete a voucher.
650
+ * @summary Delete the Voucher
651
+ * @param {VouchersApiDeleteVoucherRequest} requestParameters Request parameters.
652
+ * @param {*} [options] Override http request option.
653
+ * @throws {RequiredError}
654
+ * @memberof VouchersApi
655
+ */
656
+ public deleteVoucher(requestParameters: VouchersApiDeleteVoucherRequest, options?: AxiosRequestConfig) {
657
+ return VouchersApiFp(this.configuration).deleteVoucher(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
658
+ }
659
+
660
+ /**
661
+ * This will get a voucher.
662
+ * @summary Retrieve the Voucher
663
+ * @param {VouchersApiGetVoucherRequest} requestParameters Request parameters.
664
+ * @param {*} [options] Override http request option.
665
+ * @throws {RequiredError}
666
+ * @memberof VouchersApi
667
+ */
668
+ public getVoucher(requestParameters: VouchersApiGetVoucherRequest, options?: AxiosRequestConfig) {
669
+ return VouchersApiFp(this.configuration).getVoucher(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
670
+ }
671
+
672
+ /**
673
+ * Returns a list of Vouchers you have previously created. The Vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
674
+ * @summary List Vouchers
675
+ * @param {VouchersApiListVouchersRequest} requestParameters Request parameters.
676
+ * @param {*} [options] Override http request option.
677
+ * @throws {RequiredError}
678
+ * @memberof VouchersApi
679
+ */
680
+ public listVouchers(requestParameters: VouchersApiListVouchersRequest = {}, options?: AxiosRequestConfig) {
681
+ return VouchersApiFp(this.configuration).listVouchers(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
682
+ }
683
+
684
+ /**
685
+ * This will update a voucher.
686
+ * @summary Update the Voucher
687
+ * @param {VouchersApiUpdateVoucherRequest} requestParameters Request parameters.
688
+ * @param {*} [options] Override http request option.
689
+ * @throws {RequiredError}
690
+ * @memberof VouchersApi
691
+ */
692
+ public updateVoucher(requestParameters: VouchersApiUpdateVoucherRequest, options?: AxiosRequestConfig) {
693
+ return VouchersApiFp(this.configuration).updateVoucher(requestParameters.code, requestParameters.updateVoucherRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
694
+ }
695
+ }