@emilgroup/payment-sdk-node 1.13.1-beta.13 → 1.13.1-beta.17

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 (42) hide show
  1. package/.openapi-generator/FILES +5 -0
  2. package/README.md +2 -2
  3. package/api/bank-accounts-api.ts +346 -22
  4. package/api/bank-transaction-api.ts +12 -12
  5. package/api/payment-methods-api.ts +38 -145
  6. package/api/payment-reminders-api.ts +12 -12
  7. package/api/payments-api.ts +42 -45
  8. package/api/refunds-api.ts +4 -4
  9. package/api/tenant-bank-account-api.ts +20 -20
  10. package/dist/api/bank-accounts-api.d.ts +193 -16
  11. package/dist/api/bank-accounts-api.js +302 -19
  12. package/dist/api/bank-transaction-api.d.ts +12 -12
  13. package/dist/api/bank-transaction-api.js +11 -11
  14. package/dist/api/payment-methods-api.d.ts +29 -84
  15. package/dist/api/payment-methods-api.js +33 -129
  16. package/dist/api/payment-reminders-api.d.ts +12 -12
  17. package/dist/api/payment-reminders-api.js +11 -11
  18. package/dist/api/payments-api.d.ts +33 -33
  19. package/dist/api/payments-api.js +37 -39
  20. package/dist/api/refunds-api.d.ts +4 -4
  21. package/dist/api/refunds-api.js +3 -3
  22. package/dist/api/tenant-bank-account-api.d.ts +20 -20
  23. package/dist/api/tenant-bank-account-api.js +14 -14
  24. package/dist/models/bank-account-class.d.ts +67 -0
  25. package/dist/models/bank-account-class.js +15 -0
  26. package/dist/models/create-bank-account-request-dto.d.ts +30 -0
  27. package/dist/models/create-bank-account-request-dto.js +15 -0
  28. package/dist/models/get-bank-account-response-class.d.ts +25 -0
  29. package/dist/models/get-bank-account-response-class.js +15 -0
  30. package/dist/models/index.d.ts +5 -0
  31. package/dist/models/index.js +5 -0
  32. package/dist/models/primary-bank-account-response-class.d.ts +42 -0
  33. package/dist/models/primary-bank-account-response-class.js +15 -0
  34. package/dist/models/set-primary-bank-account-request-dto-rest.d.ts +24 -0
  35. package/dist/models/set-primary-bank-account-request-dto-rest.js +15 -0
  36. package/models/bank-account-class.ts +73 -0
  37. package/models/create-bank-account-request-dto.ts +36 -0
  38. package/models/get-bank-account-response-class.ts +31 -0
  39. package/models/index.ts +5 -0
  40. package/models/primary-bank-account-response-class.ts +48 -0
  41. package/models/set-primary-bank-account-request-dto-rest.ts +30 -0
  42. package/package.json +1 -1
@@ -18,7 +18,9 @@ common.ts
18
18
  configuration.ts
19
19
  git_push.sh
20
20
  index.ts
21
+ models/bank-account-class.ts
21
22
  models/bank-transaction-response-class.ts
23
+ models/create-bank-account-request-dto.ts
22
24
  models/create-payment-reminder-request-dto.ts
23
25
  models/create-payment-request-dto.ts
24
26
  models/create-refund-request-dto.ts
@@ -26,6 +28,7 @@ models/create-refund-response-class.ts
26
28
  models/create-tenant-bank-account-request-dto.ts
27
29
  models/create-tenant-bank-account-response-class.ts
28
30
  models/deactivate-payment-reminder-request-dto.ts
31
+ models/get-bank-account-response-class.ts
29
32
  models/get-bank-transactions-response-class.ts
30
33
  models/get-refund-response-class.ts
31
34
  models/get-request-dto.ts
@@ -37,7 +40,9 @@ models/link-bank-transaction-request-dto-rest.ts
37
40
  models/list-bank-transactions-response-class.ts
38
41
  models/list-refunds-response-class.ts
39
42
  models/list-tenant-bank-account-response-class.ts
43
+ models/primary-bank-account-response-class.ts
40
44
  models/refund-class.ts
45
+ models/set-primary-bank-account-request-dto-rest.ts
41
46
  models/tenant-bank-account-response-class.ts
