@emilgroup/payment-sdk 1.4.1-beta.4 → 1.4.1-beta.40

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 (129) hide show
  1. package/.openapi-generator/FILES +15 -7
  2. package/README.md +2 -2
  3. package/api/bank-accounts-api.ts +501 -89
  4. package/api/bank-transaction-api.ts +303 -97
  5. package/api/{default-api.ts → health-check-api.ts} +23 -19
  6. package/api/payment-methods-api.ts +62 -243
  7. package/api/payment-reminders-api.ts +58 -100
  8. package/api/payment-setup-api.ts +18 -10
  9. package/api/payments-api.ts +73 -136
  10. package/api/refunds-api.ts +436 -0
  11. package/api/tenant-bank-account-api.ts +100 -102
  12. package/api/webhooks-api.ts +18 -14
  13. package/api.ts +6 -4
  14. package/base.ts +23 -11
  15. package/common.ts +4 -4
  16. package/configuration.ts +2 -2
  17. package/dist/api/bank-accounts-api.d.ts +293 -70
  18. package/dist/api/bank-accounts-api.js +433 -63
  19. package/dist/api/bank-transaction-api.d.ts +193 -83
  20. package/dist/api/bank-transaction-api.js +253 -66
  21. package/dist/api/health-check-api.d.ts +70 -0
  22. package/dist/api/{default-api.js → health-check-api.js} +32 -28
  23. package/dist/api/payment-methods-api.d.ts +52 -152
  24. package/dist/api/payment-methods-api.js +49 -179
  25. package/dist/api/payment-reminders-api.d.ts +53 -80
  26. package/dist/api/payment-reminders-api.js +45 -63
  27. package/dist/api/payment-setup-api.d.ts +18 -10
  28. package/dist/api/payment-setup-api.js +18 -10
  29. package/dist/api/payments-api.d.ts +63 -99
  30. package/dist/api/payments-api.js +56 -86
  31. package/dist/api/refunds-api.d.ts +251 -0
  32. package/dist/api/refunds-api.js +439 -0
  33. package/dist/api/tenant-bank-account-api.d.ts +94 -89
  34. package/dist/api/tenant-bank-account-api.js +72 -64
  35. package/dist/api/webhooks-api.d.ts +18 -14
  36. package/dist/api/webhooks-api.js +16 -12
  37. package/dist/api.d.ts +4 -3
  38. package/dist/api.js +4 -3
  39. package/dist/base.d.ts +7 -4
  40. package/dist/base.js +32 -23
  41. package/dist/common.d.ts +4 -4
  42. package/dist/common.js +2 -2
  43. package/dist/configuration.d.ts +2 -2
  44. package/dist/configuration.js +2 -2
  45. package/dist/index.d.ts +2 -2
  46. package/dist/index.js +2 -2
  47. package/dist/models/{bank-transaction-response-class.d.ts → bank-transaction-class-without-expand-properties.d.ts} +32 -34
  48. package/dist/models/{bank-transaction-response-class.js → bank-transaction-class-without-expand-properties.js} +2 -2
  49. package/dist/models/create-bank-account-request-dto.d.ts +42 -0
  50. package/dist/models/{get-request-dto.js → create-bank-account-request-dto.js} +2 -2
  51. package/dist/models/create-payment-reminder-request-dto.d.ts +2 -2
  52. package/dist/models/create-payment-reminder-request-dto.js +2 -2
  53. package/dist/models/create-payment-request-dto.d.ts +4 -4
  54. package/dist/models/create-payment-request-dto.js +2 -2
  55. package/dist/models/create-refund-request-dto.d.ts +24 -0
  56. package/dist/models/{get-bank-transactions-response-class.js → create-refund-request-dto.js} +2 -2
  57. package/dist/models/create-tenant-bank-account-request-dto.d.ts +2 -2
  58. package/dist/models/create-tenant-bank-account-request-dto.js +2 -2
  59. package/dist/models/create-tenant-bank-account-response-class.d.ts +25 -0
  60. package/dist/models/{list-bank-transactions-response-class.js → create-tenant-bank-account-response-class.js} +2 -2
  61. package/dist/models/deactivate-payment-reminder-request-dto.d.ts +2 -2
  62. package/dist/models/deactivate-payment-reminder-request-dto.js +2 -2
  63. package/dist/models/get-tenant-bank-account-response-class.d.ts +6 -6
  64. package/dist/models/get-tenant-bank-account-response-class.js +2 -2
  65. package/dist/models/index.d.ts +13 -6
  66. package/dist/models/index.js +13 -6
  67. package/dist/models/inline-response200.d.ts +2 -2
  68. package/dist/models/inline-response200.js +2 -2
  69. package/dist/models/inline-response503.d.ts +2 -2
  70. package/dist/models/inline-response503.js +2 -2
  71. package/dist/models/link-bank-transaction-request-dto-rest.d.ts +24 -0
  72. package/dist/models/link-bank-transaction-request-dto-rest.js +15 -0
  73. package/dist/models/list-tenant-bank-account-response-class.d.ts +31 -0
  74. package/dist/models/list-tenant-bank-account-response-class.js +15 -0
  75. package/dist/models/set-primary-bank-account-request-dto-rest.d.ts +24 -0
  76. package/dist/models/set-primary-bank-account-request-dto-rest.js +15 -0
  77. package/dist/models/tenant-bank-account-class-without-expand-properties.d.ts +78 -0
  78. package/dist/models/tenant-bank-account-class-without-expand-properties.js +15 -0
  79. package/dist/models/tenant-bank-account-class.d.ts +85 -0
  80. package/dist/models/tenant-bank-account-class.js +15 -0
  81. package/dist/models/unlink-bank-transaction-request-dto-rest.d.ts +24 -0
  82. package/dist/models/unlink-bank-transaction-request-dto-rest.js +15 -0
  83. package/dist/models/update-bank-account-request-dto-rest.d.ts +30 -0
  84. package/dist/models/update-bank-account-request-dto-rest.js +15 -0
  85. package/dist/models/update-bank-account-request-dto.d.ts +36 -0
  86. package/dist/models/update-bank-account-request-dto.js +15 -0
  87. package/dist/models/update-tenant-bank-account-response-class.d.ts +25 -0
  88. package/dist/models/update-tenant-bank-account-response-class.js +15 -0
  89. package/dist/models/update-tenant-bank-account-rest-request-dto.d.ts +2 -2
  90. package/dist/models/update-tenant-bank-account-rest-request-dto.js +2 -2
  91. package/dist/models/validate-pspconfig-request-dto.d.ts +2 -2
  92. package/dist/models/validate-pspconfig-request-dto.js +2 -2
  93. package/index.ts +2 -2
  94. package/models/{bank-transaction-response-class.ts → bank-transaction-class-without-expand-properties.ts} +32 -34
  95. package/models/create-bank-account-request-dto.ts +48 -0
  96. package/models/create-payment-reminder-request-dto.ts +2 -2
  97. package/models/create-payment-request-dto.ts +4 -4
  98. package/models/create-refund-request-dto.ts +30 -0
  99. package/models/create-tenant-bank-account-request-dto.ts +2 -2
  100. package/models/create-tenant-bank-account-response-class.ts +31 -0
  101. package/models/deactivate-payment-reminder-request-dto.ts +2 -2
  102. package/models/get-tenant-bank-account-response-class.ts +6 -6
  103. package/models/index.ts +13 -6
  104. package/models/inline-response200.ts +2 -2
  105. package/models/inline-response503.ts +2 -2
  106. package/models/link-bank-transaction-request-dto-rest.ts +30 -0
  107. package/models/list-tenant-bank-account-response-class.ts +37 -0
  108. package/models/set-primary-bank-account-request-dto-rest.ts +30 -0
  109. package/models/{tenant-bank-account-response-class.ts → tenant-bank-account-class-without-expand-properties.ts} +24 -12
  110. package/models/tenant-bank-account-class.ts +91 -0
  111. package/models/unlink-bank-transaction-request-dto-rest.ts +30 -0
  112. package/models/update-bank-account-request-dto-rest.ts +36 -0
  113. package/models/update-bank-account-request-dto.ts +42 -0
  114. package/models/update-tenant-bank-account-response-class.ts +31 -0
  115. package/models/update-tenant-bank-account-rest-request-dto.ts +2 -2
  116. package/models/validate-pspconfig-request-dto.ts +2 -2
  117. package/package.json +1 -1
  118. package/dist/api/default-api.d.ts +0 -66
  119. package/dist/models/get-bank-transactions-response-class.d.ts +0 -25
  120. package/dist/models/get-request-dto.d.ts +0 -30
  121. package/dist/models/list-bank-transactions-response-class.d.ts +0 -31
  122. package/dist/models/tenant-bank-account-response-class.d.ts +0 -66
  123. package/dist/models/tenant-bank-account-response-class.js +0 -15
  124. package/dist/models/transaction-class.d.ts +0 -54
  125. package/dist/models/transaction-class.js +0 -15
  126. package/models/get-bank-transactions-response-class.ts +0 -31
  127. package/models/get-request-dto.ts +0 -36
  128. package/models/list-bank-transactions-response-class.ts +0 -37
  129. package/models/transaction-class.ts +0 -60
