Also mapping isAccountTypeSupportedByApplication and countDaysForWhichTransactionsAreKept (are countDaysForWhichTransactionsAreKept senseful?)

This commit is contained in:
dankito 2024-08-18 15:17:16 +02:00
parent de046cea84
commit 9a7844ae74
2 changed files with 5 additions and 1 deletions

View File

@ -16,6 +16,9 @@ open class BankAccount(
open val productName: String? = null,
open val currency: String = Currency.DefaultCurrencyCode, // TODO: may parse to a value object
open val accountLimit: String? = null,
open val countDaysForWhichTransactionsAreKept: Int? = null,
open val isAccountTypeSupportedByApplication: Boolean = false,
// TODO: create an enum AccountCapabilities [ RetrieveBalance, RetrieveTransactions, TransferMoney / MoneyTransfer(?), InstantPayment ]
open val supportsRetrievingTransactions: Boolean = false,
open val supportsRetrievingBalance: Boolean = false,

View File

@ -51,7 +51,8 @@ open class FinTsModelMapper {
open fun map(account: AccountData): BankAccount {
return BankAccount(account.accountIdentifier, account.subAccountAttribute, account.iban, account.accountHolderName, map(account.accountType), account.productName,
account.currency ?: Currency.DefaultCurrencyCode, account.accountLimit, account.supportsRetrievingAccountTransactions, account.supportsRetrievingBalance, account.supportsTransferringMoney, account.supportsRealTimeTransfer)
account.currency ?: Currency.DefaultCurrencyCode, account.accountLimit, account.countDaysForWhichTransactionsAreKept, account.isAccountTypeSupportedByApplication,
account.supportsRetrievingAccountTransactions, account.supportsRetrievingBalance, account.supportsTransferringMoney, account.supportsRealTimeTransfer)
}
open fun map(accountType: AccountType?): BankAccountType {