Renamed tanMethodSupportedByBank to tanMethodsSupportedByBank
This commit is contained in:
parent
27fc67940c
commit
1e1e8e8f11
|
@ -156,10 +156,10 @@ open class FinTsJobExecutor(
|
|||
getAnonymousBankInfo(bank) { anonymousBankInfoResponse ->
|
||||
if (anonymousBankInfoResponse.successful == false) {
|
||||
callback(anonymousBankInfoResponse)
|
||||
} else if (bank.tanMethodSupportedByBank.isEmpty()) { // should only be a theoretical error
|
||||
} else if (bank.tanMethodsSupportedByBank.isEmpty()) { // should only be a theoretical error
|
||||
callback(BankResponse(true, internalError = "Die TAN Verfahren der Bank konnten nicht ermittelt werden")) // TODO: translate
|
||||
} else {
|
||||
bank.tanMethodsAvailableForUser = bank.tanMethodSupportedByBank
|
||||
bank.tanMethodsAvailableForUser = bank.tanMethodsSupportedByBank
|
||||
|
||||
getUsersTanMethod(bank) { didSelectTanMethod ->
|
||||
if (didSelectTanMethod) {
|
||||
|
@ -622,11 +622,11 @@ open class FinTsJobExecutor(
|
|||
|
||||
|
||||
protected open fun ensureBasicBankDataRetrieved(bank: BankData, callback: (BankResponse) -> Unit) {
|
||||
if (bank.tanMethodSupportedByBank.isEmpty() || bank.supportedJobs.isEmpty()) {
|
||||
if (bank.tanMethodsSupportedByBank.isEmpty() || bank.supportedJobs.isEmpty()) {
|
||||
retrieveBasicDataLikeUsersTanMethods(bank) { getBankInfoResponse ->
|
||||
if (getBankInfoResponse.successful == false) {
|
||||
callback(getBankInfoResponse)
|
||||
} else if (bank.tanMethodSupportedByBank.isEmpty() || bank.supportedJobs.isEmpty()) {
|
||||
} else if (bank.tanMethodsSupportedByBank.isEmpty() || bank.supportedJobs.isEmpty()) {
|
||||
callback(BankResponse(false, internalError =
|
||||
"Could not retrieve basic bank data like supported tan methods or supported jobs")) // TODO: translate // TODO: add as messageToShowToUser
|
||||
} else {
|
||||
|
|
|
@ -17,14 +17,14 @@ open class BankData(
|
|||
open var bic: String,
|
||||
|
||||
open var bankName: String = "",
|
||||
open var countryCode: Int = Laenderkennzeichen.Germany, // TODO: currently there are only German banks. But change this if ever other countries get supported
|
||||
open var countryCode: Int = Laenderkennzeichen.Germany, // TODO: currently we only support German banks. But change this if ever other countries get supported
|
||||
open var bpdVersion: Int = BPDVersion.VersionNotReceivedYet,
|
||||
|
||||
open var userId: String = customerId,
|
||||
open var customerName: String = "",
|
||||
open var updVersion: Int = UPDVersion.VersionNotReceivedYet,
|
||||
|
||||
open var tanMethodSupportedByBank: List<TanMethod> = listOf(),
|
||||
open var tanMethodsSupportedByBank: List<TanMethod> = listOf(),
|
||||
open var tanMethodsAvailableForUser: List<TanMethod> = listOf(),
|
||||
open var selectedTanMethod: TanMethod = TanMethodNotSelected,
|
||||
open var tanMedia: List<TanMedium> = listOf(),
|
||||
|
|
|
@ -40,7 +40,7 @@ open class ModelMapper(
|
|||
}
|
||||
|
||||
response.getFirstSegmentById<TanInfo>(InstituteSegmentId.TanInfo)?.let { tanInfo ->
|
||||
bank.tanMethodSupportedByBank = mapToTanMethods(tanInfo)
|
||||
bank.tanMethodsSupportedByBank = mapToTanMethods(tanInfo)
|
||||
}
|
||||
|
||||
response.getFirstSegmentById<CommunicationInfo>(InstituteSegmentId.CommunicationInfo)?.let { communicationInfo ->
|
||||
|
@ -161,7 +161,7 @@ open class ModelMapper(
|
|||
}
|
||||
|
||||
protected open fun findTanMethod(securityFunction: Sicherheitsfunktion, bank: BankData): TanMethod? {
|
||||
return bank.tanMethodSupportedByBank.firstOrNull { it.securityFunction == securityFunction }
|
||||
return bank.tanMethodsSupportedByBank.firstOrNull { it.securityFunction == securityFunction }
|
||||
}
|
||||
|
||||
protected open fun setAllowedJobsForAccount(bank: BankData, account: AccountData, supportedJobs: List<JobParameters>) {
|
||||
|
|
|
@ -19,8 +19,6 @@ import net.dankito.banking.fints.response.client.AddAccountResponse
|
|||
import net.dankito.banking.fints.response.client.FinTsClientResponse
|
||||
import net.dankito.banking.fints.response.client.GetTanMediaListResponse
|
||||
import net.dankito.banking.fints.response.client.GetTransactionsResponse
|
||||
import net.dankito.banking.fints.util.PureKotlinBase64Service
|
||||
import net.dankito.banking.fints.webclient.KtorWebClient
|
||||
import net.dankito.utils.multiplatform.Date
|
||||
import net.dankito.utils.multiplatform.DateFormatter
|
||||
import net.dankito.utils.multiplatform.UUID
|
||||
|
@ -94,7 +92,7 @@ open class FinTsClientTestBase {
|
|||
// then
|
||||
expect(result.successful).isTrue()
|
||||
expect(BankDataAnonymous.supportedHbciVersions).isNotEmpty()
|
||||
expect(BankDataAnonymous.tanMethodSupportedByBank).isNotEmpty()
|
||||
expect(BankDataAnonymous.tanMethodsSupportedByBank).isNotEmpty()
|
||||
expect(BankDataAnonymous.supportedJobs).isNotEmpty()
|
||||
expect(BankDataAnonymous.supportedLanguages).isNotEmpty()
|
||||
expect(BankDataAnonymous.bankName).isNotEmpty()
|
||||
|
@ -127,7 +125,7 @@ open class FinTsClientTestBase {
|
|||
|
||||
expect(Bank.bankName).isNotEmpty()
|
||||
expect(Bank.supportedJobs).isNotEmpty() // supported jobs are now known
|
||||
expect(Bank.tanMethodSupportedByBank).isNotEmpty() // supported tan methods are now known
|
||||
expect(Bank.tanMethodsSupportedByBank).isNotEmpty() // supported tan methods are now known
|
||||
expect(Bank.supportedHbciVersions).isNotEmpty() // supported HBIC versions are now known
|
||||
expect(Bank.supportedLanguages).isNotEmpty() // supported languages are now known
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package net.dankito.banking.fints.bankdetails
|
||||
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import net.dankito.banking.fints.FinTsClient
|
||||
import net.dankito.banking.bankfinder.InMemoryBankFinder
|
||||
import net.dankito.banking.fints.callback.NoOpFinTsClientCallback
|
||||
import net.dankito.banking.fints.messages.MessageBuilder
|
||||
|
@ -20,7 +19,6 @@ import net.dankito.banking.fints.response.segments.SepaAccountInfoParameters
|
|||
import net.dankito.banking.fints.response.segments.TanInfo
|
||||
import net.dankito.banking.fints.response.segments.TanMethodParameters
|
||||
import net.dankito.banking.fints.util.*
|
||||
import net.dankito.banking.fints.webclient.KtorWebClient
|
||||
import org.apache.commons.csv.CSVFormat
|
||||
import org.apache.commons.csv.CSVPrinter
|
||||
import org.junit.Ignore
|
||||
|
@ -186,7 +184,7 @@ class BanksFinTsDetailsRetriever {
|
|||
|
||||
csvPrinter.printRecord(bankInfo.bankCode, bankInfo.name, bankInfo.city,
|
||||
bank.bpdVersion,
|
||||
bank.tanMethodSupportedByBank.joinToString(", ") { it.securityFunction.code + ": " + it.displayName + " (" + it.type + ")" },
|
||||
bank.tanMethodsSupportedByBank.joinToString(", ") { it.securityFunction.code + ": " + it.displayName + " (" + it.type + ")" },
|
||||
supportedTanMethods.joinToString(", "),
|
||||
hhd13Supported,
|
||||
hhd14Supported,
|
||||
|
|
Loading…
Reference in New Issue