@@ -0,0 +1,436 @@
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
+ /**
26
+ * RefundsApi - axios parameter creator
27
+ * @export
28
+ */
29
+ export const RefundsApiAxiosParamCreator = function (configuration?: Configuration) {
30
+ return {
31
+ /**
32
+ * This will create a refund in the database.
33
+ * @summary Create the refund
34
+ * @param {CreateRefundRequestDto} createRefundRequestDto
35
+ * @param {string} [authorization] Bearer Token
36
+ * @param {*} [options] Override http request option.
37
+ * @throws {RequiredError}
38
+ */
39
+ createRefund: async (createRefundRequestDto: CreateRefundRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
40
+ // verify required parameter 'createRefundRequestDto' is not null or undefined
41
+ assertParamExists('createRefund', 'createRefundRequestDto', createRefundRequestDto)
42
+ const localVarPath = `/paymentservice/v1/refunds`;
43
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
44
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
45
+ let baseOptions;
46
+ let baseAccessToken;
47
+ if (configuration) {
48
+ baseOptions = configuration.baseOptions;
49
+ baseAccessToken = configuration.accessToken;
50
+ }
51
+
52
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
53
+ const localVarHeaderParameter = {} as any;
54
+ const localVarQueryParameter = {} as any;
55
+
56
+ // authentication bearer required
57
+ // http bearer authentication required
58
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
59
+
60
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
61
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
62
+ }
63
+
64
+
65
+
66
+ localVarHeaderParameter['Content-Type'] = 'application/json';
67
+
68
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
69
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
70
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
71
+ localVarRequestOptions.data = serializeDataIfNeeded(createRefundRequestDto, localVarRequestOptions, configuration)
72
+
73
+ return {
74
+ url: toPathString(localVarUrlObj),
75
+ options: localVarRequestOptions,
76
+ };
77
+ },
78
+ /**
79
+ * Retrieves the details of the refund that was previously created. Supply the unique refund code that was returned when you created it and Emil Api will return the corresponding refund information.
80
+ * @summary Retrieve the refund
81
+ * @param {string} code
82
+ * @param {string} [authorization] Bearer Token
83
+ * @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; &lt;i&gt;Allowed values: refundItems&lt;i&gt;
84
+ * @param {*} [options] Override http request option.
85
+ * @throws {RequiredError}
86
+ */
87
+ getRefund: async (code: string, authorization?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
88
+ // verify required parameter 'code' is not null or undefined
89
+ assertParamExists('getRefund', 'code', code)
90
+ const localVarPath = `/paymentservice/v1/refunds/{code}`
91
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
92
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
93
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
94
+ let baseOptions;
95
+ let baseAccessToken;
96
+ if (configuration) {
97
+ baseOptions = configuration.baseOptions;
98
+ baseAccessToken = configuration.accessToken;
99
+ }
100
+
101
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
102
+ const localVarHeaderParameter = {} as any;
103
+ const localVarQueryParameter = {} as any;
104
+
105
+ // authentication bearer required
106
+ // http bearer authentication required
107
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
108
+
109
+ if (expand !== undefined) {
110
+ localVarQueryParameter['expand'] = expand;
111
+ }
112
+
113
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
114
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
115
+ }
116
+
117
+
118
+
119
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
120
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
121
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
122
+
123
+ return {
124
+ url: toPathString(localVarUrlObj),
125
+ options: localVarRequestOptions,
126
+ };
127
+ },
128
+ /**
129
+ * Returns a list of refunds you have previously created. The refunds are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
130
+ * @summary List refunds
131
+ * @param {string} [authorization] Bearer Token
132
+ * @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: code, id, status, reason, psp, accountCode, invoiceCode&lt;/i&gt;
133
+ * @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: code, id, status, reason, psp, accountCode, invoiceCode&lt;/i&gt;
134
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: id, createdAt, updatedAt, amount, psp, accountCode, invoiceCode, reason, status&lt;/i&gt;
135
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, updatedAt, amount&lt;/i&gt;
136
+ * @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; &lt;i&gt;Allowed values: refundItems&lt;i&gt;
137
+ * @param {*} [options] Override http request option.
138
+ * @throws {RequiredError}
139
+ */
140
+ listRefunds: async (authorization?: string, filter?: string, filters?: string, search?: string, order?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
141
+ const localVarPath = `/paymentservice/v1/refunds`;
142
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
143
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
144
+ let baseOptions;
145
+ let baseAccessToken;
146
+ if (configuration) {
147
+ baseOptions = configuration.baseOptions;
148
+ baseAccessToken = configuration.accessToken;
149
+ }
150
+
151
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
152
+ const localVarHeaderParameter = {} as any;
153
+ const localVarQueryParameter = {} as any;
154
+
155
+ // authentication bearer required
156
+ // http bearer authentication required
157
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
158
+
159
+ if (filter !== undefined) {
160
+ localVarQueryParameter['filter'] = filter;
161
+ }
162
+
163
+ if (filters !== undefined) {
164
+ localVarQueryParameter['filters'] = filters;
165
+ }
166
+
167
+ if (search !== undefined) {
168
+ localVarQueryParameter['search'] = search;
169
+ }
170
+
171
+ if (order !== undefined) {
172
+ localVarQueryParameter['order'] = order;
173
+ }
174
+
175
+ if (expand !== undefined) {
176
+ localVarQueryParameter['expand'] = expand;
177
+ }
178
+
179
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
180
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
181
+ }
182
+
183
+
184
+
185
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
186
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
188
+
189
+ return {
190
+ url: toPathString(localVarUrlObj),
191
+ options: localVarRequestOptions,
192
+ };
193
+ },
194
+ }
195
+ };
196
+
197
+ /**
198
+ * RefundsApi - functional programming interface
199
+ * @export
200
+ */
201
+ export const RefundsApiFp = function(configuration?: Configuration) {
202
+ const localVarAxiosParamCreator = RefundsApiAxiosParamCreator(configuration)
203
+ return {
204
+ /**
205
+ * This will create a refund in the database.
206
+ * @summary Create the refund
207
+ * @param {CreateRefundRequestDto} createRefundRequestDto
208
+ * @param {string} [authorization] Bearer Token
209
+ * @param {*} [options] Override http request option.
210
+ * @throws {RequiredError}
211
+ */
212
+ async createRefund(createRefundRequestDto: CreateRefundRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
213
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createRefund(createRefundRequestDto, authorization, options);
214
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
215
+ },
216
+ /**
217
+ * Retrieves the details of the refund that was previously created. Supply the unique refund code that was returned when you created it and Emil Api will return the corresponding refund information.
218
+ * @summary Retrieve the refund
219
+ * @param {string} code
220
+ * @param {string} [authorization] Bearer Token
221
+ * @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; &lt;i&gt;Allowed values: refundItems&lt;i&gt;
222
+ * @param {*} [options] Override http request option.
223
+ * @throws {RequiredError}
224
+ */
225
+ async getRefund(code: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
226
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRefund(code, authorization, expand, options);
227
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
228
+ },
229
+ /**
230
+ * Returns a list of refunds you have previously created. The refunds are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
231
+ * @summary List refunds
232
+ * @param {string} [authorization] Bearer Token
233
+ * @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: code, id, status, reason, psp, accountCode, invoiceCode&lt;/i&gt;
234
+ * @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: code, id, status, reason, psp, accountCode, invoiceCode&lt;/i&gt;
235
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: id, createdAt, updatedAt, amount, psp, accountCode, invoiceCode, reason, status&lt;/i&gt;
236
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, updatedAt, amount&lt;/i&gt;
237
+ * @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; &lt;i&gt;Allowed values: refundItems&lt;i&gt;
238
+ * @param {*} [options] Override http request option.
239
+ * @throws {RequiredError}
240
+ */
241
+ async listRefunds(authorization?: string, filter?: string, filters?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
242
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listRefunds(authorization, filter, filters, search, order, expand, options);
243
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
244
+ },
245
+ }
246
+ };
247
+
248
+ /**
249
+ * RefundsApi - factory interface
250
+ * @export
251
+ */
252
+ export const RefundsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
253
+ const localVarFp = RefundsApiFp(configuration)
254
+ return {
255
+ /**
256
+ * This will create a refund in the database.
257
+ * @summary Create the refund
258
+ * @param {CreateRefundRequestDto} createRefundRequestDto
259
+ * @param {string} [authorization] Bearer Token
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ */
263
+ createRefund(createRefundRequestDto: CreateRefundRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
264
+ return localVarFp.createRefund(createRefundRequestDto, authorization, options).then((request) => request(axios, basePath));
265
+ },
266
+ /**
267
+ * Retrieves the details of the refund that was previously created. Supply the unique refund code that was returned when you created it and Emil Api will return the corresponding refund information.
268
+ * @summary Retrieve the refund
269
+ * @param {string} code
270
+ * @param {string} [authorization] Bearer Token
271
+ * @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; &lt;i&gt;Allowed values: refundItems&lt;i&gt;
272
+ * @param {*} [options] Override http request option.
273
+ * @throws {RequiredError}
274
+ */
275
+ getRefund(code: string, authorization?: string, expand?: string, options?: any): AxiosPromise<void> {
276
+ return localVarFp.getRefund(code, authorization, expand, options).then((request) => request(axios, basePath));
277
+ },
278
+ /**
279
+ * Returns a list of refunds you have previously created. The refunds are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
280
+ * @summary List refunds
281
+ * @param {string} [authorization] Bearer Token
282
+ * @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: code, id, status, reason, psp, accountCode, invoiceCode&lt;/i&gt;
283
+ * @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: code, id, status, reason, psp, accountCode, invoiceCode&lt;/i&gt;
284
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: id, createdAt, updatedAt, amount, psp, accountCode, invoiceCode, reason, status&lt;/i&gt;
285
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, updatedAt, amount&lt;/i&gt;
286
+ * @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; &lt;i&gt;Allowed values: refundItems&lt;i&gt;
287
+ * @param {*} [options] Override http request option.
288
+ * @throws {RequiredError}
289
+ */
290
+ listRefunds(authorization?: string, filter?: string, filters?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<void> {
291
+ return localVarFp.listRefunds(authorization, filter, filters, search, order, expand, options).then((request) => request(axios, basePath));
292
+ },
293
+ };
294
+ };
295
+
296
+ /**
297
+ * Request parameters for createRefund operation in RefundsApi.
298
+ * @export
299
+ * @interface RefundsApiCreateRefundRequest
300
+ */
301
+ export interface RefundsApiCreateRefundRequest {
302
+ /**
303
+ *
304
+ * @type {CreateRefundRequestDto}
305
+ * @memberof RefundsApiCreateRefund
306
+ */
307
+ readonly createRefundRequestDto: CreateRefundRequestDto
308
+
309
+ /**
310
+ * Bearer Token
311
+ * @type {string}
312
+ * @memberof RefundsApiCreateRefund
313
+ */
314
+ readonly authorization?: string
315
+ }
316
+
317
+ /**
318
+ * Request parameters for getRefund operation in RefundsApi.
319
+ * @export
320
+ * @interface RefundsApiGetRefundRequest
321
+ */
322
+ export interface RefundsApiGetRefundRequest {
323
+ /**
324
+ *
325
+ * @type {string}
326
+ * @memberof RefundsApiGetRefund
327
+ */
328
+ readonly code: string
329
+
330
+ /**
331
+ * Bearer Token
332
+ * @type {string}
333
+ * @memberof RefundsApiGetRefund
334
+ */
335
+ readonly authorization?: string
336
+
337
+ /**
338
+ * 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; &lt;i&gt;Allowed values: refundItems&lt;i&gt;
339
+ * @type {string}
340
+ * @memberof RefundsApiGetRefund
341
+ */
342
+ readonly expand?: string
343
+ }
344
+
345
+ /**
346
+ * Request parameters for listRefunds operation in RefundsApi.
347
+ * @export
348
+ * @interface RefundsApiListRefundsRequest
349
+ */
350
+ export interface RefundsApiListRefundsRequest {
351
+ /**
352
+ * Bearer Token
353
+ * @type {string}
354
+ * @memberof RefundsApiListRefunds
355
+ */
356
+ readonly authorization?: string
357
+
358
+ /**
359
+ * 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: code, id, status, reason, psp, accountCode, invoiceCode&lt;/i&gt;
360
+ * @type {string}
361
+ * @memberof RefundsApiListRefunds
362
+ */
363
+ readonly filter?: string
364
+
365
+ /**
366
+ * 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: code, id, status, reason, psp, accountCode, invoiceCode&lt;/i&gt;
367
+ * @type {string}
368
+ * @memberof RefundsApiListRefunds
369
+ */
370
+ readonly filters?: string
371
+
372
+ /**
373
+ * Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: id, createdAt, updatedAt, amount, psp, accountCode, invoiceCode, reason, status&lt;/i&gt;
374
+ * @type {string}
375
+ * @memberof RefundsApiListRefunds
376
+ */
377
+ readonly search?: string
378
+
379
+ /**
380
+ * Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, updatedAt, amount&lt;/i&gt;
381
+ * @type {string}
382
+ * @memberof RefundsApiListRefunds
383
+ */
384
+ readonly order?: string
385
+
386
+ /**
387
+ * 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; &lt;i&gt;Allowed values: refundItems&lt;i&gt;
388
+ * @type {string}
389
+ * @memberof RefundsApiListRefunds
390
+ */
391
+ readonly expand?: string
392
+ }
393
+
394
+ /**
395
+ * RefundsApi - object-oriented interface
396
+ * @export
397
+ * @class RefundsApi
398
+ * @extends {BaseAPI}
399
+ */
400
+ export class RefundsApi extends BaseAPI {
401
+ /**
402
+ * This will create a refund in the database.
403
+ * @summary Create the refund
404
+ * @param {RefundsApiCreateRefundRequest} requestParameters Request parameters.
405
+ * @param {*} [options] Override http request option.
406
+ * @throws {RequiredError}
407
+ * @memberof RefundsApi
408
+ */
409
+ public createRefund(requestParameters: RefundsApiCreateRefundRequest, options?: AxiosRequestConfig) {
410
+ return RefundsApiFp(this.configuration).createRefund(requestParameters.createRefundRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
411
+ }
412
+
413
+ /**
414
+ * Retrieves the details of the refund that was previously created. Supply the unique refund code that was returned when you created it and Emil Api will return the corresponding refund information.
415
+ * @summary Retrieve the refund
416
+ * @param {RefundsApiGetRefundRequest} requestParameters Request parameters.
417
+ * @param {*} [options] Override http request option.
418
+ * @throws {RequiredError}
419
+ * @memberof RefundsApi
420
+ */
421
+ public getRefund(requestParameters: RefundsApiGetRefundRequest, options?: AxiosRequestConfig) {
422
+ return RefundsApiFp(this.configuration).getRefund(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
423
+ }
424
+
425
+ /**
426
+ * Returns a list of refunds you have previously created. The refunds are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
427
+ * @summary List refunds
428
+ * @param {RefundsApiListRefundsRequest} requestParameters Request parameters.
429
+ * @param {*} [options] Override http request option.
430
+ * @throws {RequiredError}
431
+ * @memberof RefundsApi
432
+ */
433
+ public listRefunds(requestParameters: RefundsApiListRefundsRequest = {}, options?: AxiosRequestConfig) {
434
+ return RefundsApiFp(this.configuration).listRefunds(requestParameters.authorization, requestParameters.filter, requestParameters.filters, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
435
+ }
436
+ }