Made properties open
This commit is contained in:
parent
b0b0fa6140
commit
b210c1e7fa
|
@ -9,9 +9,9 @@ import net.codinux.banking.client.model.config.NoArgConstructor
|
|||
@Suppress("RUNTIME_ANNOTATION_NOT_SUPPORTED")
|
||||
@NoArgConstructor
|
||||
open class TanChallenge(
|
||||
val type: TanChallengeType,
|
||||
val forAction: ActionRequiringTan,
|
||||
val messageToShowToUser: String,
|
||||
open val type: TanChallengeType,
|
||||
open val forAction: ActionRequiringTan,
|
||||
open val messageToShowToUser: String,
|
||||
|
||||
/**
|
||||
* Identifier of selected TanMethod.
|
||||
|
@ -19,7 +19,7 @@ open class TanChallenge(
|
|||
* As [availableTanMethods] also contains selected TanMethod, we didn't want to duplicate this object. Use
|
||||
* [selectedTanMethod] to get selected TanMethod or iterate over [availableTanMethods] and filter selected one by this id.
|
||||
*/
|
||||
val selectedTanMethodId: String,
|
||||
open val selectedTanMethodId: String,
|
||||
/**
|
||||
* When adding an account, frontend has no UserAccount object in BankingClientCallback to know which TanMethods are
|
||||
* available for User.
|
||||
|
@ -28,7 +28,7 @@ open class TanChallenge(
|
|||
*
|
||||
* Therefore i added list with up to date TanMethods here to ensure EnterTanDialog can display user's up to date TanMethods.
|
||||
*/
|
||||
val availableTanMethods: List<TanMethod>,
|
||||
open val availableTanMethods: List<TanMethod>,
|
||||
|
||||
/**
|
||||
* Identifier of selected TanMedium.
|
||||
|
@ -36,21 +36,21 @@ open class TanChallenge(
|
|||
* As [availableTanMedia] also contains selected TanMedium, we didn't want to duplicate this object. Use
|
||||
* [selectedTanMedium] to get selected TanMedium or iterate over [availableTanMedia] and filter selected one by this medium name.
|
||||
*/
|
||||
val selectedTanMediumName: String? = null,
|
||||
val availableTanMedia: List<TanMedium> = emptyList(),
|
||||
open val selectedTanMediumName: String? = null,
|
||||
open val availableTanMedia: List<TanMedium> = emptyList(),
|
||||
|
||||
val tanImage: TanImage? = null,
|
||||
val flickerCode: FlickerCode? = null,
|
||||
val user: UserAccountViewInfo,
|
||||
val account: BankAccountViewInfo? = null
|
||||
open val tanImage: TanImage? = null,
|
||||
open val flickerCode: FlickerCode? = null,
|
||||
open val user: UserAccountViewInfo,
|
||||
open val account: BankAccountViewInfo? = null
|
||||
) {
|
||||
|
||||
@get:JsonIgnore
|
||||
val selectedTanMethod: TanMethod
|
||||
open val selectedTanMethod: TanMethod
|
||||
get() = availableTanMethods.first { it.identifier == selectedTanMethodId }
|
||||
|
||||
@get:JsonIgnore
|
||||
val selectedTanMedium: TanMedium?
|
||||
open val selectedTanMedium: TanMedium?
|
||||
get() = availableTanMedia.firstOrNull { it.mediumName == selectedTanMediumName }
|
||||
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@ import net.codinux.banking.client.model.config.NoArgConstructor
|
|||
|
||||
@NoArgConstructor
|
||||
open class TanMethod(
|
||||
val displayName: String,
|
||||
val type: TanMethodType,
|
||||
val identifier: String,
|
||||
val maxTanInputLength: Int? = null,
|
||||
val allowedTanFormat: AllowedTanFormat = AllowedTanFormat.Alphanumeric
|
||||
open val displayName: String,
|
||||
open val type: TanMethodType,
|
||||
open val identifier: String,
|
||||
open val maxTanInputLength: Int? = null,
|
||||
open val allowedTanFormat: AllowedTanFormat = AllowedTanFormat.Alphanumeric
|
||||
) {
|
||||
override fun toString() = "$displayName ($type, ${identifier})"
|
||||
}
|
Loading…
Reference in New Issue