Fixed using identifier instead of non-unique medium name and suffixed selected properties with -Identifier
This commit is contained in:
parent
55767f88e4
commit
a6caa40267
|
@ -29,7 +29,7 @@ open class UserAccount(
|
||||||
* As [tanMethods] also contains selected TanMethod, we didn't want to duplicate this object. Use
|
* 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.
|
* [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<TanMethod> = listOf(),
|
open val tanMethods: List<TanMethod> = listOf(),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,7 +38,7 @@ open class UserAccount(
|
||||||
* As [tanMedia] also contains selected TanMedium, we didn't want to duplicate this object. Use [selectedTanMedium]
|
* 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.
|
* 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<TanMedium> = listOf(),
|
open val tanMedia: List<TanMedium> = listOf(),
|
||||||
|
|
||||||
var bankingGroup: BankingGroup? = null
|
var bankingGroup: BankingGroup? = null
|
||||||
|
@ -59,11 +59,11 @@ open class UserAccount(
|
||||||
|
|
||||||
@get:JsonIgnore
|
@get:JsonIgnore
|
||||||
val selectedTanMethod: TanMethod
|
val selectedTanMethod: TanMethod
|
||||||
get() = tanMethods.first { it.identifier == selectedTanMethodId }
|
get() = tanMethods.first { it.identifier == selectedTanMethodIdentifier }
|
||||||
|
|
||||||
@get:JsonIgnore
|
@get:JsonIgnore
|
||||||
val selectedTanMedium: TanMedium?
|
val selectedTanMedium: TanMedium?
|
||||||
get() = tanMedia.firstOrNull { it.mediumName == selectedTanMediumName }
|
get() = tanMedia.firstOrNull { it.identifier == selectedTanMediumIdentifier }
|
||||||
|
|
||||||
|
|
||||||
override fun toString() = "$bankName $loginName, ${accounts.size} accounts"
|
override fun toString() = "$bankName $loginName, ${accounts.size} accounts"
|
||||||
|
|
|
@ -55,7 +55,7 @@ open class FinTs4kMapper {
|
||||||
return GetAccountDataParameter(user.bankCode, user.loginName, user.password!!, listOf(accountIdentifier), true,
|
return GetAccountDataParameter(user.bankCode, user.loginName, user.password!!, listOf(accountIdentifier), true,
|
||||||
retrieveTransactions, from,
|
retrieveTransactions, from,
|
||||||
preferredTanMethods = preferredTanMethods,
|
preferredTanMethods = preferredTanMethods,
|
||||||
preferredTanMedium = user.selectedTanMediumName,
|
preferredTanMedium = user.selectedTanMediumIdentifier,
|
||||||
finTsModel = finTsModel
|
finTsModel = finTsModel
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue