@emilgroup/payment-sdk 1.0.0 → 1.4.1-beta.0

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 (178) hide show
  1. package/.openapi-generator/FILES +15 -30
  2. package/README.md +2 -2
  3. package/api/bank-accounts-api.ts +21 -25
  4. package/api/bank-transaction-api.ts +657 -0
  5. package/api/default-api.ts +1 -1
  6. package/api/payment-methods-api.ts +42 -46
  7. package/api/payment-reminders-api.ts +17 -19
  8. package/api/payment-setup-api.ts +29 -37
  9. package/api/payments-api.ts +30 -32
  10. package/api/refunds-api.ts +462 -0
  11. package/api/tenant-bank-account-api.ts +651 -0
  12. package/api/webhooks-api.ts +1 -1
  13. package/api.ts +7 -3
  14. package/base.ts +2 -1
  15. package/common.ts +2 -2
  16. package/configuration.ts +1 -1
  17. package/dist/api/bank-accounts-api.d.ts +17 -19
  18. package/dist/api/bank-accounts-api.js +16 -16
  19. package/dist/api/bank-transaction-api.d.ts +371 -0
  20. package/dist/api/bank-transaction-api.js +632 -0
  21. package/dist/api/default-api.d.ts +1 -1
  22. package/dist/api/default-api.js +1 -1
  23. package/dist/api/payment-methods-api.d.ts +32 -36
  24. package/dist/api/payment-methods-api.js +32 -28
  25. package/dist/api/payment-reminders-api.d.ts +21 -22
  26. package/dist/api/payment-reminders-api.js +8 -8
  27. package/dist/api/payment-setup-api.d.ts +19 -23
  28. package/dist/api/payment-setup-api.js +25 -25
  29. package/dist/api/payments-api.d.ts +26 -29
  30. package/dist/api/payments-api.js +20 -16
  31. package/dist/api/refunds-api.d.ts +260 -0
  32. package/dist/api/refunds-api.js +443 -0
  33. package/dist/api/tenant-bank-account-api.d.ts +361 -0
  34. package/dist/api/tenant-bank-account-api.js +616 -0
  35. package/dist/api/webhooks-api.d.ts +1 -1
  36. package/dist/api/webhooks-api.js +1 -1
  37. package/dist/api.d.ts +4 -2
  38. package/dist/api.js +4 -2
  39. package/dist/base.d.ts +1 -1
  40. package/dist/base.js +2 -1
  41. package/dist/common.d.ts +2 -2
  42. package/dist/common.js +1 -1
  43. package/dist/configuration.d.ts +1 -1
  44. package/dist/configuration.js +1 -1
  45. package/dist/index.d.ts +1 -1
  46. package/dist/index.js +1 -1
  47. package/dist/models/bank-transaction-response-class.d.ts +122 -0
  48. package/dist/models/{bank-account-class.js → bank-transaction-response-class.js} +1 -1
  49. package/dist/models/create-payment-reminder-request-dto.d.ts +1 -1
  50. package/dist/models/create-payment-reminder-request-dto.js +1 -1
  51. package/dist/models/create-payment-request-dto.d.ts +3 -3
  52. package/dist/models/create-payment-request-dto.js +1 -1
  53. package/dist/models/{sepa-direct-dto.d.ts → create-refund-request-dto.d.ts} +6 -6
  54. package/dist/models/{complete-braintree-payment-setup-request-dto.js → create-refund-request-dto.js} +1 -1
  55. package/dist/models/{validate-pspconfig-response-class.d.ts → create-refund-response-class.d.ts} +8 -7
  56. package/dist/models/{billing-profile-dto.js → create-refund-response-class.js} +1 -1
  57. package/dist/models/{billing-profile-limited-response-dto.d.ts → create-tenant-bank-account-request-dto.d.ts} +15 -27
  58. package/dist/models/{billing-profile-limited-response-dto.js → create-tenant-bank-account-request-dto.js} +1 -1
  59. package/dist/models/deactivate-payment-reminder-request-dto.d.ts +1 -1
  60. package/dist/models/deactivate-payment-reminder-request-dto.js +1 -1
  61. package/dist/models/{get-payment-method-response-class.d.ts → get-bank-transactions-response-class.d.ts} +8 -8
  62. package/dist/models/get-bank-transactions-response-class.js +15 -0
  63. package/dist/models/{get-payment-response-class.d.ts → get-refund-response-class.d.ts} +8 -8
  64. package/dist/models/get-refund-response-class.js +15 -0
  65. package/dist/models/get-request-dto.d.ts +2 -2
  66. package/dist/models/get-request-dto.js +1 -1
  67. package/dist/models/{create-bank-account-request-dto.d.ts → get-tenant-bank-account-response-class.d.ts} +8 -13
  68. package/dist/models/get-tenant-bank-account-response-class.js +15 -0
  69. package/dist/models/index.d.ts +12 -29
  70. package/dist/models/index.js +12 -29
  71. package/dist/models/inline-response200.d.ts +7 -7
  72. package/dist/models/inline-response200.js +1 -1
  73. package/dist/models/inline-response503.d.ts +7 -7
  74. package/dist/models/inline-response503.js +1 -1
  75. package/dist/models/{list-payment-methods-response-class.d.ts → list-bank-transactions-response-class.d.ts} +9 -9
  76. package/dist/models/list-bank-transactions-response-class.js +15 -0
  77. package/dist/models/{list-payments-response-class.d.ts → list-refunds-response-class.d.ts} +9 -9
  78. package/dist/models/list-refunds-response-class.js +15 -0
  79. package/dist/models/refund-class.d.ts +104 -0
  80. package/dist/models/refund-class.js +28 -0
  81. package/dist/models/{payment-method-class.d.ts → tenant-bank-account-response-class.d.ts} +25 -19
  82. package/dist/models/tenant-bank-account-response-class.js +15 -0
  83. package/dist/models/transaction-class.d.ts +1 -1
  84. package/dist/models/transaction-class.js +1 -1
  85. package/dist/models/{symphony-profile-limited-response-dto.d.ts → update-tenant-bank-account-rest-request-dto.d.ts} +12 -18
  86. package/dist/models/update-tenant-bank-account-rest-request-dto.js +15 -0
  87. package/dist/models/validate-pspconfig-request-dto.d.ts +2 -9
  88. package/dist/models/validate-pspconfig-request-dto.js +1 -8
  89. package/git_push.sh +1 -1
  90. package/index.ts +1 -1
  91. package/models/bank-transaction-response-class.ts +128 -0
  92. package/models/create-payment-reminder-request-dto.ts +1 -1
  93. package/models/create-payment-request-dto.ts +3 -3
  94. package/models/{sepa-direct-dto.ts → create-refund-request-dto.ts} +6 -6
  95. package/models/{validate-pspconfig-response-class.ts → create-refund-response-class.ts} +8 -7
  96. package/models/{billing-profile-limited-response-dto.ts → create-tenant-bank-account-request-dto.ts} +15 -27
  97. package/models/deactivate-payment-reminder-request-dto.ts +1 -1
  98. package/models/{get-payment-method-response-class.ts → get-bank-transactions-response-class.ts} +8 -8
  99. package/models/{get-payment-response-class.ts → get-refund-response-class.ts} +8 -8
  100. package/models/get-request-dto.ts +2 -2
  101. package/models/{create-bank-account-request-dto.ts → get-tenant-bank-account-response-class.ts} +8 -13
  102. package/models/index.ts +12 -29
  103. package/models/inline-response200.ts +7 -7
  104. package/models/inline-response503.ts +7 -7
  105. package/models/{list-payment-methods-response-class.ts → list-bank-transactions-response-class.ts} +9 -9
  106. package/models/{list-payments-response-class.ts → list-refunds-response-class.ts} +9 -9
  107. package/models/refund-class.ts +114 -0
  108. package/models/{payment-method-class.ts → tenant-bank-account-response-class.ts} +25 -19
  109. package/models/transaction-class.ts +1 -1
  110. package/models/{symphony-profile-limited-response-dto.ts → update-tenant-bank-account-rest-request-dto.ts} +12 -18
  111. package/models/validate-pspconfig-request-dto.ts +2 -12
  112. package/package.json +1 -2
  113. package/api/payment-service-providers-api.ts +0 -161
  114. package/dist/api/payment-service-providers-api.d.ts +0 -93
  115. package/dist/api/payment-service-providers-api.js +0 -220
  116. package/dist/models/bank-account-class.d.ts +0 -54
  117. package/dist/models/billing-profile-dto.d.ts +0 -38
  118. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +0 -48
  119. package/dist/models/complete-payment-setup-request-dto.d.ts +0 -32
  120. package/dist/models/complete-payment-setup-request-dto.js +0 -15
  121. package/dist/models/complete-payment-setup-response-class.d.ts +0 -25
  122. package/dist/models/complete-payment-setup-response-class.js +0 -15
  123. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +0 -60
  124. package/dist/models/complete-stripe-payment-setup-request-dto.js +0 -15
  125. package/dist/models/create-bank-account-request-dto.js +0 -15
  126. package/dist/models/create-payment-method-response-class.d.ts +0 -25
  127. package/dist/models/create-payment-method-response-class.js +0 -15
  128. package/dist/models/create-payment-response-class.d.ts +0 -25
  129. package/dist/models/create-payment-response-class.js +0 -15
  130. package/dist/models/create-psp-payment-method-request-dto.d.ts +0 -61
  131. package/dist/models/create-psp-payment-method-request-dto.js +0 -32
  132. package/dist/models/get-payment-method-response-class.js +0 -15
  133. package/dist/models/get-payment-response-class.js +0 -15
  134. package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +0 -30
  135. package/dist/models/initiate-braintree-payment-setup-request-dto.js +0 -15
  136. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +0 -24
  137. package/dist/models/initiate-braintree-payment-setup-response-class.js +0 -15
  138. package/dist/models/initiate-payment-setup-request-dto.d.ts +0 -44
  139. package/dist/models/initiate-payment-setup-request-dto.js +0 -15
  140. package/dist/models/initiate-payment-setup-response-class.d.ts +0 -32
  141. package/dist/models/initiate-payment-setup-response-class.js +0 -15
  142. package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +0 -30
  143. package/dist/models/initiate-stripe-payment-setup-request-dto.js +0 -15
  144. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +0 -30
  145. package/dist/models/initiate-stripe-payment-setup-response-class.js +0 -15
  146. package/dist/models/list-bank-accounts-response-class.d.ts +0 -31
  147. package/dist/models/list-bank-accounts-response-class.js +0 -15
  148. package/dist/models/list-payment-methods-response-class.js +0 -15
  149. package/dist/models/list-payment-reminders-response-class.d.ts +0 -31
  150. package/dist/models/list-payment-reminders-response-class.js +0 -15
  151. package/dist/models/list-payments-response-class.js +0 -15
  152. package/dist/models/payment-class.d.ts +0 -103
  153. package/dist/models/payment-class.js +0 -15
  154. package/dist/models/payment-method-class.js +0 -15
  155. package/dist/models/payment-reminder-class.d.ts +0 -112
  156. package/dist/models/payment-reminder-class.js +0 -36
  157. package/dist/models/sepa-direct-dto.js +0 -15
  158. package/dist/models/symphony-profile-limited-response-dto.js +0 -15
  159. package/dist/models/validate-pspconfig-response-class.js +0 -15
  160. package/models/bank-account-class.ts +0 -60
  161. package/models/billing-profile-dto.ts +0 -44
  162. package/models/complete-braintree-payment-setup-request-dto.ts +0 -54
  163. package/models/complete-payment-setup-request-dto.ts +0 -38
  164. package/models/complete-payment-setup-response-class.ts +0 -31
  165. package/models/complete-stripe-payment-setup-request-dto.ts +0 -66
  166. package/models/create-payment-method-response-class.ts +0 -31
  167. package/models/create-payment-response-class.ts +0 -31
  168. package/models/create-psp-payment-method-request-dto.ts +0 -70
  169. package/models/initiate-braintree-payment-setup-request-dto.ts +0 -36
  170. package/models/initiate-braintree-payment-setup-response-class.ts +0 -30
  171. package/models/initiate-payment-setup-request-dto.ts +0 -50
  172. package/models/initiate-payment-setup-response-class.ts +0 -38
  173. package/models/initiate-stripe-payment-setup-request-dto.ts +0 -36
  174. package/models/initiate-stripe-payment-setup-response-class.ts +0 -36
  175. package/models/list-bank-accounts-response-class.ts +0 -37
  176. package/models/list-payment-reminders-response-class.ts +0 -37
  177. package/models/payment-class.ts +0 -109
  178. package/models/payment-reminder-class.ts +0 -122
