diff --git a/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/BankAccount.kt b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/BankAccount.kt index 42c217ac..77482c4f 100644 --- a/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/BankAccount.kt +++ b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/BankAccount.kt @@ -4,6 +4,7 @@ import kotlinx.datetime.* import net.codinux.banking.client.model.config.JsonIgnore import net.codinux.banking.client.model.config.NoArgConstructor +@Suppress("RUNTIME_ANNOTATION_NOT_SUPPORTED") @NoArgConstructor open class BankAccount( val identifier: String, @@ -38,7 +39,23 @@ open class BankAccount( open val displayName: String get() = userSetDisplayName ?: productName ?: identifier - fun supportsAnyFeature(vararg features: BankAccountFeatures): Boolean = + @get:JsonIgnore + open val supportsTransactionRetrieval: Boolean + get() = supportsAnyFeature(BankAccountFeatures.RetrieveBalance) + + @get:JsonIgnore + open val supportsBalanceRetrieval: Boolean + get() = supportsAnyFeature(BankAccountFeatures.RetrieveTransactions) + + @get:JsonIgnore + open val supportsMoneyTransfer: Boolean + get() = supportsAnyFeature(BankAccountFeatures.TransferMoney) + + @get:JsonIgnore + open val supportsInstantTransfer: Boolean + get() = supportsAnyFeature(BankAccountFeatures.InstantTransfer) + + open fun supportsAnyFeature(vararg features: BankAccountFeatures): Boolean = features.any { this.features.contains(it) } /**