@emilgroup/payment-sdk-node 1.23.0 → 1.23.1-beta.11

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 (103) hide show
  1. package/.openapi-generator/FILES +22 -0
  2. package/README.md +2 -2
  3. package/api/billing-addresses-api.ts +681 -0
  4. package/api/payment-requests-api.ts +697 -0
  5. package/api/payout-methods-api.ts +676 -0
  6. package/api/tenant-bank-account-api.ts +12 -12
  7. package/api.ts +6 -0
  8. package/dist/api/billing-addresses-api.d.ts +384 -0
  9. package/dist/api/billing-addresses-api.js +640 -0
  10. package/dist/api/payment-requests-api.d.ts +393 -0
  11. package/dist/api/payment-requests-api.js +648 -0
  12. package/dist/api/payout-methods-api.d.ts +382 -0
  13. package/dist/api/payout-methods-api.js +639 -0
  14. package/dist/api/tenant-bank-account-api.d.ts +12 -12
  15. package/dist/api/tenant-bank-account-api.js +9 -9
  16. package/dist/api.d.ts +3 -0
  17. package/dist/api.js +3 -0
  18. package/dist/models/bank-order-class.d.ts +3 -3
  19. package/dist/models/bank-order-entity.d.ts +3 -2
  20. package/dist/models/bank-order-entity.js +2 -1
  21. package/dist/models/billing-address-class.d.ts +108 -0
  22. package/dist/models/billing-address-class.js +15 -0
  23. package/dist/models/create-bank-order-request-dto.d.ts +4 -3
  24. package/dist/models/create-bank-order-request-dto.js +2 -1
  25. package/dist/models/create-billing-address-request-dto.d.ts +66 -0
  26. package/dist/models/create-billing-address-request-dto.js +15 -0
  27. package/dist/models/create-billing-address-response-class.d.ts +25 -0
  28. package/dist/models/create-billing-address-response-class.js +15 -0
  29. package/dist/models/create-payment-request-request-dto.d.ts +72 -0
  30. package/dist/models/create-payment-request-request-dto.js +26 -0
  31. package/dist/models/create-payment-request-response-class.d.ts +25 -0
  32. package/dist/models/create-payment-request-response-class.js +15 -0
  33. package/dist/models/create-payout-method-request-dto.d.ts +60 -0
  34. package/dist/models/create-payout-method-request-dto.js +15 -0
  35. package/dist/models/create-payout-method-response-class.d.ts +25 -0
  36. package/dist/models/create-payout-method-response-class.js +15 -0
  37. package/dist/models/create-tenant-bank-account-request-dto.d.ts +17 -0
  38. package/dist/models/create-tenant-bank-account-request-dto.js +11 -1
  39. package/dist/models/get-billing-address-response-class.d.ts +25 -0
  40. package/dist/models/get-billing-address-response-class.js +15 -0
  41. package/dist/models/get-payment-request-response-class.d.ts +25 -0
  42. package/dist/models/get-payment-request-response-class.js +15 -0
  43. package/dist/models/get-payout-method-response-class.d.ts +25 -0
  44. package/dist/models/get-payout-method-response-class.js +15 -0
  45. package/dist/models/index.d.ts +19 -0
  46. package/dist/models/index.js +19 -0
  47. package/dist/models/list-billing-addresses-response-class.d.ts +43 -0
  48. package/dist/models/list-billing-addresses-response-class.js +15 -0
  49. package/dist/models/list-payment-requests-response-class.d.ts +31 -0
  50. package/dist/models/list-payment-requests-response-class.js +15 -0
  51. package/dist/models/list-payout-methods-response-class.d.ts +43 -0
  52. package/dist/models/list-payout-methods-response-class.js +15 -0
  53. package/dist/models/payment-request-class.d.ts +111 -0
  54. package/dist/models/payment-request-class.js +34 -0
  55. package/dist/models/payout-method-class.d.ts +115 -0
  56. package/dist/models/payout-method-class.js +15 -0
  57. package/dist/models/tenant-bank-account-class-without-expand-properties.d.ts +17 -0
  58. package/dist/models/tenant-bank-account-class-without-expand-properties.js +11 -1
  59. package/dist/models/tenant-bank-account-class.d.ts +17 -0
  60. package/dist/models/tenant-bank-account-class.js +11 -1
  61. package/dist/models/tenant-bank-account-entity.d.ts +17 -0
  62. package/dist/models/tenant-bank-account-entity.js +11 -1
  63. package/dist/models/update-bank-order-request-dto.d.ts +3 -3
  64. package/dist/models/update-billing-address-request-dto.d.ts +66 -0
  65. package/dist/models/update-billing-address-request-dto.js +15 -0
  66. package/dist/models/update-billing-address-response-class.d.ts +25 -0
  67. package/dist/models/update-billing-address-response-class.js +15 -0
  68. package/dist/models/update-payment-request-request-dto.d.ts +39 -0
  69. package/dist/models/update-payment-request-request-dto.js +24 -0
  70. package/dist/models/update-payment-request-response-class.d.ts +25 -0
  71. package/dist/models/update-payment-request-response-class.js +15 -0
  72. package/dist/models/update-tenant-bank-account-rest-request-dto.d.ts +17 -0
  73. package/dist/models/update-tenant-bank-account-rest-request-dto.js +11 -1
  74. package/models/bank-order-class.ts +3 -3
  75. package/models/bank-order-entity.ts +4 -3
  76. package/models/billing-address-class.ts +114 -0
  77. package/models/create-bank-order-request-dto.ts +5 -4
  78. package/models/create-billing-address-request-dto.ts +72 -0
  79. package/models/create-billing-address-response-class.ts +31 -0
  80. package/models/create-payment-request-request-dto.ts +82 -0
  81. package/models/create-payment-request-response-class.ts +31 -0
  82. package/models/create-payout-method-request-dto.ts +66 -0
  83. package/models/create-payout-method-response-class.ts +31 -0
  84. package/models/create-tenant-bank-account-request-dto.ts +18 -0
  85. package/models/get-billing-address-response-class.ts +31 -0
  86. package/models/get-payment-request-response-class.ts +31 -0
  87. package/models/get-payout-method-response-class.ts +31 -0
  88. package/models/index.ts +19 -0
  89. package/models/list-billing-addresses-response-class.ts +49 -0
  90. package/models/list-payment-requests-response-class.ts +37 -0
  91. package/models/list-payout-methods-response-class.ts +49 -0
  92. package/models/payment-request-class.ts +122 -0
  93. package/models/payout-method-class.ts +121 -0
  94. package/models/tenant-bank-account-class-without-expand-properties.ts +18 -0
  95. package/models/tenant-bank-account-class.ts +18 -0
  96. package/models/tenant-bank-account-entity.ts +18 -0
  97. package/models/update-bank-order-request-dto.ts +3 -3
  98. package/models/update-billing-address-request-dto.ts +72 -0
  99. package/models/update-billing-address-response-class.ts +31 -0
  100. package/models/update-payment-request-request-dto.ts +48 -0
  101. package/models/update-payment-request-response-class.ts +31 -0
  102. package/models/update-tenant-bank-account-rest-request-dto.ts +18 -0
  103. package/package.json +2 -2
