Updated to new fints4k data model, that TanGeneratorTanMedium and MobilePhoneTanMedium are now derived anymore from TanMedium
This commit is contained in:
parent
bbd40d7017
commit
e915b4479f
|
@ -3,7 +3,7 @@ package net.codinux.banking.client.fints4k
|
|||
import net.codinux.banking.client.BankingClientCallback
|
||||
import net.codinux.banking.client.model.MessageLogEntryType
|
||||
import net.codinux.banking.fints.callback.FinTsClientCallback
|
||||
import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanGeneratorTanMedium
|
||||
import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanMedium
|
||||
import net.codinux.banking.fints.model.BankData
|
||||
import net.codinux.banking.fints.model.EnterTanGeneratorAtcResult
|
||||
import net.codinux.banking.fints.model.MessageLogEntry
|
||||
|
@ -31,7 +31,7 @@ open class BridgeFintTsToBankingClientCallback(
|
|||
}
|
||||
}
|
||||
|
||||
override suspend fun enterTanGeneratorAtc(bank: BankData, tanMedium: TanGeneratorTanMedium): EnterTanGeneratorAtcResult {
|
||||
override suspend fun enterTanGeneratorAtc(bank: BankData, tanMedium: TanMedium): EnterTanGeneratorAtcResult {
|
||||
return EnterTanGeneratorAtcResult.userDidNotEnterAtc()
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import net.codinux.banking.client.model.request.GetAccountDataRequest
|
|||
import net.codinux.banking.client.model.request.TransferMoneyRequestForUser
|
||||
import net.codinux.banking.client.model.response.*
|
||||
import net.codinux.banking.client.model.tan.ActionRequiringTan
|
||||
import net.codinux.banking.client.model.tan.AllowedTanFormat
|
||||
import net.codinux.banking.client.model.tan.TanChallenge
|
||||
import net.codinux.banking.client.model.tan.TanImage
|
||||
import net.codinux.banking.client.model.tan.TanMethod
|
||||
|
@ -23,13 +24,13 @@ import net.dankito.banking.client.model.parameter.GetAccountDataParameter
|
|||
import net.dankito.banking.client.model.parameter.RetrieveTransactions
|
||||
import net.dankito.banking.client.model.response.ErrorCode
|
||||
import net.codinux.banking.fints.mapper.FinTsModelMapper
|
||||
import net.codinux.banking.fints.messages.datenelemente.implementierte.signatur.Sicherheitsfunktion
|
||||
import net.codinux.banking.fints.model.*
|
||||
import net.codinux.banking.fints.transactions.swift.model.Holding
|
||||
import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanMedium
|
||||
import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.*
|
||||
import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.MobilePhoneTanMedium
|
||||
import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanGeneratorTanMedium
|
||||
import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanMedium
|
||||
import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanMediumStatus
|
||||
import net.codinux.banking.fints.model.*
|
||||
import net.codinux.banking.fints.transactions.swift.model.Holding
|
||||
import net.dankito.banking.banklistcreator.prettifier.BankingGroupMapper
|
||||
import net.dankito.banking.client.model.parameter.TransferMoneyParameter
|
||||
import kotlin.io.encoding.Base64
|
||||
|
@ -347,8 +348,8 @@ open class FinTs4kMapper {
|
|||
|
||||
protected open fun mapTanMedium(tanMedium: TanMedium) = net.codinux.banking.client.model.tan.TanMedium(
|
||||
mapTanMediumType(tanMedium), tanMedium.mediumName, mapTanMediumStatus(tanMedium.status),
|
||||
(tanMedium as? TanGeneratorTanMedium)?.let { mapTanGeneratorTanMedium(it) },
|
||||
(tanMedium as? MobilePhoneTanMedium)?.let { mapMobilePhoneTanMedium(it) }
|
||||
tanMedium.tanGenerator?.let { mapTanGeneratorTanMedium(it) },
|
||||
tanMedium.mobilePhone?.let { mapMobilePhoneTanMedium(it) }
|
||||
)
|
||||
|
||||
protected open fun mapTanMediumStatus(status: TanMediumStatus): net.codinux.banking.client.model.tan.TanMediumStatus = when (status) {
|
||||
|
@ -367,9 +368,9 @@ open class FinTs4kMapper {
|
|||
tanMedium.validFrom, tanMedium.validTo
|
||||
)
|
||||
|
||||
protected open fun mapTanMediumType(tanMedium: TanMedium): TanMediumType = when {
|
||||
tanMedium is MobilePhoneTanMedium -> TanMediumType.MobilePhone
|
||||
tanMedium is TanGeneratorTanMedium -> TanMediumType.TanGenerator
|
||||
protected open fun mapTanMediumType(tanMedium: TanMedium): TanMediumType = when (tanMedium.mediumClass) {
|
||||
TanMediumKlasse.MobiltelefonMitMobileTan -> TanMediumType.MobilePhone
|
||||
TanMediumKlasse.TanGenerator -> TanMediumType.TanGenerator
|
||||
else -> TanMediumType.Generic
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue