@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
@@ -3,10 +3,10 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Emil Payment Service
6
- * 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
+ * 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.
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0
9
- * Contact: z
9
+ * Contact: kontakt@emil.de
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
12
  * https://openapi-generator.tech
@@ -93,22 +93,22 @@ var BankAccountsApiAxiosParamCreator = function (configuration) {
93
93
  var _this = this;
94
94
  return {
95
95
  /**
96
- * Creates a bank account for a specified account.
97
- * @summary Create a bank account
98
- * @param {object} body
96
+ * This will create a bank account for a specified partner/account. If this is the first bank account for the specified partner/account, it will be marked as primary.
97
+ * @summary Create the bank account
98
+ * @param {CreateBankAccountRequestDto} createBankAccountRequestDto
99
99
  * @param {string} [authorization] Bearer Token
100
100
  * @param {*} [options] Override http request option.
101
101
  * @throws {RequiredError}
102
102
  */
103
- createBankAccount: function (body, authorization, options) {
103
+ createBankAccount: function (createBankAccountRequestDto, authorization, options) {
104
104
  if (options === void 0) { options = {}; }
105
105
  return __awaiter(_this, void 0, void 0, function () {
106
106
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
107
  return __generator(this, function (_a) {
108
108
  switch (_a.label) {
109
109
  case 0:
110
- // verify required parameter 'body' is not null or undefined
111
- (0, common_1.assertParamExists)('createBankAccount', 'body', body);
110
+ // verify required parameter 'createBankAccountRequestDto' is not null or undefined
111
+ (0, common_1.assertParamExists)('createBankAccount', 'createBankAccountRequestDto', createBankAccountRequestDto);
112
112
  localVarPath = "/paymentservice/v1/bank-accounts";
113
113
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
114
114
  if (configuration) {
@@ -132,7 +132,7 @@ var BankAccountsApiAxiosParamCreator = function (configuration) {
132
132
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
133
133
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
134
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
135
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
135
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createBankAccountRequestDto, localVarRequestOptions, configuration);
136
136
  return [2 /*return*/, {
137
137
  url: (0, common_1.toPathString)(localVarUrlObj),
138
138
  options: localVarRequestOptions,
@@ -142,27 +142,73 @@ var BankAccountsApiAxiosParamCreator = function (configuration) {
142
142
  });
143
143
  },
144
144
  /**
145
- * 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.
146
- * @summary List bank accounts
145
+ * Deletes a bank account by code. If the bank account was primary, then the first available bank account for the specified partner/account will be marked as primary.
146
+ * @summary Delete the bank account
147
+ * @param {string} code Unique identifier for the object.
147
148
  * @param {string} [authorization] Bearer Token
148
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
149
- * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
150
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
151
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
152
- * @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.
153
- * @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.
154
- * @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.
155
149
  * @param {*} [options] Override http request option.
156
150
  * @throws {RequiredError}
157
151
  */
158
- listBankAccounts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
152
+ deleteBankAccount: function (code, authorization, options) {
159
153
  if (options === void 0) { options = {}; }
160
154
  return __awaiter(_this, void 0, void 0, function () {
161
155
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
162
156
  return __generator(this, function (_a) {
163
157
  switch (_a.label) {
164
158
  case 0:
165
- localVarPath = "/paymentservice/v1/bank-accounts";
159
+ // verify required parameter 'code' is not null or undefined
160
+ (0, common_1.assertParamExists)('deleteBankAccount', 'code', code);
161
+ localVarPath = "/paymentservice/v1/bank-accounts/{code}"
162
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
163
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
164
+ if (configuration) {
165
+ baseOptions = configuration.baseOptions;
166
+ baseAccessToken = configuration.accessToken;
167
+ }
168
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
169
+ localVarHeaderParameter = {};
170
+ localVarQueryParameter = {};
171
+ // authentication bearer required
172
+ // http bearer authentication required
173
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
174
+ case 1:
175
+ // authentication bearer required
176
+ // http bearer authentication required
177
+ _a.sent();
178
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
179
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
180
+ }
181
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
182
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
183
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
184
+ return [2 /*return*/, {
185
+ url: (0, common_1.toPathString)(localVarUrlObj),
186
+ options: localVarRequestOptions,
187
+ }];
188
+ }
189
+ });
190
+ });
191
+ },
192
+ /**
193
+ * Retrieves the details of the bank account that was previously created. Supply the unique bank account code that was returned when you created it and Emil Api will return the corresponding bank account information.
194
+ * @summary Retrieve the bank account
195
+ * @param {string} code
196
+ * @param {string} [authorization] Bearer Token
197
+ * @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.<br/> <br/> <i>Allowed values: primaryBankAccount<i>
198
+ * @param {*} [options] Override http request option.
199
+ * @throws {RequiredError}
200
+ */
201
+ getBankAccount: function (code, authorization, expand, options) {
202
+ if (options === void 0) { options = {}; }
203
+ return __awaiter(_this, void 0, void 0, function () {
204
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
205
+ return __generator(this, function (_a) {
206
+ switch (_a.label) {
207
+ case 0:
208
+ // verify required parameter 'code' is not null or undefined
209
+ (0, common_1.assertParamExists)('getBankAccount', 'code', code);
210
+ localVarPath = "/paymentservice/v1/bank-accounts/{code}"
211
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
166
212
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
167
213
  if (configuration) {
168
214
  baseOptions = configuration.baseOptions;
@@ -178,17 +224,62 @@ var BankAccountsApiAxiosParamCreator = function (configuration) {
178
224
  // authentication bearer required
179
225
  // http bearer authentication required
180
226
  _a.sent();
181
- if (pageSize !== undefined) {
182
- localVarQueryParameter['pageSize'] = pageSize;
227
+ if (expand !== undefined) {
228
+ localVarQueryParameter['expand'] = expand;
229
+ }
230
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
183
232
  }
184
- if (pageToken !== undefined) {
185
- localVarQueryParameter['pageToken'] = pageToken;
233
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
234
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
235
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
236
+ return [2 /*return*/, {
237
+ url: (0, common_1.toPathString)(localVarUrlObj),
238
+ options: localVarRequestOptions,
239
+ }];
240
+ }
241
+ });
242
+ });
243
+ },
244
+ /**
245
+ * Returns a list of bank accounts you have previously created. The bank accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
246
+ * @summary List bank accounts
247
+ * @param {string} [authorization] Bearer Token
248
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, id, accountCode, partnerCode</i>
249
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, id, accountCode, partnerCode</i>
250
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt</i>
251
+ * @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.<br/> <br/> <i>Allowed values: primaryBankAccount<i>
252
+ * @param {*} [options] Override http request option.
253
+ * @throws {RequiredError}
254
+ */
255
+ listBankAccounts: function (authorization, filter, filters, order, expand, options) {
256
+ if (options === void 0) { options = {}; }
257
+ return __awaiter(_this, void 0, void 0, function () {
258
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
259
+ return __generator(this, function (_a) {
260
+ switch (_a.label) {
261
+ case 0:
262
+ localVarPath = "/paymentservice/v1/bank-accounts";
263
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
264
+ if (configuration) {
265
+ baseOptions = configuration.baseOptions;
266
+ baseAccessToken = configuration.accessToken;
186
267
  }
268
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
269
+ localVarHeaderParameter = {};
270
+ localVarQueryParameter = {};
271
+ // authentication bearer required
272
+ // http bearer authentication required
273
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
274
+ case 1:
275
+ // authentication bearer required
276
+ // http bearer authentication required
277
+ _a.sent();
187
278
  if (filter !== undefined) {
188
279
  localVarQueryParameter['filter'] = filter;
189
280
  }
190
- if (search !== undefined) {
191
- localVarQueryParameter['search'] = search;
281
+ if (filters !== undefined) {
282
+ localVarQueryParameter['filters'] = filters;
192
283
  }
193
284
  if (order !== undefined) {
194
285
  localVarQueryParameter['order'] = order;
@@ -196,15 +287,118 @@ var BankAccountsApiAxiosParamCreator = function (configuration) {
196
287
  if (expand !== undefined) {
197
288
  localVarQueryParameter['expand'] = expand;
198
289
  }
199
- if (filters !== undefined) {
200
- localVarQueryParameter['filters'] = filters;
290
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
291
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
292
+ }
293
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
294
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
295
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
296
+ return [2 /*return*/, {
297
+ url: (0, common_1.toPathString)(localVarUrlObj),
298
+ options: localVarRequestOptions,
299
+ }];
300
+ }
301
+ });
302
+ });
303
+ },
304
+ /**
305
+ * Set the primary bank account for the specified partner/account
306
+ * @summary Set primary bank account
307
+ * @param {string} code Code of the bank account to set primary
308
+ * @param {SetPrimaryBankAccountRequestDtoRest} setPrimaryBankAccountRequestDtoRest
309
+ * @param {string} [authorization] Bearer Token
310
+ * @param {*} [options] Override http request option.
311
+ * @throws {RequiredError}
312
+ */
313
+ setPrimaryBankAccount: function (code, setPrimaryBankAccountRequestDtoRest, authorization, options) {
314
+ if (options === void 0) { options = {}; }
315
+ return __awaiter(_this, void 0, void 0, function () {
316
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
317
+ return __generator(this, function (_a) {
318
+ switch (_a.label) {
319
+ case 0:
320
+ // verify required parameter 'code' is not null or undefined
321
+ (0, common_1.assertParamExists)('setPrimaryBankAccount', 'code', code);
322
+ // verify required parameter 'setPrimaryBankAccountRequestDtoRest' is not null or undefined
323
+ (0, common_1.assertParamExists)('setPrimaryBankAccount', 'setPrimaryBankAccountRequestDtoRest', setPrimaryBankAccountRequestDtoRest);
324
+ localVarPath = "/paymentservice/v1/bank-accounts/{code}/primary"
325
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
326
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
327
+ if (configuration) {
328
+ baseOptions = configuration.baseOptions;
329
+ baseAccessToken = configuration.accessToken;
330
+ }
331
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
332
+ localVarHeaderParameter = {};
333
+ localVarQueryParameter = {};
334
+ // authentication bearer required
335
+ // http bearer authentication required
336
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
337
+ case 1:
338
+ // authentication bearer required
339
+ // http bearer authentication required
340
+ _a.sent();
341
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
342
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
343
+ }
344
+ localVarHeaderParameter['Content-Type'] = 'application/json';
345
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
346
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
347
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
348
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(setPrimaryBankAccountRequestDtoRest, localVarRequestOptions, configuration);
349
+ return [2 /*return*/, {
350
+ url: (0, common_1.toPathString)(localVarUrlObj),
351
+ options: localVarRequestOptions,
352
+ }];
353
+ }
354
+ });
355
+ });
356
+ },
357
+ /**
358
+ * Update a bank account by code
359
+ * @summary Update the bank account
360
+ * @param {string} code Unique identifier for the object.
361
+ * @param {UpdateBankAccountRequestDtoRest} updateBankAccountRequestDtoRest
362
+ * @param {string} [authorization] Bearer Token
363
+ * @param {*} [options] Override http request option.
364
+ * @throws {RequiredError}
365
+ */
366
+ updateBankAccount: function (code, updateBankAccountRequestDtoRest, authorization, options) {
367
+ if (options === void 0) { options = {}; }
368
+ return __awaiter(_this, void 0, void 0, function () {
369
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
370
+ return __generator(this, function (_a) {
371
+ switch (_a.label) {
372
+ case 0:
373
+ // verify required parameter 'code' is not null or undefined
374
+ (0, common_1.assertParamExists)('updateBankAccount', 'code', code);
375
+ // verify required parameter 'updateBankAccountRequestDtoRest' is not null or undefined
376
+ (0, common_1.assertParamExists)('updateBankAccount', 'updateBankAccountRequestDtoRest', updateBankAccountRequestDtoRest);
377
+ localVarPath = "/paymentservice/v1/bank-accounts/{code}"
378
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
379
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
380
+ if (configuration) {
381
+ baseOptions = configuration.baseOptions;
382
+ baseAccessToken = configuration.accessToken;
201
383
  }
384
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
385
+ localVarHeaderParameter = {};
386
+ localVarQueryParameter = {};
387
+ // authentication bearer required
388
+ // http bearer authentication required
389
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
390
+ case 1:
391
+ // authentication bearer required
392
+ // http bearer authentication required
393
+ _a.sent();
202
394
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
203
395
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
204
396
  }
397
+ localVarHeaderParameter['Content-Type'] = 'application/json';
205
398
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
206
399
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
207
400
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
401
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateBankAccountRequestDtoRest, localVarRequestOptions, configuration);
208
402
  return [2 /*return*/, {
209
403
  url: (0, common_1.toPathString)(localVarUrlObj),
210
404
  options: localVarRequestOptions,
@@ -224,19 +418,19 @@ var BankAccountsApiFp = function (configuration) {
224
418
  var localVarAxiosParamCreator = (0, exports.BankAccountsApiAxiosParamCreator)(configuration);
225
419
  return {
226
420
  /**
227
- * Creates a bank account for a specified account.
228
- * @summary Create a bank account
229
- * @param {object} body
421
+ * This will create a bank account for a specified partner/account. If this is the first bank account for the specified partner/account, it will be marked as primary.
422
+ * @summary Create the bank account
423
+ * @param {CreateBankAccountRequestDto} createBankAccountRequestDto
230
424
  * @param {string} [authorization] Bearer Token
231
425
  * @param {*} [options] Override http request option.
232
426
  * @throws {RequiredError}
233
427
  */
234
- createBankAccount: function (body, authorization, options) {
428
+ createBankAccount: function (createBankAccountRequestDto, authorization, options) {
235
429
  return __awaiter(this, void 0, void 0, function () {
236
430
  var localVarAxiosArgs;
237
431
  return __generator(this, function (_a) {
238
432
  switch (_a.label) {
239
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.createBankAccount(body, authorization, options)];
433
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createBankAccount(createBankAccountRequestDto, authorization, options)];
240
434
  case 1:
241
435
  localVarAxiosArgs = _a.sent();
242
436
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -245,25 +439,109 @@ var BankAccountsApiFp = function (configuration) {
245
439
  });
246
440
  },
247
441
  /**
248
- * 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.
442
+ * Deletes a bank account by code. If the bank account was primary, then the first available bank account for the specified partner/account will be marked as primary.
443
+ * @summary Delete the bank account
444
+ * @param {string} code Unique identifier for the object.
445
+ * @param {string} [authorization] Bearer Token
446
+ * @param {*} [options] Override http request option.
447
+ * @throws {RequiredError}
448
+ */
449
+ deleteBankAccount: function (code, authorization, options) {
450
+ return __awaiter(this, void 0, void 0, function () {
451
+ var localVarAxiosArgs;
452
+ return __generator(this, function (_a) {
453
+ switch (_a.label) {
454
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteBankAccount(code, authorization, options)];
455
+ case 1:
456
+ localVarAxiosArgs = _a.sent();
457
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
458
+ }
459
+ });
460
+ });
461
+ },
462
+ /**
463
+ * Retrieves the details of the bank account that was previously created. Supply the unique bank account code that was returned when you created it and Emil Api will return the corresponding bank account information.
464
+ * @summary Retrieve the bank account
465
+ * @param {string} code
466
+ * @param {string} [authorization] Bearer Token
467
+ * @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.<br/> <br/> <i>Allowed values: primaryBankAccount<i>
468
+ * @param {*} [options] Override http request option.
469
+ * @throws {RequiredError}
470
+ */
471
+ getBankAccount: function (code, authorization, expand, options) {
472
+ return __awaiter(this, void 0, void 0, function () {
473
+ var localVarAxiosArgs;
474
+ return __generator(this, function (_a) {
475
+ switch (_a.label) {
476
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getBankAccount(code, authorization, expand, options)];
477
+ case 1:
478
+ localVarAxiosArgs = _a.sent();
479
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
480
+ }
481
+ });
482
+ });
483
+ },
484
+ /**
485
+ * Returns a list of bank accounts you have previously created. The bank accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
249
486
  * @summary List bank accounts
250
487
  * @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=1, your subsequent call can include pageToken=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=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.
488
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, id, accountCode, partnerCode</i>
489
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, id, accountCode, partnerCode</i>
490
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt</i>
491
+ * @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.<br/> <br/> <i>Allowed values: primaryBankAccount<i>
492
+ * @param {*} [options] Override http request option.
493
+ * @throws {RequiredError}
494
+ */
495
+ listBankAccounts: function (authorization, filter, filters, order, expand, options) {
496
+ return __awaiter(this, void 0, void 0, function () {
497
+ var localVarAxiosArgs;
498
+ return __generator(this, function (_a) {
499
+ switch (_a.label) {
500
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listBankAccounts(authorization, filter, filters, order, expand, options)];
501
+ case 1:
502
+ localVarAxiosArgs = _a.sent();
503
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
504
+ }
505
+ });
506
+ });
507
+ },
508
+ /**
509
+ * Set the primary bank account for the specified partner/account
510
+ * @summary Set primary bank account
511
+ * @param {string} code Code of the bank account to set primary
512
+ * @param {SetPrimaryBankAccountRequestDtoRest} setPrimaryBankAccountRequestDtoRest
513
+ * @param {string} [authorization] Bearer Token
514
+ * @param {*} [options] Override http request option.
515
+ * @throws {RequiredError}
516
+ */
517
+ setPrimaryBankAccount: function (code, setPrimaryBankAccountRequestDtoRest, authorization, options) {
518
+ return __awaiter(this, void 0, void 0, function () {
519
+ var localVarAxiosArgs;
520
+ return __generator(this, function (_a) {
521
+ switch (_a.label) {
522
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.setPrimaryBankAccount(code, setPrimaryBankAccountRequestDtoRest, authorization, options)];
523
+ case 1:
524
+ localVarAxiosArgs = _a.sent();
525
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
526
+ }
527
+ });
528
+ });
529
+ },
530
+ /**
531
+ * Update a bank account by code
532
+ * @summary Update the bank account
533
+ * @param {string} code Unique identifier for the object.
534
+ * @param {UpdateBankAccountRequestDtoRest} updateBankAccountRequestDtoRest
535
+ * @param {string} [authorization] Bearer Token
258
536
  * @param {*} [options] Override http request option.
259
537
  * @throws {RequiredError}
260
538
  */
261
- listBankAccounts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
539
+ updateBankAccount: function (code, updateBankAccountRequestDtoRest, authorization, options) {
262
540
  return __awaiter(this, void 0, void 0, function () {
263
541
  var localVarAxiosArgs;
264
542
  return __generator(this, function (_a) {
265
543
  switch (_a.label) {
266
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listBankAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
544
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateBankAccount(code, updateBankAccountRequestDtoRest, authorization, options)];
267
545
  case 1:
268
546
  localVarAxiosArgs = _a.sent();
269
547
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -282,32 +560,76 @@ var BankAccountsApiFactory = function (configuration, basePath, axios) {
282
560
  var localVarFp = (0, exports.BankAccountsApiFp)(configuration);
283
561
  return {
284
562
  /**
285
- * Creates a bank account for a specified account.
286
- * @summary Create a bank account
287
- * @param {object} body
563
+ * This will create a bank account for a specified partner/account. If this is the first bank account for the specified partner/account, it will be marked as primary.
564
+ * @summary Create the bank account
565
+ * @param {CreateBankAccountRequestDto} createBankAccountRequestDto
566
+ * @param {string} [authorization] Bearer Token
567
+ * @param {*} [options] Override http request option.
568
+ * @throws {RequiredError}
569
+ */
570
+ createBankAccount: function (createBankAccountRequestDto, authorization, options) {
571
+ return localVarFp.createBankAccount(createBankAccountRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
572
+ },
573
+ /**
574
+ * Deletes a bank account by code. If the bank account was primary, then the first available bank account for the specified partner/account will be marked as primary.
575
+ * @summary Delete the bank account
576
+ * @param {string} code Unique identifier for the object.
577
+ * @param {string} [authorization] Bearer Token
578
+ * @param {*} [options] Override http request option.
579
+ * @throws {RequiredError}
580
+ */
581
+ deleteBankAccount: function (code, authorization, options) {
582
+ return localVarFp.deleteBankAccount(code, authorization, options).then(function (request) { return request(axios, basePath); });
583
+ },
584
+ /**
585
+ * Retrieves the details of the bank account that was previously created. Supply the unique bank account code that was returned when you created it and Emil Api will return the corresponding bank account information.
586
+ * @summary Retrieve the bank account
587
+ * @param {string} code
288
588
  * @param {string} [authorization] Bearer Token
589
+ * @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.<br/> <br/> <i>Allowed values: primaryBankAccount<i>
289
590
  * @param {*} [options] Override http request option.
290
591
  * @throws {RequiredError}
291
592
  */
292
- createBankAccount: function (body, authorization, options) {
293
- return localVarFp.createBankAccount(body, authorization, options).then(function (request) { return request(axios, basePath); });
593
+ getBankAccount: function (code, authorization, expand, options) {
594
+ return localVarFp.getBankAccount(code, authorization, expand, options).then(function (request) { return request(axios, basePath); });
294
595
  },
295
596
  /**
296
- * 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.
597
+ * Returns a list of bank accounts you have previously created. The bank accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
297
598
  * @summary List bank accounts
298
599
  * @param {string} [authorization] Bearer Token
299
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
300
- * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
301
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
302
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
303
- * @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.
304
- * @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.
305
- * @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.
600
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, id, accountCode, partnerCode</i>
601
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, id, accountCode, partnerCode</i>
602
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt</i>
603
+ * @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.<br/> <br/> <i>Allowed values: primaryBankAccount<i>
306
604
  * @param {*} [options] Override http request option.
307
605
  * @throws {RequiredError}
308
606
  */
309
- listBankAccounts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
310
- return localVarFp.listBankAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
607
+ listBankAccounts: function (authorization, filter, filters, order, expand, options) {
608
+ return localVarFp.listBankAccounts(authorization, filter, filters, order, expand, options).then(function (request) { return request(axios, basePath); });
609
+ },
610
+ /**
611
+ * Set the primary bank account for the specified partner/account
612
+ * @summary Set primary bank account
613
+ * @param {string} code Code of the bank account to set primary
614
+ * @param {SetPrimaryBankAccountRequestDtoRest} setPrimaryBankAccountRequestDtoRest
615
+ * @param {string} [authorization] Bearer Token
616
+ * @param {*} [options] Override http request option.
617
+ * @throws {RequiredError}
618
+ */
619
+ setPrimaryBankAccount: function (code, setPrimaryBankAccountRequestDtoRest, authorization, options) {
620
+ return localVarFp.setPrimaryBankAccount(code, setPrimaryBankAccountRequestDtoRest, authorization, options).then(function (request) { return request(axios, basePath); });
621
+ },
622
+ /**
623
+ * Update a bank account by code
624
+ * @summary Update the bank account
625
+ * @param {string} code Unique identifier for the object.
626
+ * @param {UpdateBankAccountRequestDtoRest} updateBankAccountRequestDtoRest
627
+ * @param {string} [authorization] Bearer Token
628
+ * @param {*} [options] Override http request option.
629
+ * @throws {RequiredError}
630
+ */
631
+ updateBankAccount: function (code, updateBankAccountRequestDtoRest, authorization, options) {
632
+ return localVarFp.updateBankAccount(code, updateBankAccountRequestDtoRest, authorization, options).then(function (request) { return request(axios, basePath); });
311
633
  },
312
634
  };
313
635
  };
@@ -324,8 +646,8 @@ var BankAccountsApi = /** @class */ (function (_super) {
324
646
  return _super !== null && _super.apply(this, arguments) || this;
325
647
  }
326
648
  /**
327
- * Creates a bank account for a specified account.
328
- * @summary Create a bank account
649
+ * This will create a bank account for a specified partner/account. If this is the first bank account for the specified partner/account, it will be marked as primary.
650
+ * @summary Create the bank account
329
651
  * @param {BankAccountsApiCreateBankAccountRequest} requestParameters Request parameters.
330
652
  * @param {*} [options] Override http request option.
331
653
  * @throws {RequiredError}
@@ -333,10 +655,34 @@ var BankAccountsApi = /** @class */ (function (_super) {
333
655
  */
334
656
  BankAccountsApi.prototype.createBankAccount = function (requestParameters, options) {
335
657
  var _this = this;
336
- return (0, exports.BankAccountsApiFp)(this.configuration).createBankAccount(requestParameters.body, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
658
+ return (0, exports.BankAccountsApiFp)(this.configuration).createBankAccount(requestParameters.createBankAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
659
+ };
660
+ /**
661
+ * Deletes a bank account by code. If the bank account was primary, then the first available bank account for the specified partner/account will be marked as primary.
662
+ * @summary Delete the bank account
663
+ * @param {BankAccountsApiDeleteBankAccountRequest} requestParameters Request parameters.
664
+ * @param {*} [options] Override http request option.
665
+ * @throws {RequiredError}
666
+ * @memberof BankAccountsApi
667
+ */
668
+ BankAccountsApi.prototype.deleteBankAccount = function (requestParameters, options) {
669
+ var _this = this;
670
+ return (0, exports.BankAccountsApiFp)(this.configuration).deleteBankAccount(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
337
671
  };
338
672
  /**
339
- * 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.
673
+ * Retrieves the details of the bank account that was previously created. Supply the unique bank account code that was returned when you created it and Emil Api will return the corresponding bank account information.
674
+ * @summary Retrieve the bank account
675
+ * @param {BankAccountsApiGetBankAccountRequest} requestParameters Request parameters.
676
+ * @param {*} [options] Override http request option.
677
+ * @throws {RequiredError}
678
+ * @memberof BankAccountsApi
679
+ */
680
+ BankAccountsApi.prototype.getBankAccount = function (requestParameters, options) {
681
+ var _this = this;
682
+ return (0, exports.BankAccountsApiFp)(this.configuration).getBankAccount(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
683
+ };
684
+ /**
685
+ * Returns a list of bank accounts you have previously created. The bank accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
340
686
  * @summary List bank accounts
341
687
  * @param {BankAccountsApiListBankAccountsRequest} requestParameters Request parameters.
342
688
  * @param {*} [options] Override http request option.
@@ -346,7 +692,31 @@ var BankAccountsApi = /** @class */ (function (_super) {
346
692
  BankAccountsApi.prototype.listBankAccounts = function (requestParameters, options) {
347
693
  var _this = this;
348
694
  if (requestParameters === void 0) { requestParameters = {}; }
349
- return (0, exports.BankAccountsApiFp)(this.configuration).listBankAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
695
+ return (0, exports.BankAccountsApiFp)(this.configuration).listBankAccounts(requestParameters.authorization, requestParameters.filter, requestParameters.filters, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
696
+ };
697
+ /**
698
+ * Set the primary bank account for the specified partner/account
699
+ * @summary Set primary bank account
700
+ * @param {BankAccountsApiSetPrimaryBankAccountRequest} requestParameters Request parameters.
701
+ * @param {*} [options] Override http request option.
702
+ * @throws {RequiredError}
703
+ * @memberof BankAccountsApi
704
+ */
705
+ BankAccountsApi.prototype.setPrimaryBankAccount = function (requestParameters, options) {
706
+ var _this = this;
707
+ return (0, exports.BankAccountsApiFp)(this.configuration).setPrimaryBankAccount(requestParameters.code, requestParameters.setPrimaryBankAccountRequestDtoRest, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
708
+ };
709
+ /**
710
+ * Update a bank account by code
711
+ * @summary Update the bank account
712
+ * @param {BankAccountsApiUpdateBankAccountRequest} requestParameters Request parameters.
713
+ * @param {*} [options] Override http request option.
714
+ * @throws {RequiredError}
715
+ * @memberof BankAccountsApi
716
+ */
717
+ BankAccountsApi.prototype.updateBankAccount = function (requestParameters, options) {
718
+ var _this = this;
719
+ return (0, exports.BankAccountsApiFp)(this.configuration).updateBankAccount(requestParameters.code, requestParameters.updateBankAccountRequestDtoRest, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
350
720
  };
351
721
  return BankAccountsApi;
352
722
  }(base_1.BaseAPI));