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

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 (138) hide show
  1. package/.openapi-generator/FILES +35 -0
  2. package/README.md +2 -2
  3. package/api/bank-accounts-api.ts +20 -16
  4. package/api/bank-transaction-api.ts +204 -2
  5. package/api/payment-methods-api.ts +41 -37
  6. package/api/payment-reminders-api.ts +12 -8
  7. package/api/payment-setup-api.ts +36 -28
  8. package/api/payments-api.ts +27 -25
  9. package/api/refunds-api.ts +474 -0
  10. package/api.ts +2 -0
  11. package/dist/api/bank-accounts-api.d.ts +14 -12
  12. package/dist/api/bank-accounts-api.js +12 -12
  13. package/dist/api/bank-transaction-api.d.ts +113 -3
  14. package/dist/api/bank-transaction-api.js +184 -0
  15. package/dist/api/payment-methods-api.d.ts +31 -27
  16. package/dist/api/payment-methods-api.js +24 -28
  17. package/dist/api/payment-reminders-api.d.ts +14 -12
  18. package/dist/api/payment-setup-api.d.ts +22 -18
  19. package/dist/api/payment-setup-api.js +24 -24
  20. package/dist/api/payments-api.d.ts +24 -21
  21. package/dist/api/payments-api.js +12 -16
  22. package/dist/api/refunds-api.d.ts +269 -0
  23. package/dist/api/refunds-api.js +447 -0
  24. package/dist/api.d.ts +1 -0
  25. package/dist/api.js +1 -0
  26. package/dist/models/bank-account-class.d.ts +54 -0
  27. package/dist/models/bank-account-class.js +15 -0
  28. package/dist/models/billing-profile-dto.d.ts +38 -0
  29. package/dist/models/billing-profile-dto.js +15 -0
  30. package/dist/models/billing-profile-limited-response-dto.d.ts +54 -0
  31. package/dist/models/billing-profile-limited-response-dto.js +15 -0
  32. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
  33. package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
  34. package/dist/models/complete-payment-setup-request-dto.d.ts +32 -0
  35. package/dist/models/complete-payment-setup-request-dto.js +15 -0
  36. package/dist/models/complete-payment-setup-response-class.d.ts +25 -0
  37. package/dist/models/complete-payment-setup-response-class.js +15 -0
  38. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +60 -0
  39. package/dist/models/complete-stripe-payment-setup-request-dto.js +15 -0
  40. package/dist/models/create-bank-account-request-dto.d.ts +30 -0
  41. package/dist/models/create-bank-account-request-dto.js +15 -0
  42. package/dist/models/create-payment-method-response-class.d.ts +25 -0
  43. package/dist/models/create-payment-method-response-class.js +15 -0
  44. package/dist/models/create-payment-request-dto.d.ts +3 -3
  45. package/dist/models/create-payment-response-class.d.ts +25 -0
  46. package/dist/models/create-payment-response-class.js +15 -0
  47. package/dist/models/create-psp-payment-method-request-dto.d.ts +61 -0
  48. package/dist/models/create-psp-payment-method-request-dto.js +32 -0
  49. package/dist/models/create-refund-request-dto.d.ts +24 -0
  50. package/dist/models/create-refund-request-dto.js +15 -0
  51. package/dist/models/create-refund-response-class.d.ts +25 -0
  52. package/dist/models/create-refund-response-class.js +15 -0
  53. package/dist/models/deactivate-payment-reminder-response-class.d.ts +25 -0
  54. package/dist/models/deactivate-payment-reminder-response-class.js +15 -0
  55. package/dist/models/get-payment-method-response-class.d.ts +25 -0
  56. package/dist/models/get-payment-method-response-class.js +15 -0
  57. package/dist/models/get-payment-response-class.d.ts +25 -0
  58. package/dist/models/get-payment-response-class.js +15 -0
  59. package/dist/models/get-refund-response-class.d.ts +25 -0
  60. package/dist/models/get-refund-response-class.js +15 -0
  61. package/dist/models/get-request-dto.d.ts +1 -1
  62. package/dist/models/index.d.ts +34 -0
  63. package/dist/models/index.js +34 -0
  64. package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +30 -0
  65. package/dist/models/initiate-braintree-payment-setup-request-dto.js +15 -0
  66. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +24 -0
  67. package/dist/models/initiate-braintree-payment-setup-response-class.js +15 -0
  68. package/dist/models/initiate-payment-setup-request-dto.d.ts +44 -0
  69. package/dist/models/initiate-payment-setup-request-dto.js +15 -0
  70. package/dist/models/initiate-payment-setup-response-class.d.ts +32 -0
  71. package/dist/models/initiate-payment-setup-response-class.js +15 -0
  72. package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +30 -0
  73. package/dist/models/initiate-stripe-payment-setup-request-dto.js +15 -0
  74. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +30 -0
  75. package/dist/models/initiate-stripe-payment-setup-response-class.js +15 -0
  76. package/dist/models/list-bank-accounts-response-class.d.ts +31 -0
  77. package/dist/models/list-bank-accounts-response-class.js +15 -0
  78. package/dist/models/list-payment-methods-response-class.d.ts +31 -0
  79. package/dist/models/list-payment-methods-response-class.js +15 -0
  80. package/dist/models/list-payment-reminders-response-class.d.ts +31 -0
  81. package/dist/models/list-payment-reminders-response-class.js +15 -0
  82. package/dist/models/list-payments-response-class.d.ts +31 -0
  83. package/dist/models/list-payments-response-class.js +15 -0
  84. package/dist/models/list-refunds-response-class.d.ts +31 -0
  85. package/dist/models/list-refunds-response-class.js +15 -0
  86. package/dist/models/payment-class.d.ts +103 -0
  87. package/dist/models/payment-class.js +15 -0
  88. package/dist/models/payment-method-class.d.ts +66 -0
  89. package/dist/models/payment-method-class.js +15 -0
  90. package/dist/models/payment-reminder-class.d.ts +112 -0
  91. package/dist/models/payment-reminder-class.js +36 -0
  92. package/dist/models/refund-class.d.ts +104 -0
  93. package/dist/models/refund-class.js +28 -0
  94. package/dist/models/sepa-direct-dto.d.ts +24 -0
  95. package/dist/models/sepa-direct-dto.js +15 -0
  96. package/dist/models/symphony-profile-limited-response-dto.d.ts +42 -0
  97. package/dist/models/symphony-profile-limited-response-dto.js +15 -0
  98. package/dist/models/validate-pspconfig-request-dto.d.ts +8 -1
  99. package/dist/models/validate-pspconfig-request-dto.js +7 -0
  100. package/models/bank-account-class.ts +60 -0
  101. package/models/billing-profile-dto.ts +44 -0
  102. package/models/billing-profile-limited-response-dto.ts +60 -0
  103. package/models/complete-braintree-payment-setup-request-dto.ts +54 -0
  104. package/models/complete-payment-setup-request-dto.ts +38 -0
  105. package/models/complete-payment-setup-response-class.ts +31 -0
  106. package/models/complete-stripe-payment-setup-request-dto.ts +66 -0
  107. package/models/create-bank-account-request-dto.ts +36 -0
  108. package/models/create-payment-method-response-class.ts +31 -0
  109. package/models/create-payment-request-dto.ts +3 -3
  110. package/models/create-payment-response-class.ts +31 -0
  111. package/models/create-psp-payment-method-request-dto.ts +70 -0
  112. package/models/create-refund-request-dto.ts +30 -0
  113. package/models/create-refund-response-class.ts +31 -0
  114. package/models/deactivate-payment-reminder-response-class.ts +31 -0
  115. package/models/get-payment-method-response-class.ts +31 -0
  116. package/models/get-payment-response-class.ts +31 -0
  117. package/models/get-refund-response-class.ts +31 -0
  118. package/models/get-request-dto.ts +1 -1
  119. package/models/index.ts +34 -0
  120. package/models/initiate-braintree-payment-setup-request-dto.ts +36 -0
  121. package/models/initiate-braintree-payment-setup-response-class.ts +30 -0
  122. package/models/initiate-payment-setup-request-dto.ts +50 -0
  123. package/models/initiate-payment-setup-response-class.ts +38 -0
  124. package/models/initiate-stripe-payment-setup-request-dto.ts +36 -0
  125. package/models/initiate-stripe-payment-setup-response-class.ts +36 -0
  126. package/models/list-bank-accounts-response-class.ts +37 -0
  127. package/models/list-payment-methods-response-class.ts +37 -0
  128. package/models/list-payment-reminders-response-class.ts +37 -0
  129. package/models/list-payments-response-class.ts +37 -0
  130. package/models/list-refunds-response-class.ts +37 -0
  131. package/models/payment-class.ts +109 -0
  132. package/models/payment-method-class.ts +72 -0
  133. package/models/payment-reminder-class.ts +122 -0
  134. package/models/refund-class.ts +114 -0
  135. package/models/sepa-direct-dto.ts +30 -0
  136. package/models/symphony-profile-limited-response-dto.ts +48 -0
  137. package/models/validate-pspconfig-request-dto.ts +11 -1
  138. package/package.json +1 -1
