@emilgroup/payment-sdk-node 1.23.1-beta.2 → 1.23.1-beta.4

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 (33) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +2 -2
  3. package/api/payment-requests-api.ts +596 -0
  4. package/api.ts +2 -0
  5. package/dist/api/payment-requests-api.d.ts +338 -0
  6. package/dist/api/payment-requests-api.js +556 -0
  7. package/dist/api.d.ts +1 -0
  8. package/dist/api.js +1 -0
  9. package/dist/models/create-payment-request-request-dto.d.ts +72 -0
  10. package/dist/models/create-payment-request-request-dto.js +26 -0
  11. package/dist/models/create-payment-request-response-class.d.ts +25 -0
  12. package/dist/models/create-payment-request-response-class.js +15 -0
  13. package/dist/models/get-payment-request-response-class.d.ts +25 -0
  14. package/dist/models/get-payment-request-response-class.js +15 -0
  15. package/dist/models/index.d.ts +7 -0
  16. package/dist/models/index.js +7 -0
  17. package/dist/models/list-payment-requests-response-class.d.ts +31 -0
  18. package/dist/models/list-payment-requests-response-class.js +15 -0
  19. package/dist/models/payment-request-class.d.ts +111 -0
  20. package/dist/models/payment-request-class.js +34 -0
  21. package/dist/models/update-payment-request-request-dto.d.ts +39 -0
  22. package/dist/models/update-payment-request-request-dto.js +24 -0
  23. package/dist/models/update-payment-request-response-class.d.ts +25 -0
  24. package/dist/models/update-payment-request-response-class.js +15 -0
  25. package/models/create-payment-request-request-dto.ts +82 -0
  26. package/models/create-payment-request-response-class.ts +31 -0
  27. package/models/get-payment-request-response-class.ts +31 -0
  28. package/models/index.ts +7 -0
  29. package/models/list-payment-requests-response-class.ts +37 -0
  30. package/models/payment-request-class.ts +122 -0
  31. package/models/update-payment-request-request-dto.ts +48 -0
  32. package/models/update-payment-request-response-class.ts +31 -0
  33. package/package.json +1 -1
@@ -12,6 +12,7 @@ api/exceeding-credits-api.ts
12
12
  api/health-check-api.ts
13
13
  api/payment-methods-api.ts
14
14
  api/payment-reminders-api.ts
15
+ api/payment-requests-api.ts
15
16
  api/payment-setup-api.ts
16
17
  api/payments-api.ts
17
18
  api/payout-methods-api.ts
@@ -62,6 +63,8 @@ models/create-payment-order-request-dto.ts
62
63
  models/create-payment-reminder-request-dto.ts
63
64
  models/create-payment-reminder-response-class.ts
64
65
  models/create-payment-request-dto.ts
66
+ models/create-payment-request-request-dto.ts
67
+ models/create-payment-request-response-class.ts
65
68
  models/create-payment-response-class.ts
66
69
  models/create-payout-method-request-dto.ts
67
70
  models/create-payout-method-response-class.ts
@@ -89,6 +92,7 @@ models/get-credit-allocation-response-class.ts
89
92
  models/get-exceeding-credit-response-class.ts
90
93
  models/get-payment-method-response-class.ts
91
94
  models/get-payment-reminder-response-class.ts
95
+ models/get-payment-request-response-class.ts
92
96
  models/get-payment-response-class.ts
93
97
  models/get-payout-method-response-class.ts
94
98
  models/get-refund-response-class.ts
@@ -119,6 +123,7 @@ models/list-credit-allocations-response-class.ts
119
123
  models/list-exceeding-credits-response-class.ts
120
124
  models/list-payment-methods-response-class.ts
121
125
  models/list-payment-reminders-response-class.ts
126
+ models/list-payment-requests-response-class.ts
122
127
  models/list-payments-response-class.ts
123
128
  models/list-payout-methods-response-class.ts
124
129
  models/list-policy-payment-methods-response-class.ts
@@ -132,6 +137,7 @@ models/payment-class.ts
132
137
  models/payment-entity.ts
133
138
  models/payment-method-class.ts
134
139
  models/payment-reminder-class.ts
140
+ models/payment-request-class.ts
135
141
  models/payout-method-class.ts
136
142
  models/policy-payment-method-class.ts
137
143
  models/primary-bank-account-response-class.ts
@@ -156,6 +162,8 @@ models/update-bank-order-request-dto.ts
156
162
  models/update-bank-order-response-class.ts