@@ -0,0 +1,657 @@
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: z
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 { GetBankTransactionsResponseClass } from '../models';
25
+ // @ts-ignore
26
+ import { ListBankTransactionsResponseClass } from '../models';
27
+ /**
28
+ * BankTransactionApi - axios parameter creator
29
+ * @export
30
+ */
31
+ export const BankTransactionApiAxiosParamCreator = function (configuration?: Configuration) {
32
+ return {
33
+ /**
34
+ * Retrieves the details of the Bank Transaction that was previously created. Supply the unique Bank Transaction code that was returned when you created it and Emil Api will return the corresponding Bank Transaction information.
35
+ * @summary Retrieve the Bank Transaction
36
+ * @param {string} code
37
+ * @param {string} [authorization] Bearer Token
38
+ * @param {string} [expand] Expand the response with additional entities
39
+ * @param {*} [options] Override http request option.
40
+ * @throws {RequiredError}
41
+ */
42
+ getBankTransaction: async (code: string, authorization?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
43
+ // verify required parameter 'code' is not null or undefined
44
+ assertParamExists('getBankTransaction', 'code', code)
45
+ const localVarPath = `/paymentservice/v1/tenant/bank-transactions/{code}`
46
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
47
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
48
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
49
+ let baseOptions;
50
+ let baseAccessToken;
51
+ if (configuration) {
52
+ baseOptions = configuration.baseOptions;
53
+ baseAccessToken = configuration.accessToken;
54
+ }
55
+
56
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
57
+ const localVarHeaderParameter = {} as any;
58
+ const localVarQueryParameter = {} as any;
59
+
60
+ // authentication bearer required
61
+ // http bearer authentication required
62
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
63
+
64
+ if (expand !== undefined) {
65
+ localVarQueryParameter['expand'] = expand;
66
+ }
67
+
68
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
69
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
70
+ }
71
+
72
+
73
+
74
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
75
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
76
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
77
+
78
+ return {
79
+ url: toPathString(localVarUrlObj),
80
+ options: localVarRequestOptions,
81
+ };
82
+ },
83
+ /**
84
+ * Import bank transactions from a swift MT940 file
85
+ * @summary Create the bank transactions
86
+ * @param {string} [authorization] Bearer Token
87
+ * @param {any} [file]
88
+ * @param {*} [options] Override http request option.
89
+ * @throws {RequiredError}
90
+ */
91
+ importBankTransactions: async (authorization?: string, file?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
92
+ const localVarPath = `/paymentservice/v1/tenant/bank-transactions/import`;
93
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
94
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
95
+ let baseOptions;
96
+ let baseAccessToken;
97
+ if (configuration) {
98
+ baseOptions = configuration.baseOptions;
99
+ baseAccessToken = configuration.accessToken;
100
+ }
101
+
102
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
103
+ const localVarHeaderParameter = {} as any;
104
+ const localVarQueryParameter = {} as any;
105
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
106
+
107
+ // authentication bearer required
108
+ // http bearer authentication required
109
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
110
+
111
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
112
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
113
+ }
114
+
115
+
116
+ if (file !== undefined) {
117
+ localVarFormParams.append('file', file as any);
118
+ }
119
+
120
+
121
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data; boundary=' + localVarFormParams.getBoundary();
122
+
123
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
124
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
125
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
126
+ localVarRequestOptions.data = localVarFormParams;
127
+
128
+ return {
129
+ url: toPathString(localVarUrlObj),
130
+ options: localVarRequestOptions,
131
+ };
132
+ },
133
+ /**
134
+ * Links a bank transaction with an invoice
135
+ * @summary Link Bank Transaction
136
+ * @param {string} code Code of the bank transaction to link
137
+ * @param {string} [authorization] Bearer Token
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ */
141
+ linkBankTransaction: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
142
+ // verify required parameter 'code' is not null or undefined
143
+ assertParamExists('linkBankTransaction', 'code', code)
144
+ const localVarPath = `/paymentservice/v1/tenant/bank-transactions/{code}/link`
145
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
146
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
147
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
148
+ let baseOptions;
149
+ let baseAccessToken;
150
+ if (configuration) {
151
+ baseOptions = configuration.baseOptions;
152
+ baseAccessToken = configuration.accessToken;
153
+ }
154
+
155
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
156
+ const localVarHeaderParameter = {} as any;
157
+ const localVarQueryParameter = {} as any;
158
+
159
+ // authentication bearer required
160
+ // http bearer authentication required
161
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
162
+
163
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
164
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
165
+ }
166
+
167
+
168
+
169
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
170
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
171
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
172
+
173
+ return {
174
+ url: toPathString(localVarUrlObj),
175
+ options: localVarRequestOptions,
176
+ };
177
+ },
178
+ /**
179
+ * 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.
180
+ * @summary List bank transactions
181
+ * @param {string} [authorization] Bearer Token
182
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
183
+ * @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.
184
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
185
+ * @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.
186
+ * @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.
187
+ * @param {string} [expand] Expand the response with additional entities
188
+ * @param {*} [options] Override http request option.
189
+ * @throws {RequiredError}
190
+ */
191
+ listBankTransactions: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
192
+ const localVarPath = `/paymentservice/v1/tenant/bank-transactions`;
193
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
194
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
195
+ let baseOptions;
196
+ let baseAccessToken;
197
+ if (configuration) {
198
+ baseOptions = configuration.baseOptions;
199
+ baseAccessToken = configuration.accessToken;
200
+ }
201
+
202
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
203
+ const localVarHeaderParameter = {} as any;
204
+ const localVarQueryParameter = {} as any;
205
+
206
+ // authentication bearer required
207
+ // http bearer authentication required
208
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
209
+
210
+ if (pageSize !== undefined) {
211
+ localVarQueryParameter['pageSize'] = pageSize;
212
+ }
213
+
214
+ if (pageToken !== undefined) {
215
+ localVarQueryParameter['pageToken'] = pageToken;
216
+ }
217
+
218
+ if (filter !== undefined) {
219
+ localVarQueryParameter['filter'] = filter;
220
+ }
221
+
222
+ if (search !== undefined) {
223
+ localVarQueryParameter['search'] = search;
224
+ }
225
+
226
+ if (order !== undefined) {
227
+ localVarQueryParameter['order'] = order;
228
+ }
229
+
230
+ if (expand !== undefined) {
231
+ localVarQueryParameter['expand'] = expand;
232
+ }
233
+
234
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
235
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
236
+ }
237
+
238
+
239
+
240
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
241
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
242
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
243
+
244
+ return {
245
+ url: toPathString(localVarUrlObj),
246
+ options: localVarRequestOptions,
247
+ };
248
+ },
249
+ /**
250
+ * Unlinks an already linked bank transaction
251
+ * @summary Unlink Bank Transaction
252
+ * @param {string} code Code of the bank transaction to unlink
253
+ * @param {string} [authorization] Bearer Token
254
+ * @param {*} [options] Override http request option.
255
+ * @throws {RequiredError}
256
+ */
257
+ unlinkBankTransaction: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
258
+ // verify required parameter 'code' is not null or undefined
259
+ assertParamExists('unlinkBankTransaction', 'code', code)
260
+ const localVarPath = `/paymentservice/v1/tenant/bank-transactions/{code}/unlink`
261
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
262
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
263
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
264
+ let baseOptions;
265
+ let baseAccessToken;
266
+ if (configuration) {
267
+ baseOptions = configuration.baseOptions;
268
+ baseAccessToken = configuration.accessToken;
269
+ }
270
+
271
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
272
+ const localVarHeaderParameter = {} as any;
273
+ const localVarQueryParameter = {} as any;
274
+
275
+ // authentication bearer required
276
+ // http bearer authentication required
277
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
278
+
279
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
280
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
281
+ }
282
+
283
+
284
+
285
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
286
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
287
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
288
+
289
+ return {
290
+ url: toPathString(localVarUrlObj),
291
+ options: localVarRequestOptions,
292
+ };
293
+ },
294
+ }
295
+ };
296
+
297
+ /**
298
+ * BankTransactionApi - functional programming interface
299
+ * @export
300
+ */
301
+ export const BankTransactionApiFp = function(configuration?: Configuration) {
302
+ const localVarAxiosParamCreator = BankTransactionApiAxiosParamCreator(configuration)
303
+ return {
304
+ /**
305
+ * Retrieves the details of the Bank Transaction that was previously created. Supply the unique Bank Transaction code that was returned when you created it and Emil Api will return the corresponding Bank Transaction information.
306
+ * @summary Retrieve the Bank Transaction
307
+ * @param {string} code
308
+ * @param {string} [authorization] Bearer Token
309
+ * @param {string} [expand] Expand the response with additional entities
310
+ * @param {*} [options] Override http request option.
311
+ * @throws {RequiredError}
312
+ */
313
+ async getBankTransaction(code: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBankTransactionsResponseClass>> {
314
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getBankTransaction(code, authorization, expand, options);
315
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
316
+ },
317
+ /**
318
+ * Import bank transactions from a swift MT940 file
319
+ * @summary Create the bank transactions
320
+ * @param {string} [authorization] Bearer Token
321
+ * @param {any} [file]
322
+ * @param {*} [options] Override http request option.
323
+ * @throws {RequiredError}
324
+ */
325
+ async importBankTransactions(authorization?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBankTransactionsResponseClass>> {
326
+ const localVarAxiosArgs = await localVarAxiosParamCreator.importBankTransactions(authorization, file, options);
327
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
328
+ },
329
+ /**
330
+ * Links a bank transaction with an invoice
331
+ * @summary Link Bank Transaction
332
+ * @param {string} code Code of the bank transaction to link
333
+ * @param {string} [authorization] Bearer Token
334
+ * @param {*} [options] Override http request option.
335
+ * @throws {RequiredError}
336
+ */
337
+ async linkBankTransaction(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBankTransactionsResponseClass>> {
338
+ const localVarAxiosArgs = await localVarAxiosParamCreator.linkBankTransaction(code, authorization, options);
339
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
340
+ },
341
+ /**
342
+ * 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.
343
+ * @summary List bank transactions
344
+ * @param {string} [authorization] Bearer Token
345
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
346
+ * @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.
347
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
348
+ * @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.
349
+ * @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.
350
+ * @param {string} [expand] Expand the response with additional entities
351
+ * @param {*} [options] Override http request option.
352
+ * @throws {RequiredError}
353
+ */
354
+ async listBankTransactions(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
355
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listBankTransactions(authorization, pageSize, pageToken, filter, search, order, expand, options);
356
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
357
+ },
358
+ /**
359
+ * Unlinks an already linked bank transaction
360
+ * @summary Unlink Bank Transaction
361
+ * @param {string} code Code of the bank transaction to unlink
362
+ * @param {string} [authorization] Bearer Token
363
+ * @param {*} [options] Override http request option.
364
+ * @throws {RequiredError}
365
+ */
366
+ async unlinkBankTransaction(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBankTransactionsResponseClass>> {
367
+ const localVarAxiosArgs = await localVarAxiosParamCreator.unlinkBankTransaction(code, authorization, options);
368
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
369
+ },
370
+ }
371
+ };
372
+
373
+ /**
374
+ * BankTransactionApi - factory interface
375
+ * @export
376
+ */
377
+ export const BankTransactionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
378
+ const localVarFp = BankTransactionApiFp(configuration)
379
+ return {
380
+ /**
381
+ * Retrieves the details of the Bank Transaction that was previously created. Supply the unique Bank Transaction code that was returned when you created it and Emil Api will return the corresponding Bank Transaction information.
382
+ * @summary Retrieve the Bank Transaction
383
+ * @param {string} code
384
+ * @param {string} [authorization] Bearer Token
385
+ * @param {string} [expand] Expand the response with additional entities
386
+ * @param {*} [options] Override http request option.
387
+ * @throws {RequiredError}
388
+ */
389
+ getBankTransaction(code: string, authorization?: string, expand?: string, options?: any): AxiosPromise<GetBankTransactionsResponseClass> {
390
+ return localVarFp.getBankTransaction(code, authorization, expand, options).then((request) => request(axios, basePath));
391
+ },
392
+ /**
393
+ * Import bank transactions from a swift MT940 file
394
+ * @summary Create the bank transactions
395
+ * @param {string} [authorization] Bearer Token
396
+ * @param {any} [file]
397
+ * @param {*} [options] Override http request option.
398
+ * @throws {RequiredError}
399
+ */
400
+ importBankTransactions(authorization?: string, file?: any, options?: any): AxiosPromise<ListBankTransactionsResponseClass> {
401
+ return localVarFp.importBankTransactions(authorization, file, options).then((request) => request(axios, basePath));
402
+ },
403
+ /**
404
+ * Links a bank transaction with an invoice
405
+ * @summary Link Bank Transaction
406
+ * @param {string} code Code of the bank transaction to link
407
+ * @param {string} [authorization] Bearer Token
408
+ * @param {*} [options] Override http request option.
409
+ * @throws {RequiredError}
410
+ */
411
+ linkBankTransaction(code: string, authorization?: string, options?: any): AxiosPromise<GetBankTransactionsResponseClass> {
412
+ return localVarFp.linkBankTransaction(code, authorization, options).then((request) => request(axios, basePath));
413
+ },
414
+ /**
415
+ * 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.
416
+ * @summary List bank transactions
417
+ * @param {string} [authorization] Bearer Token
418
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
419
+ * @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.
420
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
421
+ * @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.
422
+ * @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.
423
+ * @param {string} [expand] Expand the response with additional entities
424
+ * @param {*} [options] Override http request option.
425
+ * @throws {RequiredError}
426
+ */
427
+ listBankTransactions(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: string, options?: any): AxiosPromise<void> {
428
+ return localVarFp.listBankTransactions(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
429
+ },
430
+ /**
431
+ * Unlinks an already linked bank transaction
432
+ * @summary Unlink Bank Transaction
433
+ * @param {string} code Code of the bank transaction to unlink
434
+ * @param {string} [authorization] Bearer Token
435
+ * @param {*} [options] Override http request option.
436
+ * @throws {RequiredError}
437
+ */
438
+ unlinkBankTransaction(code: string, authorization?: string, options?: any): AxiosPromise<GetBankTransactionsResponseClass> {
439
+ return localVarFp.unlinkBankTransaction(code, authorization, options).then((request) => request(axios, basePath));
440
+ },
441
+ };
442
+ };
443
+
444
+ /**
445
+ * Request parameters for getBankTransaction operation in BankTransactionApi.
446
+ * @export
447
+ * @interface BankTransactionApiGetBankTransactionRequest
448
+ */
449
+ export interface BankTransactionApiGetBankTransactionRequest {
450
+ /**
451
+ *
452
+ * @type {string}
453
+ * @memberof BankTransactionApiGetBankTransaction
454
+ */
455
+ readonly code: string
456
+
457
+ /**
458
+ * Bearer Token
459
+ * @type {string}
460
+ * @memberof BankTransactionApiGetBankTransaction
461
+ */
462
+ readonly authorization?: string
463
+
464
+ /**
465
+ * Expand the response with additional entities
466
+ * @type {string}
467
+ * @memberof BankTransactionApiGetBankTransaction
468
+ */
469
+ readonly expand?: string
470
+ }
471
+
472
+ /**
473
+ * Request parameters for importBankTransactions operation in BankTransactionApi.
474
+ * @export
475
+ * @interface BankTransactionApiImportBankTransactionsRequest
476
+ */
477
+ export interface BankTransactionApiImportBankTransactionsRequest {
478
+ /**
479
+ * Bearer Token
480
+ * @type {string}
481
+ * @memberof BankTransactionApiImportBankTransactions
482
+ */
483
+ readonly authorization?: string
484
+
485
+ /**
486
+ *
487
+ * @type {any}
488
+ * @memberof BankTransactionApiImportBankTransactions
489
+ */
490
+ readonly file?: any
491
+ }
492
+
493
+ /**
494
+ * Request parameters for linkBankTransaction operation in BankTransactionApi.
495
+ * @export
496
+ * @interface BankTransactionApiLinkBankTransactionRequest
497
+ */
498
+ export interface BankTransactionApiLinkBankTransactionRequest {
499
+ /**
500
+ * Code of the bank transaction to link
501
+ * @type {string}
502
+ * @memberof BankTransactionApiLinkBankTransaction
503
+ */
504
+ readonly code: string
505
+
506
+ /**
507
+ * Bearer Token
508
+ * @type {string}
509
+ * @memberof BankTransactionApiLinkBankTransaction
510
+ */
511
+ readonly authorization?: string
512
+ }
513
+
514
+ /**
515
+ * Request parameters for listBankTransactions operation in BankTransactionApi.
516
+ * @export
517
+ * @interface BankTransactionApiListBankTransactionsRequest
518
+ */
519
+ export interface BankTransactionApiListBankTransactionsRequest {
520
+ /**
521
+ * Bearer Token
522
+ * @type {string}
523
+ * @memberof BankTransactionApiListBankTransactions
524
+ */
525
+ readonly authorization?: string
526
+
527
+ /**
528
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
529
+ * @type {any}
530
+ * @memberof BankTransactionApiListBankTransactions
531
+ */
532
+ readonly pageSize?: any
533
+
534
+ /**
535
+ * 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.
536
+ * @type {any}
537
+ * @memberof BankTransactionApiListBankTransactions
538
+ */
539
+ readonly pageToken?: any
540
+
541
+ /**
542
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
543
+ * @type {any}
544
+ * @memberof BankTransactionApiListBankTransactions
545
+ */
546
+ readonly filter?: any
547
+
548
+ /**
549
+ * 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.
550
+ * @type {any}
551
+ * @memberof BankTransactionApiListBankTransactions
552
+ */
553
+ readonly search?: any
554
+
555
+ /**
556
+ * 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.
557
+ * @type {any}
558
+ * @memberof BankTransactionApiListBankTransactions
559
+ */
560
+ readonly order?: any
561
+
562
+ /**
563
+ * Expand the response with additional entities
564
+ * @type {string}
565
+ * @memberof BankTransactionApiListBankTransactions
566
+ */
567
+ readonly expand?: string
568
+ }
569
+
570
+ /**
571
+ * Request parameters for unlinkBankTransaction operation in BankTransactionApi.
572
+ * @export
573
+ * @interface BankTransactionApiUnlinkBankTransactionRequest
574
+ */
575
+ export interface BankTransactionApiUnlinkBankTransactionRequest {
576
+ /**
577
+ * Code of the bank transaction to unlink
578
+ * @type {string}
579
+ * @memberof BankTransactionApiUnlinkBankTransaction
580
+ */
581
+ readonly code: string
582
+
583
+ /**
584
+ * Bearer Token
585
+ * @type {string}
586
+ * @memberof BankTransactionApiUnlinkBankTransaction
587
+ */
588
+ readonly authorization?: string
589
+ }
590
+
591
+ /**
592
+ * BankTransactionApi - object-oriented interface
593
+ * @export
594
+ * @class BankTransactionApi
595
+ * @extends {BaseAPI}
596
+ */
597
+ export class BankTransactionApi extends BaseAPI {
598
+ /**
599
+ * Retrieves the details of the Bank Transaction that was previously created. Supply the unique Bank Transaction code that was returned when you created it and Emil Api will return the corresponding Bank Transaction information.
600
+ * @summary Retrieve the Bank Transaction
601
+ * @param {BankTransactionApiGetBankTransactionRequest} requestParameters Request parameters.
602
+ * @param {*} [options] Override http request option.
603
+ * @throws {RequiredError}
604
+ * @memberof BankTransactionApi
605
+ */
606
+ public getBankTransaction(requestParameters: BankTransactionApiGetBankTransactionRequest, options?: AxiosRequestConfig) {
607
+ return BankTransactionApiFp(this.configuration).getBankTransaction(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
608
+ }
609
+
610
+ /**
611
+ * Import bank transactions from a swift MT940 file
612
+ * @summary Create the bank transactions
613
+ * @param {BankTransactionApiImportBankTransactionsRequest} requestParameters Request parameters.
614
+ * @param {*} [options] Override http request option.
615
+ * @throws {RequiredError}
616
+ * @memberof BankTransactionApi
617
+ */
618
+ public importBankTransactions(requestParameters: BankTransactionApiImportBankTransactionsRequest = {}, options?: AxiosRequestConfig) {
619
+ return BankTransactionApiFp(this.configuration).importBankTransactions(requestParameters.authorization, requestParameters.file, options).then((request) => request(this.axios, this.basePath));
620
+ }
621
+
622
+ /**
623
+ * Links a bank transaction with an invoice
624
+ * @summary Link Bank Transaction
625
+ * @param {BankTransactionApiLinkBankTransactionRequest} requestParameters Request parameters.
626
+ * @param {*} [options] Override http request option.
627
+ * @throws {RequiredError}
628
+ * @memberof BankTransactionApi
629
+ */
630
+ public linkBankTransaction(requestParameters: BankTransactionApiLinkBankTransactionRequest, options?: AxiosRequestConfig) {
631
+ return BankTransactionApiFp(this.configuration).linkBankTransaction(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
632
+ }
633
+
634
+ /**
635
+ * 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.
636
+ * @summary List bank transactions
637
+ * @param {BankTransactionApiListBankTransactionsRequest} requestParameters Request parameters.
638
+ * @param {*} [options] Override http request option.
639
+ * @throws {RequiredError}
640
+ * @memberof BankTransactionApi
641
+ */
642
+ public listBankTransactions(requestParameters: BankTransactionApiListBankTransactionsRequest = {}, options?: AxiosRequestConfig) {
643
+ return BankTransactionApiFp(this.configuration).listBankTransactions(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
644
+ }
645
+
646
+ /**
647
+ * Unlinks an already linked bank transaction
648
+ * @summary Unlink Bank Transaction
649
+ * @param {BankTransactionApiUnlinkBankTransactionRequest} requestParameters Request parameters.
650
+ * @param {*} [options] Override http request option.
651
+ * @throws {RequiredError}
652
+ * @memberof BankTransactionApi
653
+ */
654
+ public unlinkBankTransaction(requestParameters: BankTransactionApiUnlinkBankTransactionRequest, options?: AxiosRequestConfig) {
655
+ return BankTransactionApiFp(this.configuration).unlinkBankTransaction(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
656
+ }
657
+ }
@@ -5,7 +5,7 @@
5
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
6
  *
7
7
  * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
8
+ * Contact: z
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
11
  * https://openapi-generator.tech