diff --git a/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/UserAccount.kt b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/UserAccount.kt index a0597b18..95710dc2 100644 --- a/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/UserAccount.kt +++ b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/UserAccount.kt @@ -29,7 +29,7 @@ open class UserAccount( * As [tanMethods] also contains selected TanMethod, we didn't want to duplicate this object. Use * [selectedTanMethod] to get selected TanMethod or iterate over [tanMethods] and filter selected one by this id. */ - val selectedTanMethodId: String? = null, + val selectedTanMethodIdentifier: String? = null, open val tanMethods: List = listOf(), /** @@ -38,7 +38,7 @@ open class UserAccount( * As [tanMedia] also contains selected TanMedium, we didn't want to duplicate this object. Use [selectedTanMedium] * to get selected TanMedium or iterate over [tanMedia] and filter selected one by this medium name. */ - val selectedTanMediumName: String? = null, + val selectedTanMediumIdentifier: String? = null, open val tanMedia: List = listOf(), var bankingGroup: BankingGroup? = null @@ -59,11 +59,11 @@ open class UserAccount( @get:JsonIgnore val selectedTanMethod: TanMethod - get() = tanMethods.first { it.identifier == selectedTanMethodId } + get() = tanMethods.first { it.identifier == selectedTanMethodIdentifier } @get:JsonIgnore val selectedTanMedium: TanMedium? - get() = tanMedia.firstOrNull { it.mediumName == selectedTanMediumName } + get() = tanMedia.firstOrNull { it.identifier == selectedTanMediumIdentifier } override fun toString() = "$bankName $loginName, ${accounts.size} accounts" diff --git a/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt b/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt index e266ea57..f8d9ffe2 100644 --- a/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt +++ b/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt @@ -55,7 +55,7 @@ open class FinTs4kMapper { return GetAccountDataParameter(user.bankCode, user.loginName, user.password!!, listOf(accountIdentifier), true, retrieveTransactions, from, preferredTanMethods = preferredTanMethods, - preferredTanMedium = user.selectedTanMediumName, + preferredTanMedium = user.selectedTanMediumIdentifier, finTsModel = finTsModel ) }