157
163
  models/update-billing-address-request-dto.ts
158
164
  models/update-billing-address-response-class.ts
165
+ models/update-payment-request-request-dto.ts
166
+ models/update-payment-request-response-class.ts
159
167
  models/update-tenant-bank-account-response-class.ts
160
168
  models/update-tenant-bank-account-rest-request-dto.ts
161
169
  models/validate-pspconfig-request-dto.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/payment-sdk-node@1.23.1-beta.2 --save
20
+ npm install @emilgroup/payment-sdk-node@1.23.1-beta.4 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/payment-sdk-node@1.23.1-beta.2
24
+ yarn add @emilgroup/payment-sdk-node@1.23.1-beta.4
25
25
  ```
26
26
 
27
27
  And then you can import `PaymentsApi`.
@@ -0,0 +1,596 @@
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 { CreatePaymentRequestRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreatePaymentRequestResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { GetPaymentRequestResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { ListPaymentRequestsResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { UpdatePaymentRequestRequestDto } from '../models';
33
+ // @ts-ignore
34
+ import { UpdatePaymentRequestResponseClass } from '../models';
35
+ // URLSearchParams not necessarily used
36
+ // @ts-ignore
37
+ import { URL, URLSearchParams } from 'url';
38
+ const FormData = require('form-data');
39
+ /**
40
+ * PaymentRequestsApi - axios parameter creator
41
+ * @export
42
+ */
43
+ export const PaymentRequestsApiAxiosParamCreator = function (configuration?: Configuration) {
44
+ return {
45
+ /**
46
+ * This will create payment request. **Required Permissions** \"payment-management.payments.create\"
47
+ * @summary Create the payment request
48
+ * @param {CreatePaymentRequestRequestDto} createPaymentRequestRequestDto
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
+ createPaymentRequest: async (createPaymentRequestRequestDto: CreatePaymentRequestRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
54
+ // verify required parameter 'createPaymentRequestRequestDto' is not null or undefined
55
+ assertParamExists('createPaymentRequest', 'createPaymentRequestRequestDto', createPaymentRequestRequestDto)
56
+ const localVarPath = `/paymentservice/v1/payment-requests`;
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(createPaymentRequestRequestDto, localVarRequestOptions, configuration)
86
+
87
+ return {
88
+ url: toPathString(localVarUrlObj),
89
+ options: localVarRequestOptions,
90
+ };
91
+ },
92
+ /**
93
+ * This will get payment request. **Required Permissions** \"payment-management.payments.view\"
94
+ * @summary Retrieve the payment request
95
+ * @param {string} code Unique identifier for the object.
96
+ * @param {string} expand
97
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
98
+ * @param {*} [options] Override http request option.
99
+ * @throws {RequiredError}
100
+ */
101
+ getPaymentRequest: async (code: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
102
+ // verify required parameter 'code' is not null or undefined
103
+ assertParamExists('getPaymentRequest', 'code', code)
104
+ // verify required parameter 'expand' is not null or undefined
105
+ assertParamExists('getPaymentRequest', 'expand', expand)
106
+ const localVarPath = `/paymentservice/v1/payment-requests/{code}`
107
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
108
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
109
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
110
+ let baseOptions;
111
+ let baseAccessToken;
112
+ if (configuration) {
113
+ baseOptions = configuration.baseOptions;
114
+ baseAccessToken = configuration.accessToken;
115
+ }
116
+
117
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
118
+ const localVarHeaderParameter = {} as any;
119
+ const localVarQueryParameter = {} as any;
120
+
121
+ // authentication bearer required
122
+ // http bearer authentication required
123
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
124
+
125
+ if (expand !== undefined) {
126
+ localVarQueryParameter['expand'] = expand;
127
+ }
128
+
129
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ }
132
+
133
+
134
+
135
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
136
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
137
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
138
+
139
+ return {
140
+ url: toPathString(localVarUrlObj),
141
+ options: localVarRequestOptions,
142
+ };
143
+ },
144
+ /**
145
+ * Retrieves a list of paymentrequests. **Required Permissions** \"payment-management.payments.view\"
146
+ * @summary List payment requests
147
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
148
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
149
+ * @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.
150
+ * @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, type, status, direction, paymentMethodPsp, paymentMethodType, createdAt&lt;/i&gt;
151
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
152
+ * @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: createdAt&lt;/i&gt;
153
+ * @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;
154
+ * @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, type, status, direction, paymentMethodPsp, paymentMethodType, createdAt&lt;/i&gt;
155
+ * @param {*} [options] Override http request option.
156
+ * @throws {RequiredError}
157
+ */
158
+ listPaymentRequests: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
159
+ const localVarPath = `/paymentservice/v1/payment-requests`;
160
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
161
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
162
+ let baseOptions;
163
+ let baseAccessToken;
164
+ if (configuration) {
165
+ baseOptions = configuration.baseOptions;
166
+ baseAccessToken = configuration.accessToken;
167
+ }
168
+
169
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
170
+ const localVarHeaderParameter = {} as any;
171
+ const localVarQueryParameter = {} as any;
172
+
173
+ // authentication bearer required
174
+ // http bearer authentication required
175
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
176
+
177
+ if (pageSize !== undefined) {
178
+ localVarQueryParameter['pageSize'] = pageSize;
179
+ }
180
+
181
+ if (pageToken !== undefined) {
182
+ localVarQueryParameter['pageToken'] = pageToken;
183
+ }
184
+
185
+ if (filter !== undefined) {
186
+ localVarQueryParameter['filter'] = filter;
187
+ }
188
+
189
+ if (search !== undefined) {
190
+ localVarQueryParameter['search'] = search;
191
+ }
192
+
193
+ if (order !== undefined) {
194
+ localVarQueryParameter['order'] = order;
195
+ }
196
+
197
+ if (expand !== undefined) {
198
+ localVarQueryParameter['expand'] = expand;
199
+ }
200
+
201
+ if (filters !== undefined) {
202
+ localVarQueryParameter['filters'] = filters;
203
+ }
204
+
205
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
206
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
207
+ }
208
+
209
+
210
+
211
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
212
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
213
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
214
+
215
+ return {
216
+ url: toPathString(localVarUrlObj),
217
+ options: localVarRequestOptions,
218
+ };
219
+ },
220
+ /**
221
+ * This will update payment request. **Required Permissions** \"payment-management.payments.update\"
222
+ * @summary Update the payment request
223
+ * @param {string} code Unique identifier for the object.
224
+ * @param {UpdatePaymentRequestRequestDto} updatePaymentRequestRequestDto
225
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
226
+ * @param {*} [options] Override http request option.
227
+ * @throws {RequiredError}
228
+ */
229
+ updatePaymentRequest: async (code: string, updatePaymentRequestRequestDto: UpdatePaymentRequestRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
230
+ // verify required parameter 'code' is not null or undefined
231
+ assertParamExists('updatePaymentRequest', 'code', code)
232
+ // verify required parameter 'updatePaymentRequestRequestDto' is not null or undefined
233
+ assertParamExists('updatePaymentRequest', 'updatePaymentRequestRequestDto', updatePaymentRequestRequestDto)
234
+ const localVarPath = `/paymentservice/v1/payment-requests/{code}`
235
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
236
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
237
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
238
+ let baseOptions;
239
+ let baseAccessToken;
240
+ if (configuration) {
241
+ baseOptions = configuration.baseOptions;
242
+ baseAccessToken = configuration.accessToken;
243
+ }
244
+
245
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
246
+ const localVarHeaderParameter = {} as any;
247
+ const localVarQueryParameter = {} as any;
248
+
249
+ // authentication bearer required
250
+ // http bearer authentication required
251
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
252
+
253
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
254
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
255
+ }
256
+
257
+
258
+
259
+ localVarHeaderParameter['Content-Type'] = 'application/json';
260
+
261
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
262
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
263
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
264
+ localVarRequestOptions.data = serializeDataIfNeeded(updatePaymentRequestRequestDto, localVarRequestOptions, configuration)
265
+
266
+ return {
267
+ url: toPathString(localVarUrlObj),
268
+ options: localVarRequestOptions,
269
+ };
270
+ },
271
+ }
272
+ };
273
+
274
+ /**
275
+ * PaymentRequestsApi - functional programming interface
276
+ * @export
277
+ */
278
+ export const PaymentRequestsApiFp = function(configuration?: Configuration) {
279
+ const localVarAxiosParamCreator = PaymentRequestsApiAxiosParamCreator(configuration)
280
+ return {
281
+ /**
282
+ * This will create payment request. **Required Permissions** \"payment-management.payments.create\"
283
+ * @summary Create the payment request
284
+ * @param {CreatePaymentRequestRequestDto} createPaymentRequestRequestDto
285
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
286
+ * @param {*} [options] Override http request option.
287
+ * @throws {RequiredError}
288
+ */
289
+ async createPaymentRequest(createPaymentRequestRequestDto: CreatePaymentRequestRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePaymentRequestResponseClass>> {
290
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createPaymentRequest(createPaymentRequestRequestDto, authorization, options);
291
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
292
+ },
293
+ /**
294
+ * This will get payment request. **Required Permissions** \"payment-management.payments.view\"
295
+ * @summary Retrieve the payment request
296
+ * @param {string} code Unique identifier for the object.
297
+ * @param {string} expand
298
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
299
+ * @param {*} [options] Override http request option.
300
+ * @throws {RequiredError}
301
+ */
302
+ async getPaymentRequest(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPaymentRequestResponseClass>> {
303
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPaymentRequest(code, expand, authorization, options);
304
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
305
+ },
306
+ /**
307
+ * Retrieves a list of paymentrequests. **Required Permissions** \"payment-management.payments.view\"
308
+ * @summary List payment requests
309
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
310
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
311
+ * @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.
312
+ * @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, type, status, direction, paymentMethodPsp, paymentMethodType, createdAt&lt;/i&gt;
313
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
314
+ * @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: createdAt&lt;/i&gt;
315
+ * @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;
316
+ * @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, type, status, direction, paymentMethodPsp, paymentMethodType, createdAt&lt;/i&gt;
317
+ * @param {*} [options] Override http request option.
318
+ * @throws {RequiredError}
319
+ */
320
+ async listPaymentRequests(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPaymentRequestsResponseClass>> {
321
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPaymentRequests(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
322
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
323
+ },
324
+ /**
325
+ * This will update payment request. **Required Permissions** \"payment-management.payments.update\"
326
+ * @summary Update the payment request
327
+ * @param {string} code Unique identifier for the object.
328
+ * @param {UpdatePaymentRequestRequestDto} updatePaymentRequestRequestDto
329
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
330
+ * @param {*} [options] Override http request option.
331
+ * @throws {RequiredError}
332
+ */
333
+ async updatePaymentRequest(code: string, updatePaymentRequestRequestDto: UpdatePaymentRequestRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdatePaymentRequestResponseClass>> {
334
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updatePaymentRequest(code, updatePaymentRequestRequestDto, authorization, options);
335
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
336
+ },
337
+ }
338
+ };
339
+
340
+ /**
341
+ * PaymentRequestsApi - factory interface
342
+ * @export
343
+ */
344
+ export const PaymentRequestsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
345
+ const localVarFp = PaymentRequestsApiFp(configuration)
346
+ return {
347
+ /**
348
+ * This will create payment request. **Required Permissions** \"payment-management.payments.create\"
349
+ * @summary Create the payment request
350
+ * @param {CreatePaymentRequestRequestDto} createPaymentRequestRequestDto
351
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
352
+ * @param {*} [options] Override http request option.
353
+ * @throws {RequiredError}
354
+ */
355
+ createPaymentRequest(createPaymentRequestRequestDto: CreatePaymentRequestRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePaymentRequestResponseClass> {
356
+ return localVarFp.createPaymentRequest(createPaymentRequestRequestDto, authorization, options).then((request) => request(axios, basePath));
357
+ },
358
+ /**
359
+ * This will get payment request. **Required Permissions** \"payment-management.payments.view\"
360
+ * @summary Retrieve the payment request
361
+ * @param {string} code Unique identifier for the object.
362
+ * @param {string} expand
363
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
364
+ * @param {*} [options] Override http request option.
365
+ * @throws {RequiredError}
366
+ */
367
+ getPaymentRequest(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetPaymentRequestResponseClass> {
368
+ return localVarFp.getPaymentRequest(code, expand, authorization, options).then((request) => request(axios, basePath));
369
+ },
370
+ /**
371
+ * Retrieves a list of paymentrequests. **Required Permissions** \"payment-management.payments.view\"
372
+ * @summary List payment requests
373
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
374
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
375
+ * @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.
376
+ * @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, type, status, direction, paymentMethodPsp, paymentMethodType, createdAt&lt;/i&gt;
377
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
378
+ * @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: createdAt&lt;/i&gt;
379
+ * @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;
380
+ * @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, type, status, direction, paymentMethodPsp, paymentMethodType, createdAt&lt;/i&gt;
381
+ * @param {*} [options] Override http request option.
382
+ * @throws {RequiredError}
383
+ */
384
+ listPaymentRequests(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPaymentRequestsResponseClass> {
385
+ return localVarFp.listPaymentRequests(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
386
+ },
387
+ /**
388
+ * This will update payment request. **Required Permissions** \"payment-management.payments.update\"
389
+ * @summary Update the payment request
390
+ * @param {string} code Unique identifier for the object.
391
+ * @param {UpdatePaymentRequestRequestDto} updatePaymentRequestRequestDto
392
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
393
+ * @param {*} [options] Override http request option.
394
+ * @throws {RequiredError}
395
+ */
396
+ updatePaymentRequest(code: string, updatePaymentRequestRequestDto: UpdatePaymentRequestRequestDto, authorization?: string, options?: any): AxiosPromise<UpdatePaymentRequestResponseClass> {
397
+ return localVarFp.updatePaymentRequest(code, updatePaymentRequestRequestDto, authorization, options).then((request) => request(axios, basePath));
398
+ },
399
+ };
400
+ };
401
+
402
+ /**
403
+ * Request parameters for createPaymentRequest operation in PaymentRequestsApi.
404
+ * @export
405
+ * @interface PaymentRequestsApiCreatePaymentRequestRequest
406
+ */
407
+ export interface PaymentRequestsApiCreatePaymentRequestRequest {
408
+ /**
409
+ *
410
+ * @type {CreatePaymentRequestRequestDto}
411
+ * @memberof PaymentRequestsApiCreatePaymentRequest
412
+ */
413
+ readonly createPaymentRequestRequestDto: CreatePaymentRequestRequestDto
414
+
415
+ /**
416
+ * Bearer Token: provided by the login endpoint under the name accessToken.
417
+ * @type {string}
418
+ * @memberof PaymentRequestsApiCreatePaymentRequest
419
+ */
420
+ readonly authorization?: string
421
+ }
422
+
423
+ /**
424
+ * Request parameters for getPaymentRequest operation in PaymentRequestsApi.
425
+ * @export
426
+ * @interface PaymentRequestsApiGetPaymentRequestRequest
427
+ */
428
+ export interface PaymentRequestsApiGetPaymentRequestRequest {
429
+ /**
430
+ * Unique identifier for the object.
431
+ * @type {string}
432
+ * @memberof PaymentRequestsApiGetPaymentRequest
433
+ */
434
+ readonly code: string
435
+
436
+ /**
437
+ *
438
+ * @type {string}
439
+ * @memberof PaymentRequestsApiGetPaymentRequest
440
+ */
441
+ readonly expand: string
442
+
443
+ /**
444
+ * Bearer Token: provided by the login endpoint under the name accessToken.
445
+ * @type {string}
446
+ * @memberof PaymentRequestsApiGetPaymentRequest
447
+ */
448
+ readonly authorization?: string
449
+ }
450
+
451
+ /**
452
+ * Request parameters for listPaymentRequests operation in PaymentRequestsApi.
453
+ * @export
454
+ * @interface PaymentRequestsApiListPaymentRequestsRequest
455
+ */
456
+ export interface PaymentRequestsApiListPaymentRequestsRequest {
457
+ /**
458
+ * Bearer Token: provided by the login endpoint under the name accessToken.
459
+ * @type {string}
460
+ * @memberof PaymentRequestsApiListPaymentRequests
461
+ */
462
+ readonly authorization?: string
463
+
464
+ /**
465
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
466
+ * @type {number}
467
+ * @memberof PaymentRequestsApiListPaymentRequests
468
+ */
469
+ readonly pageSize?: number
470
+
471
+ /**
472
+ * 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.
473
+ * @type {string}
474
+ * @memberof PaymentRequestsApiListPaymentRequests
475
+ */
476
+ readonly pageToken?: string
477
+
478
+ /**
479
+ * 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, type, status, direction, paymentMethodPsp, paymentMethodType, createdAt&lt;/i&gt;
480
+ * @type {string}
481
+ * @memberof PaymentRequestsApiListPaymentRequests
482
+ */
483
+ readonly filter?: string
484
+
485
+ /**
486
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
487
+ * @type {string}
488
+ * @memberof PaymentRequestsApiListPaymentRequests
489
+ */
490
+ readonly search?: string
491
+
492
+ /**
493
+ * 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: createdAt&lt;/i&gt;
494
+ * @type {string}
495
+ * @memberof PaymentRequestsApiListPaymentRequests
496
+ */
497
+ readonly order?: string
498
+
499
+ /**
500
+ * 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;
501
+ * @type {string}
502
+ * @memberof PaymentRequestsApiListPaymentRequests
503
+ */
504
+ readonly expand?: string
505
+
506
+ /**
507
+ * 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, type, status, direction, paymentMethodPsp, paymentMethodType, createdAt&lt;/i&gt;
508
+ * @type {string}
509
+ * @memberof PaymentRequestsApiListPaymentRequests
510
+ */
511
+ readonly filters?: string
512
+ }
513
+
514
+ /**
515
+ * Request parameters for updatePaymentRequest operation in PaymentRequestsApi.
516
+ * @export
517
+ * @interface PaymentRequestsApiUpdatePaymentRequestRequest
518
+ */
519
+ export interface PaymentRequestsApiUpdatePaymentRequestRequest {
520
+ /**
521
+ * Unique identifier for the object.
522
+ * @type {string}
523
+ * @memberof PaymentRequestsApiUpdatePaymentRequest
524
+ */
525
+ readonly code: string
526
+
527
+ /**
528
+ *
529
+ * @type {UpdatePaymentRequestRequestDto}
530
+ * @memberof PaymentRequestsApiUpdatePaymentRequest
531
+ */
532
+ readonly updatePaymentRequestRequestDto: UpdatePaymentRequestRequestDto
533
+
534
+ /**
535
+ * Bearer Token: provided by the login endpoint under the name accessToken.
536
+ * @type {string}
537
+ * @memberof PaymentRequestsApiUpdatePaymentRequest
538
+ */
539
+ readonly authorization?: string
540
+ }
541
+
542
+ /**
543
+ * PaymentRequestsApi - object-oriented interface
544
+ * @export
545
+ * @class PaymentRequestsApi
546
+ * @extends {BaseAPI}
547
+ */
548
+ export class PaymentRequestsApi extends BaseAPI {
549
+ /**
550
+ * This will create payment request. **Required Permissions** \"payment-management.payments.create\"
551
+ * @summary Create the payment request
552
+ * @param {PaymentRequestsApiCreatePaymentRequestRequest} requestParameters Request parameters.
553
+ * @param {*} [options] Override http request option.
554
+ * @throws {RequiredError}
555
+ * @memberof PaymentRequestsApi
556
+ */
557
+ public createPaymentRequest(requestParameters: PaymentRequestsApiCreatePaymentRequestRequest, options?: AxiosRequestConfig) {
558
+ return PaymentRequestsApiFp(this.configuration).createPaymentRequest(requestParameters.createPaymentRequestRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
559
+ }
560
+
561
+ /**
562
+ * This will get payment request. **Required Permissions** \"payment-management.payments.view\"
563
+ * @summary Retrieve the payment request
564
+ * @param {PaymentRequestsApiGetPaymentRequestRequest} requestParameters Request parameters.
565
+ * @param {*} [options] Override http request option.
566
+ * @throws {RequiredError}
567
+ * @memberof PaymentRequestsApi
568
+ */
569
+ public getPaymentRequest(requestParameters: PaymentRequestsApiGetPaymentRequestRequest, options?: AxiosRequestConfig) {
570
+ return PaymentRequestsApiFp(this.configuration).getPaymentRequest(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
571
+ }
572
+
573
+ /**
574
+ * Retrieves a list of paymentrequests. **Required Permissions** \"payment-management.payments.view\"
575
+ * @summary List payment requests
576
+ * @param {PaymentRequestsApiListPaymentRequestsRequest} requestParameters Request parameters.
577
+ * @param {*} [options] Override http request option.
578
+ * @throws {RequiredError}
579
+ * @memberof PaymentRequestsApi
580
+ */
581
+ public listPaymentRequests(requestParameters: PaymentRequestsApiListPaymentRequestsRequest = {}, options?: AxiosRequestConfig) {
582
+ return PaymentRequestsApiFp(this.configuration).listPaymentRequests(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
583
+ }
584
+
585
+ /**
586
+ * This will update payment request. **Required Permissions** \"payment-management.payments.update\"
587
+ * @summary Update the payment request
588
+ * @param {PaymentRequestsApiUpdatePaymentRequestRequest} requestParameters Request parameters.
589
+ * @param {*} [options] Override http request option.
590
+ * @throws {RequiredError}
591
+ * @memberof PaymentRequestsApi
592
+ */
593
+ public updatePaymentRequest(requestParameters: PaymentRequestsApiUpdatePaymentRequestRequest, options?: AxiosRequestConfig) {
594
+ return PaymentRequestsApiFp(this.configuration).updatePaymentRequest(requestParameters.code, requestParameters.updatePaymentRequestRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
595
+ }
596
+ }