Fixed mapping new TanMethodType names
This commit is contained in:
parent
68e1408b81
commit
d00f71bedd
|
@ -41,6 +41,16 @@ import kotlin.io.encoding.ExperimentalEncodingApi
|
||||||
|
|
||||||
open class FinTs4kMapper {
|
open class FinTs4kMapper {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
val TanMethodTypesToMigrate = mapOf(
|
||||||
|
net.codinux.banking.fints.model.TanMethodType.ChipTanManuell.name to TanMethodType.ChipTanManual.name,
|
||||||
|
net.codinux.banking.fints.model.TanMethodType.ChipTanFlickercode.name to TanMethodType.ChipTanFlickerCode.name
|
||||||
|
)
|
||||||
|
|
||||||
|
val TanMethodTypesToMigrateReverse = TanMethodTypesToMigrate.map { it.value to it.key }.toMap()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected val fintsModelMapper = FinTsModelMapper()
|
protected val fintsModelMapper = FinTsModelMapper()
|
||||||
|
|
||||||
protected val bankingGroupMapper = BankingGroupMapper()
|
protected val bankingGroupMapper = BankingGroupMapper()
|
||||||
|
@ -82,7 +92,7 @@ open class FinTs4kMapper {
|
||||||
BankAccountIdentifierImpl(account.identifier, account.subAccountNumber, account.iban)
|
BankAccountIdentifierImpl(account.identifier, account.subAccountNumber, account.iban)
|
||||||
|
|
||||||
protected open fun mapTanMethodType(type: TanMethodType): net.codinux.banking.fints.model.TanMethodType =
|
protected open fun mapTanMethodType(type: TanMethodType): net.codinux.banking.fints.model.TanMethodType =
|
||||||
net.codinux.banking.fints.model.TanMethodType.valueOf(type.name)
|
net.codinux.banking.fints.model.TanMethodType.valueOf(TanMethodTypesToMigrateReverse[type.name] ?: type.name)
|
||||||
|
|
||||||
protected open fun mapAllowedTanFormat(allowedTanFormat: AllowedTanFormat?): net.codinux.banking.fints.messages.datenelemente.implementierte.tan.AllowedTanFormat =
|
protected open fun mapAllowedTanFormat(allowedTanFormat: AllowedTanFormat?): net.codinux.banking.fints.messages.datenelemente.implementierte.tan.AllowedTanFormat =
|
||||||
allowedTanFormat?.let { net.codinux.banking.fints.messages.datenelemente.implementierte.tan.AllowedTanFormat.valueOf(it.name) } ?: net.codinux.banking.fints.messages.datenelemente.implementierte.tan.AllowedTanFormat.Alphanumeric
|
allowedTanFormat?.let { net.codinux.banking.fints.messages.datenelemente.implementierte.tan.AllowedTanFormat.valueOf(it.name) } ?: net.codinux.banking.fints.messages.datenelemente.implementierte.tan.AllowedTanFormat.Alphanumeric
|
||||||
|
@ -339,7 +349,7 @@ open class FinTs4kMapper {
|
||||||
)
|
)
|
||||||
|
|
||||||
protected open fun mapTanMethodType(type: net.codinux.banking.fints.model.TanMethodType): TanMethodType =
|
protected open fun mapTanMethodType(type: net.codinux.banking.fints.model.TanMethodType): TanMethodType =
|
||||||
TanMethodType.valueOf(type.name)
|
TanMethodType.valueOf(TanMethodTypesToMigrate[type.name] ?: type.name)
|
||||||
|
|
||||||
protected open fun mapAllowedTanFormat(allowedTanFormat: net.codinux.banking.fints.messages.datenelemente.implementierte.tan.AllowedTanFormat?): AllowedTanFormat =
|
protected open fun mapAllowedTanFormat(allowedTanFormat: net.codinux.banking.fints.messages.datenelemente.implementierte.tan.AllowedTanFormat?): AllowedTanFormat =
|
||||||
allowedTanFormat?.let { AllowedTanFormat.valueOf(it.name) } ?: AllowedTanFormat.Alphanumeric
|
allowedTanFormat?.let { AllowedTanFormat.valueOf(it.name) } ?: AllowedTanFormat.Alphanumeric
|
||||||
|
|
Loading…
Reference in New Issue