From 73ba48b030c89261d5aa8a5dfcec996212214747 Mon Sep 17 00:00:00 2001 From: dankito Date: Tue, 1 Sep 2020 13:57:02 +0200 Subject: [PATCH] Removed unused BankDataMapper --- .../bankdetails/BanksFinTsDetailsRetriever.kt | 5 +---- .../dankito/banking/mapper/BankDataMapper.kt | 18 ------------------ 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 ui/fints4kBankingClient/src/commonMain/kotlin/net/dankito/banking/mapper/BankDataMapper.kt diff --git a/fints4k/src/jvm6Test/kotlin/net/dankito/banking/fints/bankdetails/BanksFinTsDetailsRetriever.kt b/fints4k/src/jvm6Test/kotlin/net/dankito/banking/fints/bankdetails/BanksFinTsDetailsRetriever.kt index 0d2cbdd2..a4973d4d 100644 --- a/fints4k/src/jvm6Test/kotlin/net/dankito/banking/fints/bankdetails/BanksFinTsDetailsRetriever.kt +++ b/fints4k/src/jvm6Test/kotlin/net/dankito/banking/fints/bankdetails/BanksFinTsDetailsRetriever.kt @@ -12,7 +12,6 @@ import net.dankito.banking.fints.messages.datenelemente.implementierte.tan.Auftr import net.dankito.banking.fints.messages.datenelemente.implementierte.tan.BezeichnungDesTanMediumsErforderlich import net.dankito.banking.fints.messages.datenelemente.implementierte.tan.SmsAbbuchungskontoErforderlich import net.dankito.banking.fints.model.* -import net.dankito.banking.mapper.BankDataMapper import net.dankito.banking.bankfinder.BankInfo import net.dankito.banking.fints.response.Response import net.dankito.banking.fints.response.segments.SepaAccountInfoParameters @@ -43,8 +42,6 @@ class BanksFinTsDetailsRetriever { private val bankFinder = InMemoryBankFinder() - private val bankDataMapper = BankDataMapper() - private val product: ProductData = ProductData("15E53C26816138699C7B6A3E8", "1.0.0") // TODO: get version dynamically private val messageBuilder = MessageBuilder() @@ -137,7 +134,7 @@ class BanksFinTsDetailsRetriever { } private fun getAndSaveBankDetails(bankInfo: BankInfo, responsesFolder: File, csvPrinter: CSVPrinter) = runBlocking { - val bank = bankDataMapper.mapFromBankInfo(bankInfo) + val bank = BankData(bankInfo.bankCode, bankInfo.pinTanAddress ?: "", bankInfo.bic, bankInfo.name) val anonymousBankInfoResponse = getAnonymousBankInfo(bank) diff --git a/ui/fints4kBankingClient/src/commonMain/kotlin/net/dankito/banking/mapper/BankDataMapper.kt b/ui/fints4kBankingClient/src/commonMain/kotlin/net/dankito/banking/mapper/BankDataMapper.kt deleted file mode 100644 index 9342e9ad..00000000 --- a/ui/fints4kBankingClient/src/commonMain/kotlin/net/dankito/banking/mapper/BankDataMapper.kt +++ /dev/null @@ -1,18 +0,0 @@ -package net.dankito.banking.mapper - -import net.dankito.banking.fints.model.BankData -import net.dankito.banking.bankfinder.BankInfo - - -open class BankDataMapper { - - open fun mapFromBankInfo(bankInfo: BankInfo): BankData { - return BankData( - bankInfo.bankCode, - bankInfo.pinTanAddress ?: "", - bankInfo.bic, - bankInfo.name - ) - } - -} \ No newline at end of file