42
47
  models/transaction-class.ts
43
48
  models/unlink-bank-transaction-request-dto-rest.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/payment-sdk-node@1.13.1-beta.13 --save
20
+ npm install @emilgroup/payment-sdk-node@1.13.1-beta.17 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/payment-sdk-node@1.13.1-beta.13
24
+ yarn add @emilgroup/payment-sdk-node@1.13.1-beta.17
25
25
  ```
26
26
 
27
27
  And then you can import `PaymentsApi`.
@@ -20,6 +20,12 @@ import { Configuration } from '../configuration';
20
20
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
21
  // @ts-ignore
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { CreateBankAccountRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { GetBankAccountResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { SetPrimaryBankAccountRequestDtoRest } from '../models';
23
29
  // URLSearchParams not necessarily used
24
30
  // @ts-ignore
25
31
  import { URL, URLSearchParams } from 'url';
@@ -33,14 +39,14 @@ export const BankAccountsApiAxiosParamCreator = function (configuration?: Config
33
39
  /**
34
40
  * Creates a bank account for a specified account.
35
41
  * @summary Create a bank account
36
- * @param {object} body
42
+ * @param {CreateBankAccountRequestDto} createBankAccountRequestDto
37
43
  * @param {string} [authorization] Bearer Token
38
44
  * @param {*} [options] Override http request option.
39
45
  * @throws {RequiredError}
40
46
  */
41
- createBankAccount: async (body: object, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
42
- // verify required parameter 'body' is not null or undefined
43
- assertParamExists('createBankAccount', 'body', body)
47
+ createBankAccount: async (createBankAccountRequestDto: CreateBankAccountRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
48
+ // verify required parameter 'createBankAccountRequestDto' is not null or undefined
49
+ assertParamExists('createBankAccount', 'createBankAccountRequestDto', createBankAccountRequestDto)
44
50
  const localVarPath = `/paymentservice/v1/bank-accounts`;
45
51
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
46
52
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -70,7 +76,52 @@ export const BankAccountsApiAxiosParamCreator = function (configuration?: Config
70
76
  setSearchParams(localVarUrlObj, localVarQueryParameter);
71
77
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
72
78
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
73
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
79
+ localVarRequestOptions.data = serializeDataIfNeeded(createBankAccountRequestDto, localVarRequestOptions, configuration)
80
+
81
+ return {
82
+ url: toPathString(localVarUrlObj),
83
+ options: localVarRequestOptions,
84
+ };
85
+ },
86
+ /**
87
+ * Deletes a bank account by code
88
+ * @summary Delete the bank account
89
+ * @param {string} code Unique identifier for the object.
90
+ * @param {string} [authorization] Bearer Token
91
+ * @param {*} [options] Override http request option.
92
+ * @throws {RequiredError}
93
+ */
94
+ deleteBankAccount: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
95
+ // verify required parameter 'code' is not null or undefined
96
+ assertParamExists('deleteBankAccount', 'code', code)
97
+ const localVarPath = `/paymentservice/v1/bank-accounts/{code}`
98
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
99
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
100
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
101
+ let baseOptions;
102
+ let baseAccessToken;
103
+ if (configuration) {
104
+ baseOptions = configuration.baseOptions;
105
+ baseAccessToken = configuration.accessToken;
106
+ }
107
+
108
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
109
+ const localVarHeaderParameter = {} as any;
110
+ const localVarQueryParameter = {} as any;
111
+
112
+ // authentication bearer required
113
+ // http bearer authentication required
114
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
115
+
116
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
117
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
118
+ }
119
+
120
+
121
+
122
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
123
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
124
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
74
125
 
75
126
  return {
76
127
  url: toPathString(localVarUrlObj),
@@ -78,13 +129,58 @@ export const BankAccountsApiAxiosParamCreator = function (configuration?: Config
78
129
  };
79
130
  },
80
131
  /**
81
- * 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.
132
+ * 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.
133
+ * @summary Retrieve the Bank Account
134
+ * @param {string} code Unique identifier for the object.
135
+ * @param {string} [authorization] Bearer Token
136
+ * @param {*} [options] Override http request option.
137
+ * @throws {RequiredError}
138
+ */
139
+ getBankAccount: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
140
+ // verify required parameter 'code' is not null or undefined
141
+ assertParamExists('getBankAccount', 'code', code)
142
+ const localVarPath = `/paymentservice/v1/bank-accounts/{code}`
143
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
144
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
145
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
146
+ let baseOptions;
147
+ let baseAccessToken;
148
+ if (configuration) {
149
+ baseOptions = configuration.baseOptions;
150
+ baseAccessToken = configuration.accessToken;
151
+ }
152
+
153
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
154
+ const localVarHeaderParameter = {} as any;
155
+ const localVarQueryParameter = {} as any;
156
+
157
+ // authentication bearer required
158
+ // http bearer authentication required
159
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
160
+
161
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
162
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
163
+ }
164
+
165
+
166
+
167
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
168
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
169
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
170
+
171
+ return {
172
+ url: toPathString(localVarUrlObj),
173
+ options: localVarRequestOptions,
174
+ };
175
+ },
176
+ /**
177
+ * 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.
82
178
  * @summary List bank accounts
83
179
  * @param {string} [authorization] Bearer Token
84
180
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
85
181
  * @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.
86
182
  * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
87
- * @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.
183
+ * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
88
184
  * @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.
89
185
  * @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.
90
186
  * @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.
@@ -148,6 +244,57 @@ export const BankAccountsApiAxiosParamCreator = function (configuration?: Config
148
244
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
149
245
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
150
246
 
247
+ return {
248
+ url: toPathString(localVarUrlObj),
249
+ options: localVarRequestOptions,
250
+ };
251
+ },
252
+ /**
253
+ * Set Primary Bank account
254
+ * @summary Set Primary Bank account
255
+ * @param {string} code Code of the bank account to set primary
256
+ * @param {SetPrimaryBankAccountRequestDtoRest} setPrimaryBankAccountRequestDtoRest
257
+ * @param {string} [authorization] Bearer Token
258
+ * @param {*} [options] Override http request option.
259
+ * @throws {RequiredError}
260
+ */
261
+ setPrimaryBankAccount: async (code: string, setPrimaryBankAccountRequestDtoRest: SetPrimaryBankAccountRequestDtoRest, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
262
+ // verify required parameter 'code' is not null or undefined
263
+ assertParamExists('setPrimaryBankAccount', 'code', code)
264
+ // verify required parameter 'setPrimaryBankAccountRequestDtoRest' is not null or undefined
265
+ assertParamExists('setPrimaryBankAccount', 'setPrimaryBankAccountRequestDtoRest', setPrimaryBankAccountRequestDtoRest)
266
+ const localVarPath = `/paymentservice/v1/bank-accounts/{code}/primary`
267
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
268
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
269
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
270
+ let baseOptions;
271
+ let baseAccessToken;
272
+ if (configuration) {
273
+ baseOptions = configuration.baseOptions;
274
+ baseAccessToken = configuration.accessToken;
275
+ }
276
+
277
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
278
+ const localVarHeaderParameter = {} as any;
279
+ const localVarQueryParameter = {} as any;
280
+
281
+ // authentication bearer required
282
+ // http bearer authentication required
283
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
284
+
285
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
286
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
287
+ }
288
+
289
+
290
+
291
+ localVarHeaderParameter['Content-Type'] = 'application/json';
292
+
293
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
294
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
295
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
296
+ localVarRequestOptions.data = serializeDataIfNeeded(setPrimaryBankAccountRequestDtoRest, localVarRequestOptions, configuration)
297
+
151
298
  return {
152
299
  url: toPathString(localVarUrlObj),
153
300
  options: localVarRequestOptions,
@@ -166,23 +313,47 @@ export const BankAccountsApiFp = function(configuration?: Configuration) {
166
313
  /**
167
314
  * Creates a bank account for a specified account.
168
315
  * @summary Create a bank account
169
- * @param {object} body
316
+ * @param {CreateBankAccountRequestDto} createBankAccountRequestDto
317
+ * @param {string} [authorization] Bearer Token
318
+ * @param {*} [options] Override http request option.
319
+ * @throws {RequiredError}
320
+ */
321
+ async createBankAccount(createBankAccountRequestDto: CreateBankAccountRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
322
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createBankAccount(createBankAccountRequestDto, authorization, options);
323
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
324
+ },
325
+ /**
326
+ * Deletes a bank account by code
327
+ * @summary Delete the bank account
328
+ * @param {string} code Unique identifier for the object.
329
+ * @param {string} [authorization] Bearer Token
330
+ * @param {*} [options] Override http request option.
331
+ * @throws {RequiredError}
332
+ */
333
+ async deleteBankAccount(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
334
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBankAccount(code, authorization, options);
335
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
336
+ },
337
+ /**
338
+ * 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.
339
+ * @summary Retrieve the Bank Account
340
+ * @param {string} code Unique identifier for the object.
170
341
  * @param {string} [authorization] Bearer Token
171
342
  * @param {*} [options] Override http request option.
172
343
  * @throws {RequiredError}
173
344
  */
174
- async createBankAccount(body: object, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
175
- const localVarAxiosArgs = await localVarAxiosParamCreator.createBankAccount(body, authorization, options);
345
+ async getBankAccount(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBankAccountResponseClass>> {
346
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getBankAccount(code, authorization, options);
176
347
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
177
348
  },
178
349
  /**
179
- * 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.
350
+ * 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.
180
351
  * @summary List bank accounts
181
352
  * @param {string} [authorization] Bearer Token
182
353
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
183
354
  * @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
355
  * @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.
356
+ * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
186
357
  * @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
358
  * @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.
188
359
  * @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.
@@ -193,6 +364,19 @@ export const BankAccountsApiFp = function(configuration?: Configuration) {
193
364
  const localVarAxiosArgs = await localVarAxiosParamCreator.listBankAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
194
365
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
195
366
  },
367
+ /**
368
+ * Set Primary Bank account
369
+ * @summary Set Primary Bank account
370
+ * @param {string} code Code of the bank account to set primary
371
+ * @param {SetPrimaryBankAccountRequestDtoRest} setPrimaryBankAccountRequestDtoRest
372
+ * @param {string} [authorization] Bearer Token
373
+ * @param {*} [options] Override http request option.
374
+ * @throws {RequiredError}
375
+ */
376
+ async setPrimaryBankAccount(code: string, setPrimaryBankAccountRequestDtoRest: SetPrimaryBankAccountRequestDtoRest, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
377
+ const localVarAxiosArgs = await localVarAxiosParamCreator.setPrimaryBankAccount(code, setPrimaryBankAccountRequestDtoRest, authorization, options);
378
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
379
+ },
196
380
  }
197
381
  };
198
382
 
@@ -206,22 +390,44 @@ export const BankAccountsApiFactory = function (configuration?: Configuration, b
206
390
  /**
207
391
  * Creates a bank account for a specified account.
208
392
  * @summary Create a bank account
209
- * @param {object} body
393
+ * @param {CreateBankAccountRequestDto} createBankAccountRequestDto
210
394
  * @param {string} [authorization] Bearer Token
211
395
  * @param {*} [options] Override http request option.
212
396
  * @throws {RequiredError}
213
397
  */
214
- createBankAccount(body: object, authorization?: string, options?: any): AxiosPromise<void> {
215
- return localVarFp.createBankAccount(body, authorization, options).then((request) => request(axios, basePath));
398
+ createBankAccount(createBankAccountRequestDto: CreateBankAccountRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
399
+ return localVarFp.createBankAccount(createBankAccountRequestDto, authorization, options).then((request) => request(axios, basePath));
216
400
  },
217
401
  /**
218
- * 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.
402
+ * Deletes a bank account by code
403
+ * @summary Delete the bank account
404
+ * @param {string} code Unique identifier for the object.
405
+ * @param {string} [authorization] Bearer Token
406
+ * @param {*} [options] Override http request option.
407
+ * @throws {RequiredError}
408
+ */
409
+ deleteBankAccount(code: string, authorization?: string, options?: any): AxiosPromise<object> {
410
+ return localVarFp.deleteBankAccount(code, authorization, options).then((request) => request(axios, basePath));
411
+ },
412
+ /**
413
+ * 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.
414
+ * @summary Retrieve the Bank Account
415
+ * @param {string} code Unique identifier for the object.
416
+ * @param {string} [authorization] Bearer Token
417
+ * @param {*} [options] Override http request option.
418
+ * @throws {RequiredError}
419
+ */
420
+ getBankAccount(code: string, authorization?: string, options?: any): AxiosPromise<GetBankAccountResponseClass> {
421
+ return localVarFp.getBankAccount(code, authorization, options).then((request) => request(axios, basePath));
422
+ },
423
+ /**
424
+ * 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.
219
425
  * @summary List bank accounts
220
426
  * @param {string} [authorization] Bearer Token
221
427
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
222
428
  * @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.
223
429
  * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
224
- * @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.
430
+ * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
225
431
  * @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.
226
432
  * @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.
227
433
  * @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.
@@ -231,6 +437,18 @@ export const BankAccountsApiFactory = function (configuration?: Configuration, b
231
437
  listBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<void> {
232
438
  return localVarFp.listBankAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
233
439
  },
440
+ /**
441
+ * Set Primary Bank account
442
+ * @summary Set Primary Bank account
443
+ * @param {string} code Code of the bank account to set primary
444
+ * @param {SetPrimaryBankAccountRequestDtoRest} setPrimaryBankAccountRequestDtoRest
445
+ * @param {string} [authorization] Bearer Token
446
+ * @param {*} [options] Override http request option.
447
+ * @throws {RequiredError}
448
+ */
449
+ setPrimaryBankAccount(code: string, setPrimaryBankAccountRequestDtoRest: SetPrimaryBankAccountRequestDtoRest, authorization?: string, options?: any): AxiosPromise<void> {
450
+ return localVarFp.setPrimaryBankAccount(code, setPrimaryBankAccountRequestDtoRest, authorization, options).then((request) => request(axios, basePath));
451
+ },
234
452
  };
235
453
  };
236
454
 
@@ -242,10 +460,10 @@ export const BankAccountsApiFactory = function (configuration?: Configuration, b
242
460
  export interface BankAccountsApiCreateBankAccountRequest {
243
461
  /**
244
462
  *
245
- * @type {object}
463
+ * @type {CreateBankAccountRequestDto}
246
464
  * @memberof BankAccountsApiCreateBankAccount
247
465
  */
248
- readonly body: object
466
+ readonly createBankAccountRequestDto: CreateBankAccountRequestDto
249
467
 
250
468
  /**
251
469
  * Bearer Token
@@ -255,6 +473,48 @@ export interface BankAccountsApiCreateBankAccountRequest {
255
473
  readonly authorization?: string
256
474
  }
257
475
 
476
+ /**
477
+ * Request parameters for deleteBankAccount operation in BankAccountsApi.
478
+ * @export
479
+ * @interface BankAccountsApiDeleteBankAccountRequest
480
+ */
481
+ export interface BankAccountsApiDeleteBankAccountRequest {
482
+ /**
483
+ * Unique identifier for the object.
484
+ * @type {string}
485
+ * @memberof BankAccountsApiDeleteBankAccount
486
+ */
487
+ readonly code: string
488
+
489
+ /**
490
+ * Bearer Token
491
+ * @type {string}
492
+ * @memberof BankAccountsApiDeleteBankAccount
493
+ */
494
+ readonly authorization?: string
495
+ }
496
+
497
+ /**
498
+ * Request parameters for getBankAccount operation in BankAccountsApi.
499
+ * @export
500
+ * @interface BankAccountsApiGetBankAccountRequest
501
+ */
502
+ export interface BankAccountsApiGetBankAccountRequest {
503
+ /**
504
+ * Unique identifier for the object.
505
+ * @type {string}
506
+ * @memberof BankAccountsApiGetBankAccount
507
+ */
508
+ readonly code: string
509
+
510
+ /**
511
+ * Bearer Token
512
+ * @type {string}
513
+ * @memberof BankAccountsApiGetBankAccount
514
+ */
515
+ readonly authorization?: string
516
+ }
517
+
258
518
  /**
259
519
  * Request parameters for listBankAccounts operation in BankAccountsApi.
260
520
  * @export
@@ -290,7 +550,7 @@ export interface BankAccountsApiListBankAccountsRequest {
290
550
  readonly filter?: any
291
551
 
292
552
  /**
293
- * 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.
553
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
294
554
  * @type {any}
295
555
  * @memberof BankAccountsApiListBankAccounts
296
556
  */
@@ -318,6 +578,34 @@ export interface BankAccountsApiListBankAccountsRequest {
318
578
  readonly filters?: any
319
579
  }
320
580
 
581
+ /**
582
+ * Request parameters for setPrimaryBankAccount operation in BankAccountsApi.
583
+ * @export
584
+ * @interface BankAccountsApiSetPrimaryBankAccountRequest
585
+ */
586
+ export interface BankAccountsApiSetPrimaryBankAccountRequest {
587
+ /**
588
+ * Code of the bank account to set primary
589
+ * @type {string}
590
+ * @memberof BankAccountsApiSetPrimaryBankAccount
591
+ */
592
+ readonly code: string
593
+
594
+ /**
595
+ *
596
+ * @type {SetPrimaryBankAccountRequestDtoRest}
597
+ * @memberof BankAccountsApiSetPrimaryBankAccount
598
+ */
599
+ readonly setPrimaryBankAccountRequestDtoRest: SetPrimaryBankAccountRequestDtoRest
600
+
601
+ /**
602
+ * Bearer Token
603
+ * @type {string}
604
+ * @memberof BankAccountsApiSetPrimaryBankAccount
605
+ */
606
+ readonly authorization?: string
607
+ }
608
+
321
609
  /**
322
610
  * BankAccountsApi - object-oriented interface
323
611
  * @export
@@ -334,11 +622,35 @@ export class BankAccountsApi extends BaseAPI {
334
622
  * @memberof BankAccountsApi
335
623
  */
336
624
  public createBankAccount(requestParameters: BankAccountsApiCreateBankAccountRequest, options?: AxiosRequestConfig) {
337
- return BankAccountsApiFp(this.configuration).createBankAccount(requestParameters.body, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
625
+ return BankAccountsApiFp(this.configuration).createBankAccount(requestParameters.createBankAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
626
+ }
627
+
628
+ /**
629
+ * Deletes a bank account by code
630
+ * @summary Delete the bank account
631
+ * @param {BankAccountsApiDeleteBankAccountRequest} requestParameters Request parameters.
632
+ * @param {*} [options] Override http request option.
633
+ * @throws {RequiredError}
634
+ * @memberof BankAccountsApi
635
+ */
636
+ public deleteBankAccount(requestParameters: BankAccountsApiDeleteBankAccountRequest, options?: AxiosRequestConfig) {
637
+ return BankAccountsApiFp(this.configuration).deleteBankAccount(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
338
638
  }
339
639
 
340
640
  /**
341
- * 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.
641
+ * 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.
642
+ * @summary Retrieve the Bank Account
643
+ * @param {BankAccountsApiGetBankAccountRequest} requestParameters Request parameters.
644
+ * @param {*} [options] Override http request option.
645
+ * @throws {RequiredError}
646
+ * @memberof BankAccountsApi
647
+ */
648
+ public getBankAccount(requestParameters: BankAccountsApiGetBankAccountRequest, options?: AxiosRequestConfig) {
649
+ return BankAccountsApiFp(this.configuration).getBankAccount(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
650
+ }
651
+
652
+ /**
653
+ * 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.
342
654
  * @summary List bank accounts
343
655
  * @param {BankAccountsApiListBankAccountsRequest} requestParameters Request parameters.
344
656
  * @param {*} [options] Override http request option.
@@ -348,4 +660,16 @@ export class BankAccountsApi extends BaseAPI {
348
660
  public listBankAccounts(requestParameters: BankAccountsApiListBankAccountsRequest = {}, options?: AxiosRequestConfig) {
349
661
  return BankAccountsApiFp(this.configuration).listBankAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
350
662
  }
663
+
664
+ /**
665
+ * Set Primary Bank account
666
+ * @summary Set Primary Bank account
667
+ * @param {BankAccountsApiSetPrimaryBankAccountRequest} requestParameters Request parameters.
668
+ * @param {*} [options] Override http request option.
669
+ * @throws {RequiredError}
670
+ * @memberof BankAccountsApi
671
+ */
672
+ public setPrimaryBankAccount(requestParameters: BankAccountsApiSetPrimaryBankAccountRequest, options?: AxiosRequestConfig) {
673
+ return BankAccountsApiFp(this.configuration).setPrimaryBankAccount(requestParameters.code, requestParameters.setPrimaryBankAccountRequestDtoRest, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
674
+ }
351
675
  }