@emilgroup/payment-sdk-node 1.23.1-beta.34 → 1.23.1-beta.36

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 (32) hide show
  1. package/.openapi-generator/FILES +7 -0
  2. package/README.md +2 -2
  3. package/api/payment-receipts-api.ts +680 -0
  4. package/api.ts +2 -0
  5. package/dist/api/payment-receipts-api.d.ts +383 -0
  6. package/dist/api/payment-receipts-api.js +641 -0
  7. package/dist/api.d.ts +1 -0
  8. package/dist/api.js +1 -0
  9. package/dist/models/create-payment-receipt-request-dto.d.ts +54 -0
  10. package/dist/models/create-payment-receipt-request-dto.js +15 -0
  11. package/dist/models/create-payment-receipt-response-class.d.ts +25 -0
  12. package/dist/models/create-payment-receipt-response-class.js +15 -0
  13. package/dist/models/get-payment-receipt-response-class.d.ts +25 -0
  14. package/dist/models/get-payment-receipt-response-class.js +15 -0
  15. package/dist/models/index.d.ts +6 -0
  16. package/dist/models/index.js +6 -0
  17. package/dist/models/list-payment-receipts-response-class.d.ts +43 -0
  18. package/dist/models/list-payment-receipts-response-class.js +15 -0
  19. package/dist/models/payment-receipt-class.d.ts +90 -0
  20. package/dist/models/payment-receipt-class.js +15 -0
  21. package/dist/models/payment-request-class.d.ts +7 -0
  22. package/dist/models/update-payment-receipt-response-class.d.ts +25 -0
  23. package/dist/models/update-payment-receipt-response-class.js +15 -0
  24. package/models/create-payment-receipt-request-dto.ts +60 -0
  25. package/models/create-payment-receipt-response-class.ts +31 -0
  26. package/models/get-payment-receipt-response-class.ts +31 -0
  27. package/models/index.ts +6 -0
  28. package/models/list-payment-receipts-response-class.ts +49 -0
  29. package/models/payment-receipt-class.ts +96 -0
  30. package/models/payment-request-class.ts +7 -0
  31. package/models/update-payment-receipt-response-class.ts +31 -0
  32. package/package.json +1 -1
