@emilgroup/payment-sdk 1.4.1-beta.5 → 1.4.1-beta.6

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.
@@ -0,0 +1,476 @@
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 { CreateRefundRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateRefundResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { GetRefundResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { ListRefundsResponseClass } from '../models';
31
+ /**
32
+ * RefundsApi - axios parameter creator
33
+ * @export
34
+ */
35
+ export const RefundsApiAxiosParamCreator = function (configuration?: Configuration) {
36
+ return {
37
+ /**
38
+ *
39
+ * @param {CreateRefundRequestDto} createRefundRequestDto
40
+ * @param {string} [authorization] Bearer Token
41
+ * @param {*} [options] Override http request option.
42
+ * @throws {RequiredError}
43
+ */
44
+ createRefund: async (createRefundRequestDto: CreateRefundRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
45
+ // verify required parameter 'createRefundRequestDto' is not null or undefined
46
+ assertParamExists('createRefund', 'createRefundRequestDto', createRefundRequestDto)
47
+ const localVarPath = `/paymentservice/v1/refunds`;
48
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
49
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
50
+ let baseOptions;
51
+ let baseAccessToken;
52
+ if (configuration) {
53
+ baseOptions = configuration.baseOptions;
54
+ baseAccessToken = configuration.accessToken;
55
+ }
56
+
57
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
58
+ const localVarHeaderParameter = {} as any;
59
+ const localVarQueryParameter = {} as any;
60
+
61
+ // authentication bearer required
62
+ // http bearer authentication required
63
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
64
+
65
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
66
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
67
+ }
68
+
69
+
70
+
71
+ localVarHeaderParameter['Content-Type'] = 'application/json';
72
+
73
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
74
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
75
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
76
+ localVarRequestOptions.data = serializeDataIfNeeded(createRefundRequestDto, localVarRequestOptions, configuration)
77
+
78
+ return {
79
+ url: toPathString(localVarUrlObj),
80
+ options: localVarRequestOptions,
81
+ };
82
+ },
83
+ /**
84
+ *
85
+ * @param {string} code
86
+ * @param {string} code2 Unique identifier for the object.
87
+ * @param {string} expand Fields to expand response by
88
+ * @param {string} [authorization] Bearer Token
89
+ * @param {*} [options] Override http request option.
90
+ * @throws {RequiredError}
91
+ */
92
+ getRefund: async (code: string, code2: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
93
+ // verify required parameter 'code' is not null or undefined
94
+ assertParamExists('getRefund', 'code', code)
95
+ // verify required parameter 'code2' is not null or undefined
96
+ assertParamExists('getRefund', 'code2', code2)
97
+ // verify required parameter 'expand' is not null or undefined
98
+ assertParamExists('getRefund', 'expand', expand)
99
+ const localVarPath = `/paymentservice/v1/refunds/{code}`
100
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
101
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
102
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
103
+ let baseOptions;
104
+ let baseAccessToken;
105
+ if (configuration) {
106
+ baseOptions = configuration.baseOptions;
107
+ baseAccessToken = configuration.accessToken;
108
+ }
109
+
110
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
111
+ const localVarHeaderParameter = {} as any;
112
+ const localVarQueryParameter = {} as any;
113
+
114
+ // authentication bearer required
115
+ // http bearer authentication required
116
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
117
+
118
+ if (code2 !== undefined) {
119
+ localVarQueryParameter['code'] = code2;
120
+ }
121
+
122
+ if (expand !== undefined) {
123
+ localVarQueryParameter['expand'] = expand;
124
+ }
125
+
126
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
127
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
128
+ }
129
+
130
+
131
+
132
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
133
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
135
+
136
+ return {
137
+ url: toPathString(localVarUrlObj),
138
+ options: localVarRequestOptions,
139
+ };
140
+ },
141
+ /**
142
+ *
143
+ * @param {string} [authorization] Bearer Token
144
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
145
+ * @param {any} [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.
146
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
147
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
148
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
149
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
150
+ * @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
151
+ * @param {*} [options] Override http request option.
152
+ * @throws {RequiredError}
153
+ */
154
+ listRefunds: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
155
+ const localVarPath = `/paymentservice/v1/refunds`;
156
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
157
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
158
+ let baseOptions;
159
+ let baseAccessToken;
160
+ if (configuration) {
161
+ baseOptions = configuration.baseOptions;
162
+ baseAccessToken = configuration.accessToken;
163
+ }
164
+
165
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
166
+ const localVarHeaderParameter = {} as any;
167
+ const localVarQueryParameter = {} as any;
168
+
169
+ // authentication bearer required
170
+ // http bearer authentication required
171
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
172
+
173
+ if (pageSize !== undefined) {
174
+ localVarQueryParameter['pageSize'] = pageSize;
175
+ }
176
+
177
+ if (pageToken !== undefined) {
178
+ localVarQueryParameter['pageToken'] = pageToken;
179
+ }
180
+
181
+ if (filter !== undefined) {
182
+ localVarQueryParameter['filter'] = filter;
183
+ }
184
+
185
+ if (search !== undefined) {
186
+ localVarQueryParameter['search'] = search;
187
+ }
188
+
189
+ if (order !== undefined) {
190
+ localVarQueryParameter['order'] = order;
191
+ }
192
+
193
+ if (expand !== undefined) {
194
+ localVarQueryParameter['expand'] = expand;
195
+ }
196
+
197
+ if (filters !== undefined) {
198
+ localVarQueryParameter['filters'] = filters;
199
+ }
200
+
201
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
202
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
203
+ }
204
+
205
+
206
+
207
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
208
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
209
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
210
+
211
+ return {
212
+ url: toPathString(localVarUrlObj),
213
+ options: localVarRequestOptions,
214
+ };
215
+ },
216
+ }
217
+ };
218
+
219
+ /**
220
+ * RefundsApi - functional programming interface
221
+ * @export
222
+ */
223
+ export const RefundsApiFp = function(configuration?: Configuration) {
224
+ const localVarAxiosParamCreator = RefundsApiAxiosParamCreator(configuration)
225
+ return {
226
+ /**
227
+ *
228
+ * @param {CreateRefundRequestDto} createRefundRequestDto
229
+ * @param {string} [authorization] Bearer Token
230
+ * @param {*} [options] Override http request option.
231
+ * @throws {RequiredError}
232
+ */
233
+ async createRefund(createRefundRequestDto: CreateRefundRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateRefundResponseClass>> {
234
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createRefund(createRefundRequestDto, authorization, options);
235
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
236
+ },
237
+ /**
238
+ *
239
+ * @param {string} code
240
+ * @param {string} code2 Unique identifier for the object.
241
+ * @param {string} expand Fields to expand response by
242
+ * @param {string} [authorization] Bearer Token
243
+ * @param {*} [options] Override http request option.
244
+ * @throws {RequiredError}
245
+ */
246
+ async getRefund(code: string, code2: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetRefundResponseClass>> {
247
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRefund(code, code2, expand, authorization, options);
248
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
249
+ },
250
+ /**
251
+ *
252
+ * @param {string} [authorization] Bearer Token
253
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
254
+ * @param {any} [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.
255
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
256
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
257
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
258
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
259
+ * @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ */
263
+ async listRefunds(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListRefundsResponseClass>> {
264
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listRefunds(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
265
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
266
+ },
267
+ }
268
+ };
269
+
270
+ /**
271
+ * RefundsApi - factory interface
272
+ * @export
273
+ */
274
+ export const RefundsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
275
+ const localVarFp = RefundsApiFp(configuration)
276
+ return {
277
+ /**
278
+ *
279
+ * @param {CreateRefundRequestDto} createRefundRequestDto
280
+ * @param {string} [authorization] Bearer Token
281
+ * @param {*} [options] Override http request option.
282
+ * @throws {RequiredError}
283
+ */
284
+ createRefund(createRefundRequestDto: CreateRefundRequestDto, authorization?: string, options?: any): AxiosPromise<CreateRefundResponseClass> {
285
+ return localVarFp.createRefund(createRefundRequestDto, authorization, options).then((request) => request(axios, basePath));
286
+ },
287
+ /**
288
+ *
289
+ * @param {string} code
290
+ * @param {string} code2 Unique identifier for the object.
291
+ * @param {string} expand Fields to expand response by
292
+ * @param {string} [authorization] Bearer Token
293
+ * @param {*} [options] Override http request option.
294
+ * @throws {RequiredError}
295
+ */
296
+ getRefund(code: string, code2: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetRefundResponseClass> {
297
+ return localVarFp.getRefund(code, code2, expand, authorization, options).then((request) => request(axios, basePath));
298
+ },
299
+ /**
300
+ *
301
+ * @param {string} [authorization] Bearer Token
302
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
303
+ * @param {any} [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.
304
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
305
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
306
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
307
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
308
+ * @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
309
+ * @param {*} [options] Override http request option.
310
+ * @throws {RequiredError}
311
+ */
312
+ listRefunds(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<ListRefundsResponseClass> {
313
+ return localVarFp.listRefunds(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
314
+ },
315
+ };
316
+ };
317
+
318
+ /**
319
+ * Request parameters for createRefund operation in RefundsApi.
320
+ * @export
321
+ * @interface RefundsApiCreateRefundRequest
322
+ */
323
+ export interface RefundsApiCreateRefundRequest {
324
+ /**
325
+ *
326
+ * @type {CreateRefundRequestDto}
327
+ * @memberof RefundsApiCreateRefund
328
+ */
329
+ readonly createRefundRequestDto: CreateRefundRequestDto
330
+
331
+ /**
332
+ * Bearer Token
333
+ * @type {string}
334
+ * @memberof RefundsApiCreateRefund
335
+ */
336
+ readonly authorization?: string
337
+ }
338
+
339
+ /**
340
+ * Request parameters for getRefund operation in RefundsApi.
341
+ * @export
342
+ * @interface RefundsApiGetRefundRequest
343
+ */
344
+ export interface RefundsApiGetRefundRequest {
345
+ /**
346
+ *
347
+ * @type {string}
348
+ * @memberof RefundsApiGetRefund
349
+ */
350
+ readonly code: string
351
+
352
+ /**
353
+ * Unique identifier for the object.
354
+ * @type {string}
355
+ * @memberof RefundsApiGetRefund
356
+ */
357
+ readonly code2: string
358
+
359
+ /**
360
+ * Fields to expand response by
361
+ * @type {string}
362
+ * @memberof RefundsApiGetRefund
363
+ */
364
+ readonly expand: string
365
+
366
+ /**
367
+ * Bearer Token
368
+ * @type {string}
369
+ * @memberof RefundsApiGetRefund
370
+ */
371
+ readonly authorization?: string
372
+ }
373
+
374
+ /**
375
+ * Request parameters for listRefunds operation in RefundsApi.
376
+ * @export
377
+ * @interface RefundsApiListRefundsRequest
378
+ */
379
+ export interface RefundsApiListRefundsRequest {
380
+ /**
381
+ * Bearer Token
382
+ * @type {string}
383
+ * @memberof RefundsApiListRefunds
384
+ */
385
+ readonly authorization?: string
386
+
387
+ /**
388
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
389
+ * @type {any}
390
+ * @memberof RefundsApiListRefunds
391
+ */
392
+ readonly pageSize?: any
393
+
394
+ /**
395
+ * 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.
396
+ * @type {any}
397
+ * @memberof RefundsApiListRefunds
398
+ */
399
+ readonly pageToken?: any
400
+
401
+ /**
402
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
403
+ * @type {any}
404
+ * @memberof RefundsApiListRefunds
405
+ */
406
+ readonly filter?: any
407
+
408
+ /**
409
+ * Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
410
+ * @type {any}
411
+ * @memberof RefundsApiListRefunds
412
+ */
413
+ readonly search?: any
414
+
415
+ /**
416
+ * The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
417
+ * @type {any}
418
+ * @memberof RefundsApiListRefunds
419
+ */
420
+ readonly order?: any
421
+
422
+ /**
423
+ * Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
424
+ * @type {any}
425
+ * @memberof RefundsApiListRefunds
426
+ */
427
+ readonly expand?: any
428
+
429
+ /**
430
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
431
+ * @type {any}
432
+ * @memberof RefundsApiListRefunds
433
+ */
434
+ readonly filters?: any
435
+ }
436
+
437
+ /**
438
+ * RefundsApi - object-oriented interface
439
+ * @export
440
+ * @class RefundsApi
441
+ * @extends {BaseAPI}
442
+ */
443
+ export class RefundsApi extends BaseAPI {
444
+ /**
445
+ *
446
+ * @param {RefundsApiCreateRefundRequest} requestParameters Request parameters.
447
+ * @param {*} [options] Override http request option.
448
+ * @throws {RequiredError}
449
+ * @memberof RefundsApi
450
+ */
451
+ public createRefund(requestParameters: RefundsApiCreateRefundRequest, options?: AxiosRequestConfig) {
452
+ return RefundsApiFp(this.configuration).createRefund(requestParameters.createRefundRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
453
+ }
454
+
455
+ /**
456
+ *
457
+ * @param {RefundsApiGetRefundRequest} requestParameters Request parameters.
458
+ * @param {*} [options] Override http request option.
459
+ * @throws {RequiredError}
460
+ * @memberof RefundsApi
461
+ */
462
+ public getRefund(requestParameters: RefundsApiGetRefundRequest, options?: AxiosRequestConfig) {
463
+ return RefundsApiFp(this.configuration).getRefund(requestParameters.code, requestParameters.code2, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
464
+ }
465
+
466
+ /**
467
+ *
468
+ * @param {RefundsApiListRefundsRequest} requestParameters Request parameters.
469
+ * @param {*} [options] Override http request option.
470
+ * @throws {RequiredError}
471
+ * @memberof RefundsApi
472
+ */
473
+ public listRefunds(requestParameters: RefundsApiListRefundsRequest = {}, options?: AxiosRequestConfig) {
474
+ return RefundsApiFp(this.configuration).listRefunds(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
475
+ }
476
+ }
package/api.ts CHANGED
@@ -27,6 +27,7 @@ import { PaymentMethodsApi } from './api';
27
27
  import { PaymentRemindersApi } from './api';
28
28
  import { PaymentSetupApi } from './api';
29
29
  import { PaymentsApi } from './api';
30
+ import { RefundsApi } from './api';
30
31
  import { TenantBankAccountApi } from './api';
31
32
  import { WebhooksApi } from './api';
32
33
 
@@ -38,6 +39,7 @@ export * from './api/payment-methods-api';
38
39
  export * from './api/payment-reminders-api';
39
40
  export * from './api/payment-setup-api';
40
41
  export * from './api/payments-api';
42
+ export * from './api/refunds-api';
41
43
  export * from './api/tenant-bank-account-api';
42
44
  export * from './api/webhooks-api';
43
45
 
@@ -38,6 +38,15 @@ export declare const BankTransactionApiAxiosParamCreator: (configuration?: Confi
38
38
  * @throws {RequiredError}
39
39
  */
40
40
  importBankTransactions: (authorization?: string, file?: any, options?: AxiosRequestConfig) => Promise<RequestArgs>;
41
+ /**
42
+ * Links a bank transaction with an invoice
43
+ * @summary Link Bank Transaction
44
+ * @param {string} code Code of the bank transaction to link
45
+ * @param {string} [authorization] Bearer Token
46
+ * @param {*} [options] Override http request option.
47
+ * @throws {RequiredError}
48
+ */
49
+ linkBankTransaction: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
41
50
  /**
42
51
  * Returns a list of bank transactions you have previously created. The bank transactions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
43
52
  * @summary List bank transactions
@@ -53,6 +62,15 @@ export declare const BankTransactionApiAxiosParamCreator: (configuration?: Confi
53
62
  * @throws {RequiredError}
54
63
  */
55
64
  listBankTransactions: (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: string, filters?: any, options?: AxiosRequestConfig) => Promise<RequestArgs>;
65
+ /**
66
+ * Unlinks an already linked bank transaction
67
+ * @summary Unlink Bank Transaction
68
+ * @param {string} code Code of the bank transaction to unlink
69
+ * @param {string} [authorization] Bearer Token
70
+ * @param {*} [options] Override http request option.
71
+ * @throws {RequiredError}
72
+ */
73
+ unlinkBankTransaction: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
56
74
  };
57
75
  /**
58
76
  * BankTransactionApi - functional programming interface
@@ -78,6 +96,15 @@ export declare const BankTransactionApiFp: (configuration?: Configuration) => {
78
96
  * @throws {RequiredError}
79
97
  */
80
98
  importBankTransactions(authorization?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBankTransactionsResponseClass>>;
99
+ /**
100
+ * Links a bank transaction with an invoice
101
+ * @summary Link Bank Transaction
102
+ * @param {string} code Code of the bank transaction to link
103
+ * @param {string} [authorization] Bearer Token
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ linkBankTransaction(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBankTransactionsResponseClass>>;
81
108
  /**
82
109
  * Returns a list of bank transactions you have previously created. The bank transactions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
83
110
  * @summary List bank transactions
@@ -93,6 +120,15 @@ export declare const BankTransactionApiFp: (configuration?: Configuration) => {
93
120
  * @throws {RequiredError}
94
121
  */
95
122
  listBankTransactions(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: string, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
123
+ /**
124
+ * Unlinks an already linked bank transaction
125
+ * @summary Unlink Bank Transaction
126
+ * @param {string} code Code of the bank transaction to unlink
127
+ * @param {string} [authorization] Bearer Token
128
+ * @param {*} [options] Override http request option.
129
+ * @throws {RequiredError}
130
+ */
131
+ unlinkBankTransaction(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBankTransactionsResponseClass>>;
96
132
  };
97
133
  /**
98
134
  * BankTransactionApi - factory interface
@@ -118,6 +154,15 @@ export declare const BankTransactionApiFactory: (configuration?: Configuration,
118
154
  * @throws {RequiredError}
119
155
  */
120
156
  importBankTransactions(authorization?: string, file?: any, options?: any): AxiosPromise<ListBankTransactionsResponseClass>;
157
+ /**
158
+ * Links a bank transaction with an invoice
159
+ * @summary Link Bank Transaction
160
+ * @param {string} code Code of the bank transaction to link
161
+ * @param {string} [authorization] Bearer Token
162
+ * @param {*} [options] Override http request option.
163
+ * @throws {RequiredError}
164
+ */
165
+ linkBankTransaction(code: string, authorization?: string, options?: any): AxiosPromise<GetBankTransactionsResponseClass>;
121
166
  /**
122
167
  * Returns a list of bank transactions you have previously created. The bank transactions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
123
168
  * @summary List bank transactions
@@ -133,6 +178,15 @@ export declare const BankTransactionApiFactory: (configuration?: Configuration,
133
178
  * @throws {RequiredError}
134
179
  */
135
180
  listBankTransactions(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: string, filters?: any, options?: any): AxiosPromise<void>;
181
+ /**
182
+ * Unlinks an already linked bank transaction
183
+ * @summary Unlink Bank Transaction
184
+ * @param {string} code Code of the bank transaction to unlink
185
+ * @param {string} [authorization] Bearer Token
186
+ * @param {*} [options] Override http request option.
187
+ * @throws {RequiredError}
188
+ */
189
+ unlinkBankTransaction(code: string, authorization?: string, options?: any): AxiosPromise<GetBankTransactionsResponseClass>;
136
190
  };
137
191
  /**
138
192
  * Request parameters for getBankTransaction operation in BankTransactionApi.
@@ -178,6 +232,25 @@ export interface BankTransactionApiImportBankTransactionsRequest {
178
232
  */
179
233
  readonly file?: any;
180
234
  }
235
+ /**
236
+ * Request parameters for linkBankTransaction operation in BankTransactionApi.
237
+ * @export
238
+ * @interface BankTransactionApiLinkBankTransactionRequest
239
+ */
240
+ export interface BankTransactionApiLinkBankTransactionRequest {
241
+ /**
242
+ * Code of the bank transaction to link
243
+ * @type {string}
244
+ * @memberof BankTransactionApiLinkBankTransaction
245
+ */
246
+ readonly code: string;
247
+ /**
248
+ * Bearer Token
249
+ * @type {string}
250
+ * @memberof BankTransactionApiLinkBankTransaction
251
+ */
252
+ readonly authorization?: string;
253
+ }
181
254
  /**
182
255
  * Request parameters for listBankTransactions operation in BankTransactionApi.
183
256
  * @export
@@ -233,6 +306,25 @@ export interface BankTransactionApiListBankTransactionsRequest {
233
306
  */
234
307
  readonly filters?: any;
235
308
  }
309
+ /**
310
+ * Request parameters for unlinkBankTransaction operation in BankTransactionApi.
311
+ * @export
312
+ * @interface BankTransactionApiUnlinkBankTransactionRequest
313
+ */
314
+ export interface BankTransactionApiUnlinkBankTransactionRequest {
315
+ /**
316
+ * Code of the bank transaction to unlink
317
+ * @type {string}
318
+ * @memberof BankTransactionApiUnlinkBankTransaction
319
+ */
320
+ readonly code: string;
321
+ /**
322
+ * Bearer Token
323
+ * @type {string}
324
+ * @memberof BankTransactionApiUnlinkBankTransaction
325
+ */
326
+ readonly authorization?: string;
327
+ }
236
328
  /**
237
329
  * BankTransactionApi - object-oriented interface
238
330
  * @export
@@ -258,6 +350,15 @@ export declare class BankTransactionApi extends BaseAPI {
258
350
  * @memberof BankTransactionApi
259
351
  */
260
352
  importBankTransactions(requestParameters?: BankTransactionApiImportBankTransactionsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListBankTransactionsResponseClass, any>>;
353
+ /**
354
+ * Links a bank transaction with an invoice
355
+ * @summary Link Bank Transaction
356
+ * @param {BankTransactionApiLinkBankTransactionRequest} requestParameters Request parameters.
357
+ * @param {*} [options] Override http request option.
358
+ * @throws {RequiredError}
359
+ * @memberof BankTransactionApi
360
+ */
361
+ linkBankTransaction(requestParameters: BankTransactionApiLinkBankTransactionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetBankTransactionsResponseClass, any>>;
261
362
  /**
262
363
  * Returns a list of bank transactions you have previously created. The bank transactions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
263
364
  * @summary List bank transactions
@@ -267,4 +368,13 @@ export declare class BankTransactionApi extends BaseAPI {
267
368
  * @memberof BankTransactionApi
268
369
  */
269
370
  listBankTransactions(requestParameters?: BankTransactionApiListBankTransactionsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
371
+ /**
372
+ * Unlinks an already linked bank transaction
373
+ * @summary Unlink Bank Transaction
374
+ * @param {BankTransactionApiUnlinkBankTransactionRequest} requestParameters Request parameters.
375
+ * @param {*} [options] Override http request option.
376
+ * @throws {RequiredError}
377
+ * @memberof BankTransactionApi
378
+ */
379
+ unlinkBankTransaction(requestParameters: BankTransactionApiUnlinkBankTransactionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetBankTransactionsResponseClass, any>>;
270
380
  }