Added convenience properties to determine account features

This commit is contained in:
dankito 2020-09-22 18:38:27 +02:00
parent e973ce256b
commit d420cfcfb2
1 changed files with 13 additions and 0 deletions

View File

@ -35,6 +35,19 @@ open class AccountData(
get() = FinTsClient.SupportedAccountTypes.contains(accountType) 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 { open fun supportsFeature(feature: AccountFeature): Boolean {
return _supportedFeatures.contains(feature) return _supportedFeatures.contains(feature)
} }