@@ -0,0 +1,680 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Emil Payment Service
5
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
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 { CreatePaymentReceiptRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreatePaymentReceiptResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { GetPaymentReceiptResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { ListPaymentReceiptsResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { UpdatePaymentReceiptResponseClass } from '../models';
33
+ // URLSearchParams not necessarily used
34
+ // @ts-ignore
35
+ import { URL, URLSearchParams } from 'url';
36
+ const FormData = require('form-data');
37
+ /**
38
+ * PaymentReceiptsApi - axios parameter creator
39
+ * @export
40
+ */
41
+ export const PaymentReceiptsApiAxiosParamCreator = function (configuration?: Configuration) {
42
+ return {
43
+ /**
44
+ * This will create payment receipt. **Required Permissions** \"payment-management.payments.create\"
45
+ * @summary Create the payment receipt
46
+ * @param {CreatePaymentReceiptRequestDto} createPaymentReceiptRequestDto
47
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
48
+ * @param {*} [options] Override http request option.
49
+ * @throws {RequiredError}
50
+ */
51
+ createPaymentReceipt: async (createPaymentReceiptRequestDto: CreatePaymentReceiptRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
52
+ // verify required parameter 'createPaymentReceiptRequestDto' is not null or undefined
53
+ assertParamExists('createPaymentReceipt', 'createPaymentReceiptRequestDto', createPaymentReceiptRequestDto)
54
+ const localVarPath = `/paymentservice/v1/paymentreceipts`;
55
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
56
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
57
+ let baseOptions;
58
+ let baseAccessToken;
59
+ if (configuration) {
60
+ baseOptions = configuration.baseOptions;
61
+ baseAccessToken = configuration.accessToken;
62
+ }
63
+
64
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
65
+ const localVarHeaderParameter = {} as any;
66
+ const localVarQueryParameter = {} as any;
67
+
68
+ // authentication bearer required
69
+ // http bearer authentication required
70
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
71
+
72
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
73
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
74
+ }
75
+
76
+
77
+
78
+ localVarHeaderParameter['Content-Type'] = 'application/json';
79
+
80
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
81
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
82
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
83
+ localVarRequestOptions.data = serializeDataIfNeeded(createPaymentReceiptRequestDto, localVarRequestOptions, configuration)
84
+
85
+ return {
86
+ url: toPathString(localVarUrlObj),
87
+ options: localVarRequestOptions,
88
+ };
89
+ },
90
+ /**
91
+ * This will delete payment receipt. **Required Permissions** \"payment-management.payments.delete\"
92
+ * @summary Delete the payment receipt
93
+ * @param {string} code Unique identifier for the object.
94
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
95
+ * @param {*} [options] Override http request option.
96
+ * @throws {RequiredError}
97
+ */
98
+ deletePaymentReceipt: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
99
+ // verify required parameter 'code' is not null or undefined
100
+ assertParamExists('deletePaymentReceipt', 'code', code)
101
+ const localVarPath = `/paymentservice/v1/paymentreceipts/{code}`
102
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
103
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
104
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
105
+ let baseOptions;
106
+ let baseAccessToken;
107
+ if (configuration) {
108
+ baseOptions = configuration.baseOptions;
109
+ baseAccessToken = configuration.accessToken;
110
+ }
111
+
112
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
113
+ const localVarHeaderParameter = {} as any;
114
+ const localVarQueryParameter = {} as any;
115
+
116
+ // authentication bearer required
117
+ // http bearer authentication required
118
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
119
+
120
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
121
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
122
+ }
123
+
124
+
125
+
126
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
127
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
128
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
129
+
130
+ return {
131
+ url: toPathString(localVarUrlObj),
132
+ options: localVarRequestOptions,
133
+ };
134
+ },
135
+ /**
136
+ * This will get payment receipt. **Required Permissions** \"payment-management.payments.view\"
137
+ * @summary Retrieve the payment receipt
138
+ * @param {string} code
139
+ * @param {string} expand
140
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
141
+ * @param {*} [options] Override http request option.
142
+ * @throws {RequiredError}
143
+ */
144
+ getPaymentReceipt: async (code: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
145
+ // verify required parameter 'code' is not null or undefined
146
+ assertParamExists('getPaymentReceipt', 'code', code)
147
+ // verify required parameter 'expand' is not null or undefined
148
+ assertParamExists('getPaymentReceipt', 'expand', expand)
149
+ const localVarPath = `/paymentservice/v1/paymentreceipts/{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
+ * Retrieves a list of paymentreceipts. **Required Permissions** \"payment-management.payments.view\"
189
+ * @summary List payment receipts
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, createdAt, psp, direction, paymentRequestCode, amount&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, amount, paymentRequestCode&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: id, createdAt, amount&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;
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, createdAt, psp, direction, paymentRequestCode, amount&lt;/i&gt;
198
+ * @param {*} [options] Override http request option.
199
+ * @throws {RequiredError}
200
+ */
201
+ listPaymentReceipts: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
202
+ const localVarPath = `/paymentservice/v1/paymentreceipts`;
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 payment receipt. **Required Permissions** \"payment-management.payments.update\"
265
+ * @summary Update the payment receipt
266
+ * @param {string} code
267
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
268
+ * @param {*} [options] Override http request option.
269
+ * @throws {RequiredError}
270
+ */
271
+ updatePaymentReceipt: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
272
+ // verify required parameter 'code' is not null or undefined
273
+ assertParamExists('updatePaymentReceipt', 'code', code)
274
+ const localVarPath = `/paymentservice/v1/paymentreceipts/{code}`
275
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
276
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
277
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
278
+ let baseOptions;
279
+ let baseAccessToken;
280
+ if (configuration) {
281
+ baseOptions = configuration.baseOptions;
282
+ baseAccessToken = configuration.accessToken;
283
+ }
284
+
285
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
286
+ const localVarHeaderParameter = {} as any;
287
+ const localVarQueryParameter = {} as any;
288
+
289
+ // authentication bearer required
290
+ // http bearer authentication required
291
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
292
+
293
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
294
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
295
+ }
296
+
297
+
298
+
299
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
300
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
301
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
302
+
303
+ return {
304
+ url: toPathString(localVarUrlObj),
305
+ options: localVarRequestOptions,
306
+ };
307
+ },
308
+ }
309
+ };
310
+
311
+ /**
312
+ * PaymentReceiptsApi - functional programming interface
313
+ * @export
314
+ */
315
+ export const PaymentReceiptsApiFp = function(configuration?: Configuration) {
316
+ const localVarAxiosParamCreator = PaymentReceiptsApiAxiosParamCreator(configuration)
317
+ return {
318
+ /**
319
+ * This will create payment receipt. **Required Permissions** \"payment-management.payments.create\"
320
+ * @summary Create the payment receipt
321
+ * @param {CreatePaymentReceiptRequestDto} createPaymentReceiptRequestDto
322
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
323
+ * @param {*} [options] Override http request option.
324
+ * @throws {RequiredError}
325
+ */
326
+ async createPaymentReceipt(createPaymentReceiptRequestDto: CreatePaymentReceiptRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePaymentReceiptResponseClass>> {
327
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createPaymentReceipt(createPaymentReceiptRequestDto, authorization, options);
328
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
329
+ },
330
+ /**
331
+ * This will delete payment receipt. **Required Permissions** \"payment-management.payments.delete\"
332
+ * @summary Delete the payment receipt
333
+ * @param {string} code Unique identifier for the object.
334
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
335
+ * @param {*} [options] Override http request option.
336
+ * @throws {RequiredError}
337
+ */
338
+ async deletePaymentReceipt(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
339
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deletePaymentReceipt(code, authorization, options);
340
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
341
+ },
342
+ /**
343
+ * This will get payment receipt. **Required Permissions** \"payment-management.payments.view\"
344
+ * @summary Retrieve the payment receipt
345
+ * @param {string} code
346
+ * @param {string} expand
347
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
348
+ * @param {*} [options] Override http request option.
349
+ * @throws {RequiredError}
350
+ */
351
+ async getPaymentReceipt(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPaymentReceiptResponseClass>> {
352
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPaymentReceipt(code, expand, authorization, options);
353
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
354
+ },
355
+ /**
356
+ * Retrieves a list of paymentreceipts. **Required Permissions** \"payment-management.payments.view\"
357
+ * @summary List payment receipts
358
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
359
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
360
+ * @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.
361
+ * @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, createdAt, psp, direction, paymentRequestCode, amount&lt;/i&gt;
362
+ * @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, amount, paymentRequestCode&lt;/i&gt;
363
+ * @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: id, createdAt, amount&lt;/i&gt;
364
+ * @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;
365
+ * @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, createdAt, psp, direction, paymentRequestCode, amount&lt;/i&gt;
366
+ * @param {*} [options] Override http request option.
367
+ * @throws {RequiredError}
368
+ */
369
+ async listPaymentReceipts(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPaymentReceiptsResponseClass>> {
370
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPaymentReceipts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
371
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
372
+ },
373
+ /**
374
+ * This will update payment receipt. **Required Permissions** \"payment-management.payments.update\"
375
+ * @summary Update the payment receipt
376
+ * @param {string} code
377
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
378
+ * @param {*} [options] Override http request option.
379
+ * @throws {RequiredError}
380
+ */
381
+ async updatePaymentReceipt(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdatePaymentReceiptResponseClass>> {
382
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updatePaymentReceipt(code, authorization, options);
383
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
384
+ },
385
+ }
386
+ };
387
+
388
+ /**
389
+ * PaymentReceiptsApi - factory interface
390
+ * @export
391
+ */
392
+ export const PaymentReceiptsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
393
+ const localVarFp = PaymentReceiptsApiFp(configuration)
394
+ return {
395
+ /**
396
+ * This will create payment receipt. **Required Permissions** \"payment-management.payments.create\"
397
+ * @summary Create the payment receipt
398
+ * @param {CreatePaymentReceiptRequestDto} createPaymentReceiptRequestDto
399
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
400
+ * @param {*} [options] Override http request option.
401
+ * @throws {RequiredError}
402
+ */
403
+ createPaymentReceipt(createPaymentReceiptRequestDto: CreatePaymentReceiptRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePaymentReceiptResponseClass> {
404
+ return localVarFp.createPaymentReceipt(createPaymentReceiptRequestDto, authorization, options).then((request) => request(axios, basePath));
405
+ },
406
+ /**
407
+ * This will delete payment receipt. **Required Permissions** \"payment-management.payments.delete\"
408
+ * @summary Delete the payment receipt
409
+ * @param {string} code Unique identifier for the object.
410
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
411
+ * @param {*} [options] Override http request option.
412
+ * @throws {RequiredError}
413
+ */
414
+ deletePaymentReceipt(code: string, authorization?: string, options?: any): AxiosPromise<void> {
415
+ return localVarFp.deletePaymentReceipt(code, authorization, options).then((request) => request(axios, basePath));
416
+ },
417
+ /**
418
+ * This will get payment receipt. **Required Permissions** \"payment-management.payments.view\"
419
+ * @summary Retrieve the payment receipt
420
+ * @param {string} code
421
+ * @param {string} expand
422
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
423
+ * @param {*} [options] Override http request option.
424
+ * @throws {RequiredError}
425
+ */
426
+ getPaymentReceipt(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetPaymentReceiptResponseClass> {
427
+ return localVarFp.getPaymentReceipt(code, expand, authorization, options).then((request) => request(axios, basePath));
428
+ },
429
+ /**
430
+ * Retrieves a list of paymentreceipts. **Required Permissions** \"payment-management.payments.view\"
431
+ * @summary List payment receipts
432
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
433
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
434
+ * @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.
435
+ * @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, createdAt, psp, direction, paymentRequestCode, amount&lt;/i&gt;
436
+ * @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, amount, paymentRequestCode&lt;/i&gt;
437
+ * @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: id, createdAt, amount&lt;/i&gt;
438
+ * @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;
439
+ * @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, createdAt, psp, direction, paymentRequestCode, amount&lt;/i&gt;
440
+ * @param {*} [options] Override http request option.
441
+ * @throws {RequiredError}
442
+ */
443
+ listPaymentReceipts(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPaymentReceiptsResponseClass> {
444
+ return localVarFp.listPaymentReceipts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
445
+ },
446
+ /**
447
+ * This will update payment receipt. **Required Permissions** \"payment-management.payments.update\"
448
+ * @summary Update the payment receipt
449
+ * @param {string} code
450
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
451
+ * @param {*} [options] Override http request option.
452
+ * @throws {RequiredError}
453
+ */
454
+ updatePaymentReceipt(code: string, authorization?: string, options?: any): AxiosPromise<UpdatePaymentReceiptResponseClass> {
455
+ return localVarFp.updatePaymentReceipt(code, authorization, options).then((request) => request(axios, basePath));
456
+ },
457
+ };
458
+ };
459
+
460
+ /**
461
+ * Request parameters for createPaymentReceipt operation in PaymentReceiptsApi.
462
+ * @export
463
+ * @interface PaymentReceiptsApiCreatePaymentReceiptRequest
464
+ */
465
+ export interface PaymentReceiptsApiCreatePaymentReceiptRequest {
466
+ /**
467
+ *
468
+ * @type {CreatePaymentReceiptRequestDto}
469
+ * @memberof PaymentReceiptsApiCreatePaymentReceipt
470
+ */
471
+ readonly createPaymentReceiptRequestDto: CreatePaymentReceiptRequestDto
472
+
473
+ /**
474
+ * Bearer Token: provided by the login endpoint under the name accessToken.
475
+ * @type {string}
476
+ * @memberof PaymentReceiptsApiCreatePaymentReceipt
477
+ */
478
+ readonly authorization?: string
479
+ }
480
+
481
+ /**
482
+ * Request parameters for deletePaymentReceipt operation in PaymentReceiptsApi.
483
+ * @export
484
+ * @interface PaymentReceiptsApiDeletePaymentReceiptRequest
485
+ */
486
+ export interface PaymentReceiptsApiDeletePaymentReceiptRequest {
487
+ /**
488
+ * Unique identifier for the object.
489
+ * @type {string}
490
+ * @memberof PaymentReceiptsApiDeletePaymentReceipt
491
+ */
492
+ readonly code: string
493
+
494
+ /**
495
+ * Bearer Token: provided by the login endpoint under the name accessToken.
496
+ * @type {string}
497
+ * @memberof PaymentReceiptsApiDeletePaymentReceipt
498
+ */
499
+ readonly authorization?: string
500
+ }
501
+
502
+ /**
503
+ * Request parameters for getPaymentReceipt operation in PaymentReceiptsApi.
504
+ * @export
505
+ * @interface PaymentReceiptsApiGetPaymentReceiptRequest
506
+ */
507
+ export interface PaymentReceiptsApiGetPaymentReceiptRequest {
508
+ /**
509
+ *
510
+ * @type {string}
511
+ * @memberof PaymentReceiptsApiGetPaymentReceipt
512
+ */
513
+ readonly code: string
514
+
515
+ /**
516
+ *
517
+ * @type {string}
518
+ * @memberof PaymentReceiptsApiGetPaymentReceipt
519
+ */
520
+ readonly expand: string
521
+
522
+ /**
523
+ * Bearer Token: provided by the login endpoint under the name accessToken.
524
+ * @type {string}
525
+ * @memberof PaymentReceiptsApiGetPaymentReceipt
526
+ */
527
+ readonly authorization?: string
528
+ }
529
+
530
+ /**
531
+ * Request parameters for listPaymentReceipts operation in PaymentReceiptsApi.
532
+ * @export
533
+ * @interface PaymentReceiptsApiListPaymentReceiptsRequest
534
+ */
535
+ export interface PaymentReceiptsApiListPaymentReceiptsRequest {
536
+ /**
537
+ * Bearer Token: provided by the login endpoint under the name accessToken.
538
+ * @type {string}
539
+ * @memberof PaymentReceiptsApiListPaymentReceipts
540
+ */
541
+ readonly authorization?: string
542
+
543
+ /**
544
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
545
+ * @type {number}
546
+ * @memberof PaymentReceiptsApiListPaymentReceipts
547
+ */
548
+ readonly pageSize?: number
549
+
550
+ /**
551
+ * 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.
552
+ * @type {string}
553
+ * @memberof PaymentReceiptsApiListPaymentReceipts
554
+ */
555
+ readonly pageToken?: string
556
+
557
+ /**
558
+ * 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, createdAt, psp, direction, paymentRequestCode, amount&lt;/i&gt;
559
+ * @type {string}
560
+ * @memberof PaymentReceiptsApiListPaymentReceipts
561
+ */
562
+ readonly filter?: string
563
+
564
+ /**
565
+ * 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, amount, paymentRequestCode&lt;/i&gt;
566
+ * @type {string}
567
+ * @memberof PaymentReceiptsApiListPaymentReceipts
568
+ */
569
+ readonly search?: string
570
+
571
+ /**
572
+ * 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: id, createdAt, amount&lt;/i&gt;
573
+ * @type {string}
574
+ * @memberof PaymentReceiptsApiListPaymentReceipts
575
+ */
576
+ readonly order?: string
577
+
578
+ /**
579
+ * 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;
580
+ * @type {string}
581
+ * @memberof PaymentReceiptsApiListPaymentReceipts
582
+ */
583
+ readonly expand?: string
584
+
585
+ /**
586
+ * 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, createdAt, psp, direction, paymentRequestCode, amount&lt;/i&gt;
587
+ * @type {string}
588
+ * @memberof PaymentReceiptsApiListPaymentReceipts
589
+ */
590
+ readonly filters?: string
591
+ }
592
+
593
+ /**
594
+ * Request parameters for updatePaymentReceipt operation in PaymentReceiptsApi.
595
+ * @export
596
+ * @interface PaymentReceiptsApiUpdatePaymentReceiptRequest
597
+ */
598
+ export interface PaymentReceiptsApiUpdatePaymentReceiptRequest {
599
+ /**
600
+ *
601
+ * @type {string}
602
+ * @memberof PaymentReceiptsApiUpdatePaymentReceipt
603
+ */
604
+ readonly code: string
605
+
606
+ /**
607
+ * Bearer Token: provided by the login endpoint under the name accessToken.
608
+ * @type {string}
609
+ * @memberof PaymentReceiptsApiUpdatePaymentReceipt
610
+ */
611
+ readonly authorization?: string
612
+ }
613
+
614
+ /**
615
+ * PaymentReceiptsApi - object-oriented interface
616
+ * @export
617
+ * @class PaymentReceiptsApi
618
+ * @extends {BaseAPI}
619
+ */
620
+ export class PaymentReceiptsApi extends BaseAPI {
621
+ /**
622
+ * This will create payment receipt. **Required Permissions** \"payment-management.payments.create\"
623
+ * @summary Create the payment receipt
624
+ * @param {PaymentReceiptsApiCreatePaymentReceiptRequest} requestParameters Request parameters.
625
+ * @param {*} [options] Override http request option.
626
+ * @throws {RequiredError}
627
+ * @memberof PaymentReceiptsApi
628
+ */
629
+ public createPaymentReceipt(requestParameters: PaymentReceiptsApiCreatePaymentReceiptRequest, options?: AxiosRequestConfig) {
630
+ return PaymentReceiptsApiFp(this.configuration).createPaymentReceipt(requestParameters.createPaymentReceiptRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
631
+ }
632
+
633
+ /**
634
+ * This will delete payment receipt. **Required Permissions** \"payment-management.payments.delete\"
635
+ * @summary Delete the payment receipt
636
+ * @param {PaymentReceiptsApiDeletePaymentReceiptRequest} requestParameters Request parameters.
637
+ * @param {*} [options] Override http request option.
638
+ * @throws {RequiredError}
639
+ * @memberof PaymentReceiptsApi
640
+ */
641
+ public deletePaymentReceipt(requestParameters: PaymentReceiptsApiDeletePaymentReceiptRequest, options?: AxiosRequestConfig) {
642
+ return PaymentReceiptsApiFp(this.configuration).deletePaymentReceipt(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
643
+ }
644
+
645
+ /**
646
+ * This will get payment receipt. **Required Permissions** \"payment-management.payments.view\"
647
+ * @summary Retrieve the payment receipt
648
+ * @param {PaymentReceiptsApiGetPaymentReceiptRequest} requestParameters Request parameters.
649
+ * @param {*} [options] Override http request option.
650
+ * @throws {RequiredError}
651
+ * @memberof PaymentReceiptsApi
652
+ */
653
+ public getPaymentReceipt(requestParameters: PaymentReceiptsApiGetPaymentReceiptRequest, options?: AxiosRequestConfig) {
654
+ return PaymentReceiptsApiFp(this.configuration).getPaymentReceipt(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
655
+ }
656
+
657
+ /**
658
+ * Retrieves a list of paymentreceipts. **Required Permissions** \"payment-management.payments.view\"
659
+ * @summary List payment receipts
660
+ * @param {PaymentReceiptsApiListPaymentReceiptsRequest} requestParameters Request parameters.
661
+ * @param {*} [options] Override http request option.
662
+ * @throws {RequiredError}
663
+ * @memberof PaymentReceiptsApi
664
+ */
665
+ public listPaymentReceipts(requestParameters: PaymentReceiptsApiListPaymentReceiptsRequest = {}, options?: AxiosRequestConfig) {
666
+ return PaymentReceiptsApiFp(this.configuration).listPaymentReceipts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
667
+ }
668
+
669
+ /**
670
+ * This will update payment receipt. **Required Permissions** \"payment-management.payments.update\"
671
+ * @summary Update the payment receipt
672
+ * @param {PaymentReceiptsApiUpdatePaymentReceiptRequest} requestParameters Request parameters.
673
+ * @param {*} [options] Override http request option.
674
+ * @throws {RequiredError}
675
+ * @memberof PaymentReceiptsApi
676
+ */
677
+ public updatePaymentReceipt(requestParameters: PaymentReceiptsApiUpdatePaymentReceiptRequest, options?: AxiosRequestConfig) {
678
+ return PaymentReceiptsApiFp(this.configuration).updatePaymentReceipt(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
679
+ }
680
+ }