@emilgroup/payment-sdk 1.4.1-beta.30 → 1.4.1-beta.32

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 (93) hide show
  1. package/.openapi-generator/FILES +5 -15
  2. package/README.md +2 -2
  3. package/api/bank-accounts-api.ts +34 -38
  4. package/api/bank-transaction-api.ts +73 -77
  5. package/api/{default-api.ts → health-check-api.ts} +21 -17
  6. package/api/payment-methods-api.ts +52 -70
  7. package/api/payment-reminders-api.ts +63 -49
  8. package/api/payment-setup-api.ts +16 -8
  9. package/api/payments-api.ts +52 -70
  10. package/api/refunds-api.ts +76 -88
  11. package/api/tenant-bank-account-api.ts +79 -63
  12. package/api/webhooks-api.ts +16 -12
  13. package/api.ts +2 -2
  14. package/base.ts +15 -7
  15. package/dist/api/bank-accounts-api.d.ts +37 -39
  16. package/dist/api/bank-accounts-api.js +18 -18
  17. package/dist/api/bank-transaction-api.d.ts +77 -79
  18. package/dist/api/bank-transaction-api.js +45 -45
  19. package/dist/api/health-check-api.d.ts +70 -0
  20. package/dist/api/{default-api.js → health-check-api.js} +30 -26
  21. package/dist/api/payment-methods-api.d.ts +49 -58
  22. package/dist/api/payment-methods-api.js +32 -42
  23. package/dist/api/payment-reminders-api.d.ts +55 -46
  24. package/dist/api/payment-reminders-api.js +40 -34
  25. package/dist/api/payment-setup-api.d.ts +16 -8
  26. package/dist/api/payment-setup-api.js +16 -8
  27. package/dist/api/payments-api.d.ts +49 -58
  28. package/dist/api/payments-api.js +32 -42
  29. package/dist/api/refunds-api.d.ts +76 -76
  30. package/dist/api/refunds-api.js +51 -49
  31. package/dist/api/tenant-bank-account-api.d.ts +71 -61
  32. package/dist/api/tenant-bank-account-api.js +51 -45
  33. package/dist/api/webhooks-api.d.ts +16 -12
  34. package/dist/api/webhooks-api.js +14 -10
  35. package/dist/api.d.ts +1 -1
  36. package/dist/api.js +1 -1
  37. package/dist/base.d.ts +3 -1
  38. package/dist/base.js +27 -20
  39. package/dist/models/{bank-transaction-response-class.d.ts → bank-transaction-class-without-expand-properties.d.ts} +20 -34
  40. package/dist/models/create-tenant-bank-account-response-class.d.ts +4 -4
  41. package/dist/models/get-tenant-bank-account-response-class.d.ts +4 -4
  42. package/dist/models/index.d.ts +4 -14
  43. package/dist/models/index.js +4 -14
  44. package/dist/models/list-tenant-bank-account-response-class.d.ts +5 -5
  45. package/dist/models/{tenant-bank-account-response-class.d.ts → tenant-bank-account-class-without-expand-properties.d.ts} +10 -10
  46. package/dist/models/tenant-bank-account-class.d.ts +73 -0
  47. package/dist/models/{get-bank-account-response-class.d.ts → update-tenant-bank-account-response-class.d.ts} +7 -7
  48. package/models/{bank-transaction-response-class.ts → bank-transaction-class-without-expand-properties.ts} +20 -34
  49. package/models/create-tenant-bank-account-response-class.ts +4 -4
  50. package/models/get-tenant-bank-account-response-class.ts +4 -4
  51. package/models/index.ts +4 -14
  52. package/models/list-tenant-bank-account-response-class.ts +5 -5
  53. package/models/{tenant-bank-account-response-class.ts → tenant-bank-account-class-without-expand-properties.ts} +10 -10
  54. package/models/tenant-bank-account-class.ts +79 -0
  55. package/models/{create-refund-response-class.ts → update-tenant-bank-account-response-class.ts} +7 -7
  56. package/package.json +1 -1
  57. package/dist/api/default-api.d.ts +0 -66
  58. package/dist/models/bank-account-class.d.ts +0 -73
  59. package/dist/models/create-refund-response-class.d.ts +0 -25
  60. package/dist/models/get-bank-transactions-response-class.d.ts +0 -25
  61. package/dist/models/get-bank-transactions-response-class.js +0 -15
  62. package/dist/models/get-refund-response-class.d.ts +0 -25
  63. package/dist/models/get-refund-response-class.js +0 -15
  64. package/dist/models/get-request-dto.d.ts +0 -30
  65. package/dist/models/get-request-dto.js +0 -15
  66. package/dist/models/list-bank-transactions-response-class.d.ts +0 -31
  67. package/dist/models/list-bank-transactions-response-class.js +0 -15
  68. package/dist/models/list-refunds-response-class.d.ts +0 -31
  69. package/dist/models/list-refunds-response-class.js +0 -15
  70. package/dist/models/primary-bank-account-response-class.d.ts +0 -42
  71. package/dist/models/primary-bank-account-response-class.js +0 -15
  72. package/dist/models/refund-class.d.ts +0 -105
  73. package/dist/models/refund-class.js +0 -29
  74. package/dist/models/tenant-bank-account-response-class.js +0 -15
  75. package/dist/models/transaction-class.d.ts +0 -54
  76. package/dist/models/transaction-class.js +0 -15
  77. package/dist/models/update-bank-account-response-class.d.ts +0 -25
  78. package/dist/models/update-bank-account-response-class.js +0 -15
  79. package/models/bank-account-class.ts +0 -79
  80. package/models/get-bank-account-response-class.ts +0 -31
  81. package/models/get-bank-transactions-response-class.ts +0 -31
  82. package/models/get-refund-response-class.ts +0 -31
  83. package/models/get-request-dto.ts +0 -36
  84. package/models/list-bank-transactions-response-class.ts +0 -37
  85. package/models/list-refunds-response-class.ts +0 -37
  86. package/models/primary-bank-account-response-class.ts +0 -48
  87. package/models/refund-class.ts +0 -115
  88. package/models/transaction-class.ts +0 -60
  89. package/models/update-bank-account-response-class.ts +0 -31
  90. /package/dist/models/{bank-account-class.js → bank-transaction-class-without-expand-properties.js} +0 -0
  91. /package/dist/models/{bank-transaction-response-class.js → tenant-bank-account-class-without-expand-properties.js} +0 -0
  92. /package/dist/models/{create-refund-response-class.js → tenant-bank-account-class.js} +0 -0
  93. /package/dist/models/{get-bank-account-response-class.js → update-tenant-bank-account-response-class.js} +0 -0
