feat: disconnect and update bank account

This commit is contained in:
Ahmed Bouhuolia
2024-07-16 17:09:00 +02:00
parent fa7e6b1fca
commit c2815afbe3
11 changed files with 246 additions and 29 deletions

View File

@@ -1,11 +1,15 @@
import { Inject, Service } from 'typedi';
import { DisconnectBankAccount } from './DisconnectBankAccount';
import { RefreshBankAccountService } from './RefreshBankAccount';
@Service()
export class BankAccountsApplication {
@Inject()
private disconnectBankAccountService: DisconnectBankAccount;
@Inject()
private refreshBankAccountService: RefreshBankAccountService;
/**
* Disconnects the given bank account.
* @param {number} tenantId
@@ -18,4 +22,17 @@ export class BankAccountsApplication {
bankAccountId
);
}
/**
* Refresh the bank transactions of the given bank account.
* @param {number} tenantId
* @param {number} bankAccountId
* @returns {Promise<void>}
*/
async refreshBankAccount(tenantId: number, bankAccountId: number) {
return this.refreshBankAccountService.refreshBankAccount(
tenantId,
bankAccountId
);
}
}