@@ -0,0 +1,474 @@
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} [authorization] Bearer Token
88
+ * @param {string} [expand] Fields to expand response by
89
+ * @param {*} [options] Override http request option.
90
+ * @throws {RequiredError}
91
+ */
92
+ getRefund: async (code: string, code2: string, authorization?: string, expand?: 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
+ const localVarPath = `/paymentservice/v1/refunds/{code}`
98
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
99
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
100
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
101
+ let baseOptions;
102
+ let baseAccessToken;
103
+ if (configuration) {
104
+ baseOptions = configuration.baseOptions;
105
+ baseAccessToken = configuration.accessToken;
106
+ }
107
+
108
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
109
+ const localVarHeaderParameter = {} as any;
110
+ const localVarQueryParameter = {} as any;
111
+
112
+ // authentication bearer required
113
+ // http bearer authentication required
114
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
115
+
116
+ if (code2 !== undefined) {
117
+ localVarQueryParameter['code'] = code2;
118
+ }
119
+
120
+ if (expand !== undefined) {
121
+ localVarQueryParameter['expand'] = expand;
122
+ }
123
+
124
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
125
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
126
+ }
127
+
128
+
129
+
130
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
131
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
132
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
133
+
134
+ return {
135
+ url: toPathString(localVarUrlObj),
136
+ options: localVarRequestOptions,
137
+ };
138
+ },
139
+ /**
140
+ *
141
+ * @param {string} [authorization] Bearer Token
142
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
143
+ * @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.
144
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
145
+ * @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.
146
+ * @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.
147
+ * @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.
148
+ * @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.
149
+ * @param {*} [options] Override http request option.
150
+ * @throws {RequiredError}
151
+ */
152
+ listRefunds: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
153
+ const localVarPath = `/paymentservice/v1/refunds`;
154
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
155
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
156
+ let baseOptions;
157
+ let baseAccessToken;
158
+ if (configuration) {
159
+ baseOptions = configuration.baseOptions;
160
+ baseAccessToken = configuration.accessToken;
161
+ }
162
+
163
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
164
+ const localVarHeaderParameter = {} as any;
165
+ const localVarQueryParameter = {} as any;
166
+
167
+ // authentication bearer required
168
+ // http bearer authentication required
169
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
170
+
171
+ if (pageSize !== undefined) {
172
+ localVarQueryParameter['pageSize'] = pageSize;
173
+ }
174
+
175
+ if (pageToken !== undefined) {
176
+ localVarQueryParameter['pageToken'] = pageToken;
177
+ }
178
+
179
+ if (filter !== undefined) {
180
+ localVarQueryParameter['filter'] = filter;
181
+ }
182
+
183
+ if (search !== undefined) {
184
+ localVarQueryParameter['search'] = search;
185
+ }
186
+
187
+ if (order !== undefined) {
188
+ localVarQueryParameter['order'] = order;
189
+ }
190
+
191
+ if (expand !== undefined) {
192
+ localVarQueryParameter['expand'] = expand;
193
+ }
194
+
195
+ if (filters !== undefined) {
196
+ localVarQueryParameter['filters'] = filters;
197
+ }
198
+
199
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
200
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
201
+ }
202
+
203
+
204
+
205
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
206
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
207
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
208
+
209
+ return {
210
+ url: toPathString(localVarUrlObj),
211
+ options: localVarRequestOptions,
212
+ };
213
+ },
214
+ }
215
+ };
216
+
217
+ /**
218
+ * RefundsApi - functional programming interface
219
+ * @export
220
+ */
221
+ export const RefundsApiFp = function(configuration?: Configuration) {
222
+ const localVarAxiosParamCreator = RefundsApiAxiosParamCreator(configuration)
223
+ return {
224
+ /**
225
+ *
226
+ * @param {CreateRefundRequestDto} createRefundRequestDto
227
+ * @param {string} [authorization] Bearer Token
228
+ * @param {*} [options] Override http request option.
229
+ * @throws {RequiredError}
230
+ */
231
+ async createRefund(createRefundRequestDto: CreateRefundRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateRefundResponseClass>> {
232
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createRefund(createRefundRequestDto, authorization, options);
233
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
234
+ },
235
+ /**
236
+ *
237
+ * @param {string} code
238
+ * @param {string} code2 Unique identifier for the object.
239
+ * @param {string} [authorization] Bearer Token
240
+ * @param {string} [expand] Fields to expand response by
241
+ * @param {*} [options] Override http request option.
242
+ * @throws {RequiredError}
243
+ */
244
+ async getRefund(code: string, code2: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetRefundResponseClass>> {
245
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRefund(code, code2, authorization, expand, options);
246
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
247
+ },
248
+ /**
249
+ *
250
+ * @param {string} [authorization] Bearer Token
251
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
252
+ * @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.
253
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
254
+ * @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.
255
+ * @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.
256
+ * @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.
257
+ * @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.
258
+ * @param {*} [options] Override http request option.
259
+ * @throws {RequiredError}
260
+ */
261
+ 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>> {
262
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listRefunds(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
263
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
264
+ },
265
+ }
266
+ };
267
+
268
+ /**
269
+ * RefundsApi - factory interface
270
+ * @export
271
+ */
272
+ export const RefundsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
273
+ const localVarFp = RefundsApiFp(configuration)
274
+ return {
275
+ /**
276
+ *
277
+ * @param {CreateRefundRequestDto} createRefundRequestDto
278
+ * @param {string} [authorization] Bearer Token
279
+ * @param {*} [options] Override http request option.
280
+ * @throws {RequiredError}
281
+ */
282
+ createRefund(createRefundRequestDto: CreateRefundRequestDto, authorization?: string, options?: any): AxiosPromise<CreateRefundResponseClass> {
283
+ return localVarFp.createRefund(createRefundRequestDto, authorization, options).then((request) => request(axios, basePath));
284
+ },
285
+ /**
286
+ *
287
+ * @param {string} code
288
+ * @param {string} code2 Unique identifier for the object.
289
+ * @param {string} [authorization] Bearer Token
290
+ * @param {string} [expand] Fields to expand response by
291
+ * @param {*} [options] Override http request option.
292
+ * @throws {RequiredError}
293
+ */
294
+ getRefund(code: string, code2: string, authorization?: string, expand?: string, options?: any): AxiosPromise<GetRefundResponseClass> {
295
+ return localVarFp.getRefund(code, code2, authorization, expand, options).then((request) => request(axios, basePath));
296
+ },
297
+ /**
298
+ *
299
+ * @param {string} [authorization] Bearer Token
300
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
301
+ * @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.
302
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
303
+ * @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.
304
+ * @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.
305
+ * @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.
306
+ * @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.
307
+ * @param {*} [options] Override http request option.
308
+ * @throws {RequiredError}
309
+ */
310
+ listRefunds(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<ListRefundsResponseClass> {
311
+ return localVarFp.listRefunds(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
312
+ },
313
+ };
314
+ };
315
+
316
+ /**
317
+ * Request parameters for createRefund operation in RefundsApi.
318
+ * @export
319
+ * @interface RefundsApiCreateRefundRequest
320
+ */
321
+ export interface RefundsApiCreateRefundRequest {
322
+ /**
323
+ *
324
+ * @type {CreateRefundRequestDto}
325
+ * @memberof RefundsApiCreateRefund
326
+ */
327
+ readonly createRefundRequestDto: CreateRefundRequestDto
328
+
329
+ /**
330
+ * Bearer Token
331
+ * @type {string}
332
+ * @memberof RefundsApiCreateRefund
333
+ */
334
+ readonly authorization?: string
335
+ }
336
+
337
+ /**
338
+ * Request parameters for getRefund operation in RefundsApi.
339
+ * @export
340
+ * @interface RefundsApiGetRefundRequest
341
+ */
342
+ export interface RefundsApiGetRefundRequest {
343
+ /**
344
+ *
345
+ * @type {string}
346
+ * @memberof RefundsApiGetRefund
347
+ */
348
+ readonly code: string
349
+
350
+ /**
351
+ * Unique identifier for the object.
352
+ * @type {string}
353
+ * @memberof RefundsApiGetRefund
354
+ */
355
+ readonly code2: string
356
+
357
+ /**
358
+ * Bearer Token
359
+ * @type {string}
360
+ * @memberof RefundsApiGetRefund
361
+ */
362
+ readonly authorization?: string
363
+
364
+ /**
365
+ * Fields to expand response by
366
+ * @type {string}
367
+ * @memberof RefundsApiGetRefund
368
+ */
369
+ readonly expand?: string
370
+ }
371
+
372
+ /**
373
+ * Request parameters for listRefunds operation in RefundsApi.
374
+ * @export
375
+ * @interface RefundsApiListRefundsRequest
376
+ */
377
+ export interface RefundsApiListRefundsRequest {
378
+ /**
379
+ * Bearer Token
380
+ * @type {string}
381
+ * @memberof RefundsApiListRefunds
382
+ */
383
+ readonly authorization?: string
384
+
385
+ /**
386
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
387
+ * @type {any}
388
+ * @memberof RefundsApiListRefunds
389
+ */
390
+ readonly pageSize?: any
391
+
392
+ /**
393
+ * 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.
394
+ * @type {any}
395
+ * @memberof RefundsApiListRefunds
396
+ */
397
+ readonly pageToken?: any
398
+
399
+ /**
400
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
401
+ * @type {any}
402
+ * @memberof RefundsApiListRefunds
403
+ */
404
+ readonly filter?: any
405
+
406
+ /**
407
+ * 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.
408
+ * @type {any}
409
+ * @memberof RefundsApiListRefunds
410
+ */
411
+ readonly search?: any
412
+
413
+ /**
414
+ * 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.
415
+ * @type {any}
416
+ * @memberof RefundsApiListRefunds
417
+ */
418
+ readonly order?: any
419
+
420
+ /**
421
+ * 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.
422
+ * @type {any}
423
+ * @memberof RefundsApiListRefunds
424
+ */
425
+ readonly expand?: any
426
+
427
+ /**
428
+ * 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.
429
+ * @type {any}
430
+ * @memberof RefundsApiListRefunds
431
+ */
432
+ readonly filters?: any
433
+ }
434
+
435
+ /**
436
+ * RefundsApi - object-oriented interface
437
+ * @export
438
+ * @class RefundsApi
439
+ * @extends {BaseAPI}
440
+ */
441
+ export class RefundsApi extends BaseAPI {
442
+ /**
443
+ *
444
+ * @param {RefundsApiCreateRefundRequest} requestParameters Request parameters.
445
+ * @param {*} [options] Override http request option.
446
+ * @throws {RequiredError}
447
+ * @memberof RefundsApi
448
+ */
449
+ public createRefund(requestParameters: RefundsApiCreateRefundRequest, options?: AxiosRequestConfig) {
450
+ return RefundsApiFp(this.configuration).createRefund(requestParameters.createRefundRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
451
+ }
452
+
453
+ /**
454
+ *
455
+ * @param {RefundsApiGetRefundRequest} requestParameters Request parameters.
456
+ * @param {*} [options] Override http request option.
457
+ * @throws {RequiredError}
458
+ * @memberof RefundsApi
459
+ */
460
+ public getRefund(requestParameters: RefundsApiGetRefundRequest, options?: AxiosRequestConfig) {
461
+ return RefundsApiFp(this.configuration).getRefund(requestParameters.code, requestParameters.code2, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
462
+ }
463
+
464
+ /**
465
+ *
466
+ * @param {RefundsApiListRefundsRequest} requestParameters Request parameters.
467
+ * @param {*} [options] Override http request option.
468
+ * @throws {RequiredError}
469
+ * @memberof RefundsApi
470
+ */
471
+ public listRefunds(requestParameters: RefundsApiListRefundsRequest = {}, options?: AxiosRequestConfig) {
472
+ 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));
473
+ }
474
+ }
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
 
@@ -12,6 +12,8 @@
12
12
  import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
13
  import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
+ import { CreateBankAccountRequestDto } from '../models';
16
+ import { ListBankAccountsResponseClass } from '../models';
15
17
  /**
16
18
  * BankAccountsApi - axios parameter creator
17
19
  * @export
@@ -20,12 +22,12 @@ export declare const BankAccountsApiAxiosParamCreator: (configuration?: Configur
20
22
  /**
21
23
  * Creates a bank account for a specified account.
22
24
  * @summary Create a bank account
23
- * @param {object} body
25
+ * @param {CreateBankAccountRequestDto} createBankAccountRequestDto
24
26
  * @param {string} [authorization] Bearer Token
25
27
  * @param {*} [options] Override http request option.
26
28
  * @throws {RequiredError}
27
29
  */
28
- createBankAccount: (body: object, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
30
+ createBankAccount: (createBankAccountRequestDto: CreateBankAccountRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
29
31
  /**
30
32
  * Returns a list of bank accounts you’ve previously created. The bank accounts are returned in sorted order, with the oldest payment appearing first. For more information about pagination, read the Pagination documentation.
31
33
  * @summary List bank accounts
@@ -50,12 +52,12 @@ export declare const BankAccountsApiFp: (configuration?: Configuration) => {
50
52
  /**
51
53
  * Creates a bank account for a specified account.
52
54
  * @summary Create a bank account
53
- * @param {object} body
55
+ * @param {CreateBankAccountRequestDto} createBankAccountRequestDto
54
56
  * @param {string} [authorization] Bearer Token
55
57
  * @param {*} [options] Override http request option.
56
58
  * @throws {RequiredError}
57
59
  */
58
- createBankAccount(body: object, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
60
+ createBankAccount(createBankAccountRequestDto: CreateBankAccountRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
59
61
  /**
60
62
  * Returns a list of bank accounts you’ve previously created. The bank accounts are returned in sorted order, with the oldest payment appearing first. For more information about pagination, read the Pagination documentation.
61
63
  * @summary List bank accounts
@@ -70,7 +72,7 @@ export declare const BankAccountsApiFp: (configuration?: Configuration) => {
70
72
  * @param {*} [options] Override http request option.
71
73
  * @throws {RequiredError}
72
74
  */
73
- listBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
75
+ listBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBankAccountsResponseClass>>;
74
76
  };
75
77
  /**
76
78
  * BankAccountsApi - factory interface
@@ -80,12 +82,12 @@ export declare const BankAccountsApiFactory: (configuration?: Configuration, bas
80
82
  /**
81
83
  * Creates a bank account for a specified account.
82
84
  * @summary Create a bank account
83
- * @param {object} body
85
+ * @param {CreateBankAccountRequestDto} createBankAccountRequestDto
84
86
  * @param {string} [authorization] Bearer Token
85
87
  * @param {*} [options] Override http request option.
86
88
  * @throws {RequiredError}
87
89
  */
88
- createBankAccount(body: object, authorization?: string, options?: any): AxiosPromise<void>;
90
+ createBankAccount(createBankAccountRequestDto: CreateBankAccountRequestDto, authorization?: string, options?: any): AxiosPromise<object>;
89
91
  /**
90
92
  * Returns a list of bank accounts you’ve previously created. The bank accounts are returned in sorted order, with the oldest payment appearing first. For more information about pagination, read the Pagination documentation.
91
93
  * @summary List bank accounts
@@ -100,7 +102,7 @@ export declare const BankAccountsApiFactory: (configuration?: Configuration, bas
100
102
  * @param {*} [options] Override http request option.
101
103
  * @throws {RequiredError}
102
104
  */
103
- listBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<void>;
105
+ listBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<ListBankAccountsResponseClass>;
104
106
  };
105
107
  /**
106
108
  * Request parameters for createBankAccount operation in BankAccountsApi.
@@ -110,10 +112,10 @@ export declare const BankAccountsApiFactory: (configuration?: Configuration, bas
110
112
  export interface BankAccountsApiCreateBankAccountRequest {
111
113
  /**
112
114
  *
113
- * @type {object}
115
+ * @type {CreateBankAccountRequestDto}
114
116
  * @memberof BankAccountsApiCreateBankAccount
115
117
  */
116
- readonly body: object;
118
+ readonly createBankAccountRequestDto: CreateBankAccountRequestDto;
117
119
  /**
118
120
  * Bearer Token
119
121
  * @type {string}
@@ -191,7 +193,7 @@ export declare class BankAccountsApi extends BaseAPI {
191
193
  * @throws {RequiredError}
192
194
  * @memberof BankAccountsApi
193
195
  */
194
- createBankAccount(requestParameters: BankAccountsApiCreateBankAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
196
+ createBankAccount(requestParameters: BankAccountsApiCreateBankAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
195
197
  /**
196
198
  * Returns a list of bank accounts you’ve previously created. The bank accounts are returned in sorted order, with the oldest payment appearing first. For more information about pagination, read the Pagination documentation.
197
199
  * @summary List bank accounts
@@ -200,5 +202,5 @@ export declare class BankAccountsApi extends BaseAPI {
200
202
  * @throws {RequiredError}
201
203
  * @memberof BankAccountsApi
202
204
  */
203
- listBankAccounts(requestParameters?: BankAccountsApiListBankAccountsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
205
+ listBankAccounts(requestParameters?: BankAccountsApiListBankAccountsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListBankAccountsResponseClass, any>>;
204
206
  }