@@ -29,6 +29,8 @@ import { GetTenantBankAccountResponseClass } from '../models';
29
29
  // @ts-ignore
30
30
  import { ListTenantBankAccountResponseClass } from '../models';
31
31
  // @ts-ignore
32
+ import { UpdateTenantBankAccountResponseClass } from '../models';
33
+ // @ts-ignore
32
34
  import { UpdateTenantBankAccountRestRequestDto } from '../models';
33
35
  /**
34
36
  * TenantBankAccountApi - axios parameter creator
@@ -37,8 +39,8 @@ import { UpdateTenantBankAccountRestRequestDto } from '../models';
37
39
  export const TenantBankAccountApiAxiosParamCreator = function (configuration?: Configuration) {
38
40
  return {
39
41
  /**
40
- * Create a new tenant bank account
41
- * @summary Create the Tenant Bank Account
42
+ * This will create a new tenant bank account
43
+ * @summary Create the tenant bank account
42
44
  * @param {CreateTenantBankAccountRequestDto} createTenantBankAccountRequestDto
43
45
  * @param {string} [authorization] Bearer Token
44
46
  * @param {*} [options] Override http request option.
@@ -129,14 +131,15 @@ export const TenantBankAccountApiAxiosParamCreator = function (configuration?: C
129
131
  };
130
132
  },
131
133
  /**
132
- * Retrieves the details of the Tenant Bank Account that was previously created. Supply the unique Tenant Bank Account code that was returned when you created it and Emil Api will return the corresponding Tenant Bank Account information.
133
- * @summary Retrieve the Tenant Bank Account
134
+ * Retrieves the details of the tenant bank account that was previously created. Supply the unique tenant bank account code that was returned when you created it and Emil Api will return the corresponding tenant bank account information.
135
+ * @summary Retrieve the tenant bank account
134
136
  * @param {string} code Unique identifier for the object.
135
137
  * @param {string} [authorization] Bearer Token
138
+ * @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: bankTransactions.<i>
136
139
  * @param {*} [options] Override http request option.
137
140
  * @throws {RequiredError}
138
141
  */
