From 9a7844ae7472edca5259541ac455dd1065bf3d70 Mon Sep 17 00:00:00 2001 From: dankito Date: Sun, 18 Aug 2024 15:17:16 +0200 Subject: [PATCH] Also mapping isAccountTypeSupportedByApplication and countDaysForWhichTransactionsAreKept (are countDaysForWhichTransactionsAreKept senseful?) --- .../kotlin/net/dankito/banking/client/model/BankAccount.kt | 3 +++ .../net/dankito/banking/fints/mapper/FinTsModelMapper.kt | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/client/model/BankAccount.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/client/model/BankAccount.kt index f13aa017..1da1900e 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/client/model/BankAccount.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/client/model/BankAccount.kt @@ -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, diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/mapper/FinTsModelMapper.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/mapper/FinTsModelMapper.kt index 507f0b22..db988f11 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/mapper/FinTsModelMapper.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/mapper/FinTsModelMapper.kt @@ -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 {