@@ -0,0 +1,697 @@
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 delete payment request. **Required Permissions** \"payment-management.payments.delete\"
94
+ * @summary Delete the payment request
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
+ deletePaymentRequest: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
101
+ // verify required parameter 'code' is not null or undefined
102
+ assertParamExists('deletePaymentRequest', 'code', code)
103
+ const localVarPath = `/paymentservice/v1/payment-requests/{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 payment request. **Required Permissions** \"payment-management.payments.view\"
139
+ * @summary Retrieve the payment request
140
+ * @param {string} code Unique identifier for the object.
141
+ * @param {string} expand
142
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
143
+ * @param {*} [options] Override http request option.
144
+ * @throws {RequiredError}
145
+ */
146
+ getPaymentRequest: async (code: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
147
+ // verify required parameter 'code' is not null or undefined
148
+ assertParamExists('getPaymentRequest', 'code', code)
149
+ // verify required parameter 'expand' is not null or undefined
150
+ assertParamExists('getPaymentRequest', 'expand', expand)
151
+ const localVarPath = `/paymentservice/v1/payment-requests/{code}`
152
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
153
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
154
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
155
+ let baseOptions;
156
+ let baseAccessToken;
157
+ if (configuration) {
158
+ baseOptions = configuration.baseOptions;
159
+ baseAccessToken = configuration.accessToken;
160
+ }
161
+
162
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
163
+ const localVarHeaderParameter = {} as any;
164
+ const localVarQueryParameter = {} as any;
165
+
166
+ // authentication bearer required
167
+ // http bearer authentication required
168
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
169
+
170
+ if (expand !== undefined) {
171
+ localVarQueryParameter['expand'] = expand;
172
+ }
173
+
174
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
175
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
176
+ }
177
+
178
+
179
+
180
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
181
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
182
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
183
+
184
+ return {
185
+ url: toPathString(localVarUrlObj),
186
+ options: localVarRequestOptions,
187
+ };
188
+ },
189
+ /**
190
+ * Retrieves a list of paymentrequests. **Required Permissions** \"payment-management.payments.view\"
191
+ * @summary List payment requests
192
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
193
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
194
+ * @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.
195
+ * @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;
196
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
197
+ * @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;
198
+ * @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;
199
+ * @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;
200
+ * @param {*} [options] Override http request option.
201
+ * @throws {RequiredError}
202
+ */
203
+ listPaymentRequests: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
204
+ const localVarPath = `/paymentservice/v1/payment-requests`;
205
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
206
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
207
+ let baseOptions;
208
+ let baseAccessToken;
209
+ if (configuration) {
210
+ baseOptions = configuration.baseOptions;
211
+ baseAccessToken = configuration.accessToken;
212
+ }
213
+
214
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
215
+ const localVarHeaderParameter = {} as any;
216
+ const localVarQueryParameter = {} as any;
217
+
218
+ // authentication bearer required
219
+ // http bearer authentication required
220
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
221
+
222
+ if (pageSize !== undefined) {
223
+ localVarQueryParameter['pageSize'] = pageSize;
224
+ }
225
+
226
+ if (pageToken !== undefined) {
227
+ localVarQueryParameter['pageToken'] = pageToken;
228
+ }
229
+
230
+ if (filter !== undefined) {
231
+ localVarQueryParameter['filter'] = filter;
232
+ }
233
+
234
+ if (search !== undefined) {
235
+ localVarQueryParameter['search'] = search;
236
+ }
237
+
238
+ if (order !== undefined) {
239
+ localVarQueryParameter['order'] = order;
240
+ }
241
+
242
+ if (expand !== undefined) {
243
+ localVarQueryParameter['expand'] = expand;
244
+ }
245
+
246
+ if (filters !== undefined) {
247
+ localVarQueryParameter['filters'] = filters;
248
+ }
249
+
250
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
251
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
252
+ }
253
+
254
+
255
+
256
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
257
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
258
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
259
+
260
+ return {
261
+ url: toPathString(localVarUrlObj),
262
+ options: localVarRequestOptions,
263
+ };
264
+ },
265
+ /**
266
+ * This will update payment request. **Required Permissions** \"payment-management.payments.update\"
267
+ * @summary Update the payment request
268
+ * @param {string} code Unique identifier for the object.
269
+ * @param {UpdatePaymentRequestRequestDto} updatePaymentRequestRequestDto
270
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
271
+ * @param {*} [options] Override http request option.
272
+ * @throws {RequiredError}
273
+ */
274
+ updatePaymentRequest: async (code: string, updatePaymentRequestRequestDto: UpdatePaymentRequestRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
275
+ // verify required parameter 'code' is not null or undefined
276
+ assertParamExists('updatePaymentRequest', 'code', code)
277
+ // verify required parameter 'updatePaymentRequestRequestDto' is not null or undefined
278
+ assertParamExists('updatePaymentRequest', 'updatePaymentRequestRequestDto', updatePaymentRequestRequestDto)
279
+ const localVarPath = `/paymentservice/v1/payment-requests/{code}`
280
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
281
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
282
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
283
+ let baseOptions;
284
+ let baseAccessToken;
285
+ if (configuration) {
286
+ baseOptions = configuration.baseOptions;
287
+ baseAccessToken = configuration.accessToken;
288
+ }
289
+
290
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
291
+ const localVarHeaderParameter = {} as any;
292
+ const localVarQueryParameter = {} as any;
293
+
294
+ // authentication bearer required
295
+ // http bearer authentication required
296
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
297
+
298
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
299
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
300
+ }
301
+
302
+
303
+
304
+ localVarHeaderParameter['Content-Type'] = 'application/json';
305
+
306
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
307
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
308
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
309
+ localVarRequestOptions.data = serializeDataIfNeeded(updatePaymentRequestRequestDto, localVarRequestOptions, configuration)
310
+
311
+ return {
312
+ url: toPathString(localVarUrlObj),
313
+ options: localVarRequestOptions,
314
+ };
315
+ },
316
+ }
317
+ };
318
+
319
+ /**
320
+ * PaymentRequestsApi - functional programming interface
321
+ * @export
322
+ */
323
+ export const PaymentRequestsApiFp = function(configuration?: Configuration) {
324
+ const localVarAxiosParamCreator = PaymentRequestsApiAxiosParamCreator(configuration)
325
+ return {
326
+ /**
327
+ * This will create payment request. **Required Permissions** \"payment-management.payments.create\"
328
+ * @summary Create the payment request
329
+ * @param {CreatePaymentRequestRequestDto} createPaymentRequestRequestDto
330
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
331
+ * @param {*} [options] Override http request option.
332
+ * @throws {RequiredError}
333
+ */
334
+ async createPaymentRequest(createPaymentRequestRequestDto: CreatePaymentRequestRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePaymentRequestResponseClass>> {
335
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createPaymentRequest(createPaymentRequestRequestDto, authorization, options);
336
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
337
+ },
338
+ /**
339
+ * This will delete payment request. **Required Permissions** \"payment-management.payments.delete\"
340
+ * @summary Delete the payment request
341
+ * @param {string} code Unique identifier for the object.
342
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
343
+ * @param {*} [options] Override http request option.
344
+ * @throws {RequiredError}
345
+ */
346
+ async deletePaymentRequest(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
347
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deletePaymentRequest(code, authorization, options);
348
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
349
+ },
350
+ /**
351
+ * This will get payment request. **Required Permissions** \"payment-management.payments.view\"
352
+ * @summary Retrieve the payment request
353
+ * @param {string} code Unique identifier for the object.
354
+ * @param {string} expand
355
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
356
+ * @param {*} [options] Override http request option.
357
+ * @throws {RequiredError}
358
+ */
359
+ async getPaymentRequest(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPaymentRequestResponseClass>> {
360
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPaymentRequest(code, expand, authorization, options);
361
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
362
+ },
363
+ /**
364
+ * Retrieves a list of paymentrequests. **Required Permissions** \"payment-management.payments.view\"
365
+ * @summary List payment requests
366
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
367
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
368
+ * @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.
369
+ * @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;
370
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
371
+ * @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;
372
+ * @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;
373
+ * @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;
374
+ * @param {*} [options] Override http request option.
375
+ * @throws {RequiredError}
376
+ */
377
+ 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>> {
378
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPaymentRequests(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
379
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
380
+ },
381
+ /**
382
+ * This will update payment request. **Required Permissions** \"payment-management.payments.update\"
383
+ * @summary Update the payment request
384
+ * @param {string} code Unique identifier for the object.
385
+ * @param {UpdatePaymentRequestRequestDto} updatePaymentRequestRequestDto
386
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
387
+ * @param {*} [options] Override http request option.
388
+ * @throws {RequiredError}
389
+ */
390
+ async updatePaymentRequest(code: string, updatePaymentRequestRequestDto: UpdatePaymentRequestRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdatePaymentRequestResponseClass>> {
391
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updatePaymentRequest(code, updatePaymentRequestRequestDto, authorization, options);
392
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
393
+ },
394
+ }
395
+ };
396
+
397
+ /**
398
+ * PaymentRequestsApi - factory interface
399
+ * @export
400
+ */
401
+ export const PaymentRequestsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
402
+ const localVarFp = PaymentRequestsApiFp(configuration)
403
+ return {
404
+ /**
405
+ * This will create payment request. **Required Permissions** \"payment-management.payments.create\"
406
+ * @summary Create the payment request
407
+ * @param {CreatePaymentRequestRequestDto} createPaymentRequestRequestDto
408
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
409
+ * @param {*} [options] Override http request option.
410
+ * @throws {RequiredError}
411
+ */
412
+ createPaymentRequest(createPaymentRequestRequestDto: CreatePaymentRequestRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePaymentRequestResponseClass> {
413
+ return localVarFp.createPaymentRequest(createPaymentRequestRequestDto, authorization, options).then((request) => request(axios, basePath));
414
+ },
415
+ /**
416
+ * This will delete payment request. **Required Permissions** \"payment-management.payments.delete\"
417
+ * @summary Delete the payment request
418
+ * @param {string} code Unique identifier for the object.
419
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
420
+ * @param {*} [options] Override http request option.
421
+ * @throws {RequiredError}
422
+ */
423
+ deletePaymentRequest(code: string, authorization?: string, options?: any): AxiosPromise<object> {
424
+ return localVarFp.deletePaymentRequest(code, authorization, options).then((request) => request(axios, basePath));
425
+ },
426
+ /**
427
+ * This will get payment request. **Required Permissions** \"payment-management.payments.view\"
428
+ * @summary Retrieve the payment request
429
+ * @param {string} code Unique identifier for the object.
430
+ * @param {string} expand
431
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
432
+ * @param {*} [options] Override http request option.
433
+ * @throws {RequiredError}
434
+ */
435
+ getPaymentRequest(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetPaymentRequestResponseClass> {
436
+ return localVarFp.getPaymentRequest(code, expand, authorization, options).then((request) => request(axios, basePath));
437
+ },
438
+ /**
439
+ * Retrieves a list of paymentrequests. **Required Permissions** \"payment-management.payments.view\"
440
+ * @summary List payment requests
441
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
442
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
443
+ * @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.
444
+ * @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;
445
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
446
+ * @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;
447
+ * @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;
448
+ * @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;
449
+ * @param {*} [options] Override http request option.
450
+ * @throws {RequiredError}
451
+ */
452
+ listPaymentRequests(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPaymentRequestsResponseClass> {
453
+ return localVarFp.listPaymentRequests(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
454
+ },
455
+ /**
456
+ * This will update payment request. **Required Permissions** \"payment-management.payments.update\"
457
+ * @summary Update the payment request
458
+ * @param {string} code Unique identifier for the object.
459
+ * @param {UpdatePaymentRequestRequestDto} updatePaymentRequestRequestDto
460
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
461
+ * @param {*} [options] Override http request option.
462
+ * @throws {RequiredError}
463
+ */
464
+ updatePaymentRequest(code: string, updatePaymentRequestRequestDto: UpdatePaymentRequestRequestDto, authorization?: string, options?: any): AxiosPromise<UpdatePaymentRequestResponseClass> {
465
+ return localVarFp.updatePaymentRequest(code, updatePaymentRequestRequestDto, authorization, options).then((request) => request(axios, basePath));
466
+ },
467
+ };
468
+ };
469
+
470
+ /**
471
+ * Request parameters for createPaymentRequest operation in PaymentRequestsApi.
472
+ * @export
473
+ * @interface PaymentRequestsApiCreatePaymentRequestRequest
474
+ */
475
+ export interface PaymentRequestsApiCreatePaymentRequestRequest {
476
+ /**
477
+ *
478
+ * @type {CreatePaymentRequestRequestDto}
479
+ * @memberof PaymentRequestsApiCreatePaymentRequest
480
+ */
481
+ readonly createPaymentRequestRequestDto: CreatePaymentRequestRequestDto
482
+
483
+ /**
484
+ * Bearer Token: provided by the login endpoint under the name accessToken.
485
+ * @type {string}
486
+ * @memberof PaymentRequestsApiCreatePaymentRequest
487
+ */
488
+ readonly authorization?: string
489
+ }
490
+
491
+ /**
492
+ * Request parameters for deletePaymentRequest operation in PaymentRequestsApi.
493
+ * @export
494
+ * @interface PaymentRequestsApiDeletePaymentRequestRequest
495
+ */
496
+ export interface PaymentRequestsApiDeletePaymentRequestRequest {
497
+ /**
498
+ * Unique identifier for the object.
499
+ * @type {string}
500
+ * @memberof PaymentRequestsApiDeletePaymentRequest
501
+ */
502
+ readonly code: string
503
+
504
+ /**
505
+ * Bearer Token: provided by the login endpoint under the name accessToken.
506
+ * @type {string}
507
+ * @memberof PaymentRequestsApiDeletePaymentRequest
508
+ */
509
+ readonly authorization?: string
510
+ }
511
+
512
+ /**
513
+ * Request parameters for getPaymentRequest operation in PaymentRequestsApi.
514
+ * @export
515
+ * @interface PaymentRequestsApiGetPaymentRequestRequest
516
+ */
517
+ export interface PaymentRequestsApiGetPaymentRequestRequest {
518
+ /**
519
+ * Unique identifier for the object.
520
+ * @type {string}
521
+ * @memberof PaymentRequestsApiGetPaymentRequest
522
+ */
523
+ readonly code: string
524
+
525
+ /**
526
+ *
527
+ * @type {string}
528
+ * @memberof PaymentRequestsApiGetPaymentRequest
529
+ */
530
+ readonly expand: string
531
+
532
+ /**
533
+ * Bearer Token: provided by the login endpoint under the name accessToken.
534
+ * @type {string}
535
+ * @memberof PaymentRequestsApiGetPaymentRequest
536
+ */
537
+ readonly authorization?: string
538
+ }
539
+
540
+ /**
541
+ * Request parameters for listPaymentRequests operation in PaymentRequestsApi.
542
+ * @export
543
+ * @interface PaymentRequestsApiListPaymentRequestsRequest
544
+ */
545
+ export interface PaymentRequestsApiListPaymentRequestsRequest {
546
+ /**
547
+ * Bearer Token: provided by the login endpoint under the name accessToken.
548
+ * @type {string}
549
+ * @memberof PaymentRequestsApiListPaymentRequests
550
+ */
551
+ readonly authorization?: string
552
+
553
+ /**
554
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
555
+ * @type {number}
556
+ * @memberof PaymentRequestsApiListPaymentRequests
557
+ */
558
+ readonly pageSize?: number
559
+
560
+ /**
561
+ * 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.
562
+ * @type {string}
563
+ * @memberof PaymentRequestsApiListPaymentRequests
564
+ */
565
+ readonly pageToken?: string
566
+
567
+ /**
568
+ * 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;
569
+ * @type {string}
570
+ * @memberof PaymentRequestsApiListPaymentRequests
571
+ */
572
+ readonly filter?: string
573
+
574
+ /**
575
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
576
+ * @type {string}
577
+ * @memberof PaymentRequestsApiListPaymentRequests
578
+ */
579
+ readonly search?: string
580
+
581
+ /**
582
+ * 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;
583
+ * @type {string}
584
+ * @memberof PaymentRequestsApiListPaymentRequests
585
+ */
586
+ readonly order?: string
587
+
588
+ /**
589
+ * 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;
590
+ * @type {string}
591
+ * @memberof PaymentRequestsApiListPaymentRequests
592
+ */
593
+ readonly expand?: string
594
+
595
+ /**
596
+ * 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;
597
+ * @type {string}
598
+ * @memberof PaymentRequestsApiListPaymentRequests
599
+ */
600
+ readonly filters?: string
601
+ }
602
+
603
+ /**
604
+ * Request parameters for updatePaymentRequest operation in PaymentRequestsApi.
605
+ * @export
606
+ * @interface PaymentRequestsApiUpdatePaymentRequestRequest
607
+ */
608
+ export interface PaymentRequestsApiUpdatePaymentRequestRequest {
609
+ /**
610
+ * Unique identifier for the object.
611
+ * @type {string}
612
+ * @memberof PaymentRequestsApiUpdatePaymentRequest
613
+ */
614
+ readonly code: string
615
+
616
+ /**
617
+ *
618
+ * @type {UpdatePaymentRequestRequestDto}
619
+ * @memberof PaymentRequestsApiUpdatePaymentRequest
620
+ */
621
+ readonly updatePaymentRequestRequestDto: UpdatePaymentRequestRequestDto
622
+
623
+ /**
624
+ * Bearer Token: provided by the login endpoint under the name accessToken.
625
+ * @type {string}
626
+ * @memberof PaymentRequestsApiUpdatePaymentRequest
627
+ */
628
+ readonly authorization?: string
629
+ }
630
+
631
+ /**
632
+ * PaymentRequestsApi - object-oriented interface
633
+ * @export
634
+ * @class PaymentRequestsApi
635
+ * @extends {BaseAPI}
636
+ */
637
+ export class PaymentRequestsApi extends BaseAPI {
638
+ /**
639
+ * This will create payment request. **Required Permissions** \"payment-management.payments.create\"
640
+ * @summary Create the payment request
641
+ * @param {PaymentRequestsApiCreatePaymentRequestRequest} requestParameters Request parameters.
642
+ * @param {*} [options] Override http request option.
643
+ * @throws {RequiredError}
644
+ * @memberof PaymentRequestsApi
645
+ */
646
+ public createPaymentRequest(requestParameters: PaymentRequestsApiCreatePaymentRequestRequest, options?: AxiosRequestConfig) {
647
+ return PaymentRequestsApiFp(this.configuration).createPaymentRequest(requestParameters.createPaymentRequestRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
648
+ }
649
+
650
+ /**
651
+ * This will delete payment request. **Required Permissions** \"payment-management.payments.delete\"
652
+ * @summary Delete the payment request
653
+ * @param {PaymentRequestsApiDeletePaymentRequestRequest} requestParameters Request parameters.
654
+ * @param {*} [options] Override http request option.
655
+ * @throws {RequiredError}
656
+ * @memberof PaymentRequestsApi
657
+ */
658
+ public deletePaymentRequest(requestParameters: PaymentRequestsApiDeletePaymentRequestRequest, options?: AxiosRequestConfig) {
659
+ return PaymentRequestsApiFp(this.configuration).deletePaymentRequest(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
660
+ }
661
+
662
+ /**
663
+ * This will get payment request. **Required Permissions** \"payment-management.payments.view\"
664
+ * @summary Retrieve the payment request
665
+ * @param {PaymentRequestsApiGetPaymentRequestRequest} requestParameters Request parameters.
666
+ * @param {*} [options] Override http request option.
667
+ * @throws {RequiredError}
668
+ * @memberof PaymentRequestsApi
669
+ */
670
+ public getPaymentRequest(requestParameters: PaymentRequestsApiGetPaymentRequestRequest, options?: AxiosRequestConfig) {
671
+ return PaymentRequestsApiFp(this.configuration).getPaymentRequest(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
672
+ }
673
+
674
+ /**
675
+ * Retrieves a list of paymentrequests. **Required Permissions** \"payment-management.payments.view\"
676
+ * @summary List payment requests
677
+ * @param {PaymentRequestsApiListPaymentRequestsRequest} requestParameters Request parameters.
678
+ * @param {*} [options] Override http request option.
679
+ * @throws {RequiredError}
680
+ * @memberof PaymentRequestsApi
681
+ */
682
+ public listPaymentRequests(requestParameters: PaymentRequestsApiListPaymentRequestsRequest = {}, options?: AxiosRequestConfig) {
683
+ 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));
684
+ }
685
+
686
+ /**
687
+ * This will update payment request. **Required Permissions** \"payment-management.payments.update\"
688
+ * @summary Update the payment request
689
+ * @param {PaymentRequestsApiUpdatePaymentRequestRequest} requestParameters Request parameters.
690
+ * @param {*} [options] Override http request option.
691
+ * @throws {RequiredError}
692
+ * @memberof PaymentRequestsApi
693
+ */
694
+ public updatePaymentRequest(requestParameters: PaymentRequestsApiUpdatePaymentRequestRequest, options?: AxiosRequestConfig) {
695
+ return PaymentRequestsApiFp(this.configuration).updatePaymentRequest(requestParameters.code, requestParameters.updatePaymentRequestRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
696
+ }
697
+ }