139
- getTenantBankAccount: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
142
+ getTenantBankAccount: async (code: string, authorization?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
140
143
  // verify required parameter 'code' is not null or undefined
141
144
  assertParamExists('getTenantBankAccount', 'code', code)
142
145
  const localVarPath = `/paymentservice/v1/tenant/bank-accounts/{code}`
@@ -158,6 +161,10 @@ export const TenantBankAccountApiAxiosParamCreator = function (configuration?: C
158
161
  // http bearer authentication required
159
162
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
160
163
 
164
+ if (expand !== undefined) {
165
+ localVarQueryParameter['expand'] = expand;
166
+ }
167
+
161
168
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
162
169
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
163
170
  }
@@ -174,20 +181,20 @@ export const TenantBankAccountApiAxiosParamCreator = function (configuration?: C
174
181
  };
175
182
  },
176
183
  /**
177
- * Returns a list of Tenant Bank Accounts you have previously created. The Tenant Bank Accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
178
- * @summary List Tenant Bank Accounts
184
+ * Returns a list of tenant bank accounts you have previously created. The tenant bank accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
185
+ * @summary List tenant bank accounts
179
186
  * @param {string} [authorization] Bearer Token
180
187
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
181
188
  * @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.
182
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, iban, bankName, accountName&lt;/i&gt;
183
- * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
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.
185
- * @param {string} [expand] No expand is available for this tenant bank accounts
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.
189
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, iban, bankName, accountName&lt;/i&gt;
190
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: id, iban, bankName, accountName&lt;/i&gt;
191
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt&lt;/i&gt;
192
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankTransactions.&lt;i&gt;
193
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, iban, bankName, accountName&lt;/i&gt;
187
194
  * @param {*} [options] Override http request option.
188
195
  * @throws {RequiredError}
189
196
  */
190
- listTenantBankAccounts: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: string, filters?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
197
+ listTenantBankAccounts: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
191
198
  const localVarPath = `/paymentservice/v1/tenant/bank-accounts`;
