From d420cfcfb287c35db28b000f94da1213b13a8793 Mon Sep 17 00:00:00 2001 From: dankito Date: Tue, 22 Sep 2020 18:38:27 +0200 Subject: [PATCH] Added convenience properties to determine account features --- .../net/dankito/banking/fints/model/AccountData.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/AccountData.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/AccountData.kt index 3e16443a..ea771ce5 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/AccountData.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/AccountData.kt @@ -35,6 +35,19 @@ open class AccountData( get() = FinTsClient.SupportedAccountTypes.contains(accountType) + open val supportsRetrievingBalance: Boolean + get() = supportsFeature(AccountFeature.RetrieveBalance) + + open val supportsRetrievingAccountTransactions: Boolean + get() = supportsFeature(AccountFeature.RetrieveAccountTransactions) + + open val supportsTransferringMoney: Boolean + get() = supportsFeature(AccountFeature.TransferMoney) + + open val supportsInstantPaymentMoneyTransfer: Boolean + get() = supportsFeature(AccountFeature.InstantPayment) + + open fun supportsFeature(feature: AccountFeature): Boolean { return _supportedFeatures.contains(feature) }