mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 16:44:54 +00:00
feat: transfer to parent
This commit is contained in:
@ -27,10 +27,18 @@ export class AccountService {
|
||||
return account;
|
||||
}
|
||||
|
||||
async creditAccountBalance(accountReference: string, amount: number) {
|
||||
creditAccountBalance(accountReference: string, amount: number) {
|
||||
return this.accountRepository.topUpAccountBalance(accountReference, amount);
|
||||
}
|
||||
|
||||
async getAccountByCustomerId(customerId: string): Promise<Account> {
|
||||
const account = await this.accountRepository.getAccountByCustomerId(customerId);
|
||||
if (!account) {
|
||||
throw new UnprocessableEntityException('ACCOUNT.NOT_FOUND');
|
||||
}
|
||||
return account;
|
||||
}
|
||||
|
||||
async decreaseAccountBalance(accountReference: string, amount: number) {
|
||||
const account = await this.getAccountByReferenceNumber(accountReference);
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user