192
199
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
193
200
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -311,8 +318,8 @@ export const TenantBankAccountApiFp = function(configuration?: Configuration) {
311
318
  const localVarAxiosParamCreator = TenantBankAccountApiAxiosParamCreator(configuration)
312
319
  return {
313
320
  /**
314
- * Create a new tenant bank account
315
- * @summary Create the Tenant Bank Account
321
+ * This will create a new tenant bank account
322
+ * @summary Create the tenant bank account
316
323
  * @param {CreateTenantBankAccountRequestDto} createTenantBankAccountRequestDto
317
324
  * @param {string} [authorization] Bearer Token
318
325
  * @param {*} [options] Override http request option.
@@ -335,32 +342,33 @@ export const TenantBankAccountApiFp = function(configuration?: Configuration) {
335
342
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
336
343
  },
337
344
  /**
338
- * Retrieves the details of the Tenant Bank Account that was previously created. Supply the unique Tenant Bank Account code that was returned when you created it and Emil Api will return the corresponding Tenant Bank Account information.
339
- * @summary Retrieve the Tenant Bank Account
345
+ * Retrieves the details of the tenant bank account that was previously created. Supply the unique tenant bank account code that was returned when you created it and Emil Api will return the corresponding tenant bank account information.
346
+ * @summary Retrieve the tenant bank account
340
347
  * @param {string} code Unique identifier for the object.
341
348
  * @param {string} [authorization] Bearer Token
349
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankTransactions.&lt;i&gt;
342
350
  * @param {*} [options] Override http request option.
343
351
  * @throws {RequiredError}
344
352
  */
345
- async getTenantBankAccount(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetTenantBankAccountResponseClass>> {
346
- const localVarAxiosArgs = await localVarAxiosParamCreator.getTenantBankAccount(code, authorization, options);
353
+ async getTenantBankAccount(code: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetTenantBankAccountResponseClass>> {
354
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTenantBankAccount(code, authorization, expand, options);
347
355
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
348
356
  },
349
357
  /**
350
- * Returns a list of Tenant Bank Accounts you have previously created. The Tenant Bank Accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
351
- * @summary List Tenant Bank Accounts
358
+ * Returns a list of tenant bank accounts you have previously created. The tenant bank accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
359
+ * @summary List tenant bank accounts
352
360
  * @param {string} [authorization] Bearer Token
353
361
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
354
362
  * @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.
355
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, iban, bankName, accountName&lt;/i&gt;
356
- * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
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.
358
- * @param {string} [expand] No expand is available for this tenant bank accounts
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.
363
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, iban, bankName, accountName&lt;/i&gt;
364
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: id, iban, bankName, accountName&lt;/i&gt;
365
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt&lt;/i&gt;
366
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankTransactions.&lt;i&gt;
367
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, iban, bankName, accountName&lt;/i&gt;
360
368
  * @param {*} [options] Override http request option.
361
369
  * @throws {RequiredError}
362
370
  */
363
- async listTenantBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: string, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListTenantBankAccountResponseClass>> {
371
+ async listTenantBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListTenantBankAccountResponseClass>> {
364
372
  const localVarAxiosArgs = await localVarAxiosParamCreator.listTenantBankAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
365
373
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
366
374
  },
@@ -373,7 +381,7 @@ export const TenantBankAccountApiFp = function(configuration?: Configuration) {
373
381
  * @param {*} [options] Override http request option.
374
382
  * @throws {RequiredError}
375
383
  */
376
- async updateTenantBankAccount(code: string, updateTenantBankAccountRestRequestDto: UpdateTenantBankAccountRestRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateTenantBankAccountResponseClass>> {
384
+ async updateTenantBankAccount(code: string, updateTenantBankAccountRestRequestDto: UpdateTenantBankAccountRestRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateTenantBankAccountResponseClass>> {
377
385
  const localVarAxiosArgs = await localVarAxiosParamCreator.updateTenantBankAccount(code, updateTenantBankAccountRestRequestDto, authorization, options);
378
386
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
379
387
  },
@@ -388,8 +396,8 @@ export const TenantBankAccountApiFactory = function (configuration?: Configurati
388
396
  const localVarFp = TenantBankAccountApiFp(configuration)
389
397
  return {
390
398
  /**
391
- * Create a new tenant bank account
392
- * @summary Create the Tenant Bank Account
399
+ * This will create a new tenant bank account
400
+ * @summary Create the tenant bank account
393
401
  * @param {CreateTenantBankAccountRequestDto} createTenantBankAccountRequestDto
394
402
  * @param {string} [authorization] Bearer Token
395
403
  * @param {*} [options] Override http request option.
@@ -410,31 +418,32 @@ export const TenantBankAccountApiFactory = function (configuration?: Configurati
410
418
  return localVarFp.deleteTenantBankAccount(code, authorization, options).then((request) => request(axios, basePath));
411
419
  },
412
420
  /**
413
- * Retrieves the details of the Tenant Bank Account that was previously created. Supply the unique Tenant Bank Account code that was returned when you created it and Emil Api will return the corresponding Tenant Bank Account information.
414
- * @summary Retrieve the Tenant Bank Account
421
+ * Retrieves the details of the tenant bank account that was previously created. Supply the unique tenant bank account code that was returned when you created it and Emil Api will return the corresponding tenant bank account information.
422
+ * @summary Retrieve the tenant bank account
415
423
  * @param {string} code Unique identifier for the object.
416
424
  * @param {string} [authorization] Bearer Token
425
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankTransactions.&lt;i&gt;
417
426
  * @param {*} [options] Override http request option.
418
427
  * @throws {RequiredError}
419
428
  */
420
- getTenantBankAccount(code: string, authorization?: string, options?: any): AxiosPromise<GetTenantBankAccountResponseClass> {
421
- return localVarFp.getTenantBankAccount(code, authorization, options).then((request) => request(axios, basePath));
429
+ getTenantBankAccount(code: string, authorization?: string, expand?: string, options?: any): AxiosPromise<GetTenantBankAccountResponseClass> {
430
+ return localVarFp.getTenantBankAccount(code, authorization, expand, options).then((request) => request(axios, basePath));
422
431
  },
423
432
  /**
424
- * Returns a list of Tenant Bank Accounts you have previously created. The Tenant Bank Accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
425
- * @summary List Tenant Bank Accounts
433
+ * Returns a list of tenant bank accounts you have previously created. The tenant bank accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
434
+ * @summary List tenant bank accounts
426
435
  * @param {string} [authorization] Bearer Token
427
436
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
428
437
  * @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.
429
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, iban, bankName, accountName&lt;/i&gt;
430
- * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
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.
432
- * @param {string} [expand] No expand is available for this tenant bank accounts
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.
438
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, iban, bankName, accountName&lt;/i&gt;
439
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: id, iban, bankName, accountName&lt;/i&gt;
440
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt&lt;/i&gt;
441
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankTransactions.&lt;i&gt;
442
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, iban, bankName, accountName&lt;/i&gt;
434
443
  * @param {*} [options] Override http request option.
435
444
  * @throws {RequiredError}
436
445
  */
437
- listTenantBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: string, filters?: any, options?: any): AxiosPromise<ListTenantBankAccountResponseClass> {
446
+ listTenantBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListTenantBankAccountResponseClass> {
438
447
  return localVarFp.listTenantBankAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
439
448
  },
440
449
  /**
@@ -446,7 +455,7 @@ export const TenantBankAccountApiFactory = function (configuration?: Configurati
446
455
  * @param {*} [options] Override http request option.
447
456
  * @throws {RequiredError}
448
457
  */
449
- updateTenantBankAccount(code: string, updateTenantBankAccountRestRequestDto: UpdateTenantBankAccountRestRequestDto, authorization?: string, options?: any): AxiosPromise<CreateTenantBankAccountResponseClass> {
458
+ updateTenantBankAccount(code: string, updateTenantBankAccountRestRequestDto: UpdateTenantBankAccountRestRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateTenantBankAccountResponseClass> {
450
459
  return localVarFp.updateTenantBankAccount(code, updateTenantBankAccountRestRequestDto, authorization, options).then((request) => request(axios, basePath));
451
460
  },
452
461
  };
@@ -513,6 +522,13 @@ export interface TenantBankAccountApiGetTenantBankAccountRequest {
513
522
  * @memberof TenantBankAccountApiGetTenantBankAccount
514
523
  */
515
524
  readonly authorization?: string
525
+
526
+ /**
527
+ * Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankTransactions.&lt;i&gt;
528
+ * @type {string}
529
+ * @memberof TenantBankAccountApiGetTenantBankAccount
530
+ */
531
+ readonly expand?: string
516
532
  }
517
533
 
518
534
  /**
@@ -543,39 +559,39 @@ export interface TenantBankAccountApiListTenantBankAccountsRequest {
543
559
  readonly pageToken?: any
544
560
 
545
561
  /**
546
- * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, iban, bankName, accountName&lt;/i&gt;
547
- * @type {any}
562
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, iban, bankName, accountName&lt;/i&gt;
563
+ * @type {string}
548
564
  * @memberof TenantBankAccountApiListTenantBankAccounts
549
565
  */
550
- readonly filter?: any
566
+ readonly filter?: string
551
567
 
552
568
  /**
553
- * To search the list by any field, pass search&#x3D;xxx to fetch the result.
554
- * @type {any}
569
+ * Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: id, iban, bankName, accountName&lt;/i&gt;
570
+ * @type {string}
555
571
  * @memberof TenantBankAccountApiListTenantBankAccounts
556
572
  */
557
- readonly search?: any
573
+ readonly search?: string
558
574
 
559
575
  /**
560
- * 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.
561
- * @type {any}
576
+ * Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt&lt;/i&gt;
577
+ * @type {string}
562
578
  * @memberof TenantBankAccountApiListTenantBankAccounts
563
579
  */
564
- readonly order?: any
580
+ readonly order?: string
565
581
 
566
582
  /**
567
- * No expand is available for this tenant bank accounts
583
+ * Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankTransactions.&lt;i&gt;
568
584
  * @type {string}
569
585
  * @memberof TenantBankAccountApiListTenantBankAccounts
570
586
  */
571
587
  readonly expand?: string
572
588
 
573
589
  /**
574
- * 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.
575
- * @type {any}
590
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, iban, bankName, accountName&lt;/i&gt;
591
+ * @type {string}
576
592
  * @memberof TenantBankAccountApiListTenantBankAccounts
577
593
  */
578
- readonly filters?: any
594
+ readonly filters?: string
579
595
  }
580
596
 
581
597
  /**
@@ -614,8 +630,8 @@ export interface TenantBankAccountApiUpdateTenantBankAccountRequest {
614
630
  */
615
631
  export class TenantBankAccountApi extends BaseAPI {
616
632
  /**
617
- * Create a new tenant bank account
618
- * @summary Create the Tenant Bank Account
633
+ * This will create a new tenant bank account
634
+ * @summary Create the tenant bank account
619
635
  * @param {TenantBankAccountApiCreateTenantBankAccountRequest} requestParameters Request parameters.
620
636
  * @param {*} [options] Override http request option.
621
637
  * @throws {RequiredError}
@@ -638,20 +654,20 @@ export class TenantBankAccountApi extends BaseAPI {
638
654
  }
639
655
 
640
656
  /**
641
- * Retrieves the details of the Tenant Bank Account that was previously created. Supply the unique Tenant Bank Account code that was returned when you created it and Emil Api will return the corresponding Tenant Bank Account information.
642
- * @summary Retrieve the Tenant Bank Account
657
+ * Retrieves the details of the tenant bank account that was previously created. Supply the unique tenant bank account code that was returned when you created it and Emil Api will return the corresponding tenant bank account information.
658
+ * @summary Retrieve the tenant bank account
643
659
  * @param {TenantBankAccountApiGetTenantBankAccountRequest} requestParameters Request parameters.
644
660
  * @param {*} [options] Override http request option.
645
661
  * @throws {RequiredError}
646
662
  * @memberof TenantBankAccountApi
647
663
  */
648
664
  public getTenantBankAccount(requestParameters: TenantBankAccountApiGetTenantBankAccountRequest, options?: AxiosRequestConfig) {
649
- return TenantBankAccountApiFp(this.configuration).getTenantBankAccount(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
665
+ return TenantBankAccountApiFp(this.configuration).getTenantBankAccount(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
650
666
  }
651
667
 
652
668
  /**
653
- * Returns a list of Tenant Bank Accounts you have previously created. The Tenant Bank Accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
654
- * @summary List Tenant Bank Accounts
669
+ * Returns a list of tenant bank accounts you have previously created. The tenant bank accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
670
+ * @summary List tenant bank accounts
655
671
  * @param {TenantBankAccountApiListTenantBankAccountsRequest} requestParameters Request parameters.
656
672
  * @param {*} [options] Override http request option.
657
673
  * @throws {RequiredError}
@@ -27,9 +27,10 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
27
27
  export const WebhooksApiAxiosParamCreator = function (configuration?: Configuration) {
28
28
  return {
29
29
  /**
30
- *
31
- * @param {string} pspType
32
- * @param {string} tenantSlug
30
+ * This will processes the webhook from external payment service provider.
31
+ * @summary Handle the webhook from PSP
32
+ * @param {string} pspType The type of the payment service provider (PSP).&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Supported PSP: braintree, stripe, b4u, eis&lt;/i&gt;
33
+ * @param {string} tenantSlug Unique slug identifier representing a tenant.
33
34
  * @param {*} [options] Override http request option.
34
35
  * @throws {RequiredError}
35
36
  */
@@ -76,9 +77,10 @@ export const WebhooksApiFp = function(configuration?: Configuration) {
76
77
  const localVarAxiosParamCreator = WebhooksApiAxiosParamCreator(configuration)
77
78
  return {
78
79
  /**
79
- *
80
- * @param {string} pspType
81
- * @param {string} tenantSlug
80
+ * This will processes the webhook from external payment service provider.
81
+ * @summary Handle the webhook from PSP
82
+ * @param {string} pspType The type of the payment service provider (PSP).&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Supported PSP: braintree, stripe, b4u, eis&lt;/i&gt;
83
+ * @param {string} tenantSlug Unique slug identifier representing a tenant.
82
84
  * @param {*} [options] Override http request option.
83
85
  * @throws {RequiredError}
84
86
  */
@@ -97,9 +99,10 @@ export const WebhooksApiFactory = function (configuration?: Configuration, baseP
97
99
  const localVarFp = WebhooksApiFp(configuration)
98
100
  return {
99
101
  /**
100
- *
101
- * @param {string} pspType
102
- * @param {string} tenantSlug
102
+ * This will processes the webhook from external payment service provider.
103
+ * @summary Handle the webhook from PSP
104
+ * @param {string} pspType The type of the payment service provider (PSP).&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Supported PSP: braintree, stripe, b4u, eis&lt;/i&gt;
105
+ * @param {string} tenantSlug Unique slug identifier representing a tenant.
103
106
  * @param {*} [options] Override http request option.
104
107
  * @throws {RequiredError}
105
108
  */
@@ -116,14 +119,14 @@ export const WebhooksApiFactory = function (configuration?: Configuration, baseP
116
119
  */
117
120
  export interface WebhooksApiPostWebhookRequest {
118
121
  /**
119
- *
122
+ * The type of the payment service provider (PSP).&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Supported PSP: braintree, stripe, b4u, eis&lt;/i&gt;
120
123
  * @type {string}
121
124
  * @memberof WebhooksApiPostWebhook
122
125
  */
123
126
  readonly pspType: string
124
127
 
125
128
  /**
126
- *
129
+ * Unique slug identifier representing a tenant.
127
130
  * @type {string}
128
131
  * @memberof WebhooksApiPostWebhook
129
132
  */
@@ -138,7 +141,8 @@ export interface WebhooksApiPostWebhookRequest {
138
141
  */
139
142
  export class WebhooksApi extends BaseAPI {
140
143
  /**
141
- *
144
+ * This will processes the webhook from external payment service provider.
145
+ * @summary Handle the webhook from PSP
142
146
  * @param {WebhooksApiPostWebhookRequest} requestParameters Request parameters.
143
147
  * @param {*} [options] Override http request option.
144
148
  * @throws {RequiredError}
package/api.ts CHANGED
@@ -22,7 +22,7 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
23
23
  import { BankAccountsApi } from './api';
24
24
  import { BankTransactionApi } from './api';
25
- import { DefaultApi } from './api';
25
+ import { HealthCheckApi } from './api';
26
26
  import { PaymentMethodsApi } from './api';
27
27
  import { PaymentRemindersApi } from './api';
28
28
  import { PaymentSetupApi } from './api';
@@ -34,7 +34,7 @@ import { WebhooksApi } from './api';
34
34
 
35
35
  export * from './api/bank-accounts-api';
36
36
  export * from './api/bank-transaction-api';
37
- export * from './api/default-api';
37
+ export * from './api/health-check-api';
38
38
  export * from './api/payment-methods-api';
39
39
  export * from './api/payment-reminders-api';
40
40
  export * from './api/payment-setup-api';
package/base.ts CHANGED
@@ -77,6 +77,7 @@ const TOKEN_DATA = 'APP_TOKEN';
77
77
  export class BaseAPI {
78
78
  protected configuration: Configuration | undefined;
79
79
  private tokenData?: TokenData;
80
+ private permissions: Array<string> = [];
80
81
 
81
82
  constructor(configuration?: Configuration,
82
83
  protected basePath: string = BASE_PATH,
@@ -109,6 +110,10 @@ export class BaseAPI {
109
110
  this.configuration.basePath = path;
110
111
  }
111
112
 
113
+ getPermissions(): Array<string> {
114
+ return this.permissions;
115
+ }
116
+
112
117
  async authorize(username: string, password: string): Promise<void> {
113
118
  const options: AxiosRequestConfig = {
114
119
  method: 'POST',
@@ -123,23 +128,24 @@ export class BaseAPI {
123
128
 
124
129
  const response = await globalAxios.request<LoginClass>(options);
125
130
 
126
- const { data: { accessToken } } = response;
131
+ const { data: { accessToken, permissions } } = response;
127
132
 
128
133
  this.configuration.username = username;
129
134
  this.configuration.accessToken = `Bearer ${accessToken}`;
130
135
  this.tokenData.username = username;
131
136
  this.tokenData.accessToken = accessToken;
137
+ this.permissions = permissions;
132
138
 
133
139
  this.storeTokenData({
134
140
  ...this.tokenData
135
141
  });
136
142
  }
137
143
 
138
- async refreshTokenInternal(): Promise<string> {
144
+ async refreshTokenInternal(): Promise<LoginClass> {
139
145
  const { username } = this.configuration;
140
146
 
141
147
  if (!username) {
142
- return '';
148
+ throw new Error('Failed to refresh token.');
143
149
  }
144
150
 
145
151
  const options: AxiosRequestConfig = {
@@ -152,9 +158,9 @@ export class BaseAPI {
152
158
  withCredentials: true,
153
159
  };
154
160
 
155
- const { data: { accessToken } } = await globalAxios.request<LoginClass>(options);
161
+ const response = await globalAxios.request<LoginClass>(options);
156
162
 
157
- return accessToken;
163
+ return response.data;
158
164
  }
159
165
 
160
166
  private storeTokenData(tokenData?: TokenData) {
@@ -188,8 +194,9 @@ export class BaseAPI {
188
194
  && !originalConfig._retry) {
189
195
  originalConfig._retry = true;
190
196
  try {
191
- let tokenString = await this.refreshTokenInternal();
197
+ const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
192
198
  const accessToken = `Bearer ${tokenString}`;
199
+ this.permissions = permissions;
193
200
 
194
201
  delete originalConfig.headers['Authorization']
195
202
 
@@ -214,8 +221,9 @@ export class BaseAPI {
214
221
  ) {
215
222
  _retry_count++;
216
223
  try {
217
- let tokenString = await this.refreshTokenInternal();
224
+ const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
218
225
  const accessToken = `Bearer ${tokenString}`;
226
+ this.permissions = permissions;
219
227
 
220
228
  _retry = true;
221
229
  originalConfig.headers['Authorization'] = accessToken;