From 7c02b56388bfe1322f20e5037d3e351ca005bc24 Mon Sep 17 00:00:00 2001 From: dankl Date: Sun, 13 Oct 2019 19:30:27 +0200 Subject: [PATCH] Implemented BankDataMapper --- .../fints/model/mapper/BankDataMapper.kt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 fints4javaLib/src/main/kotlin/net/dankito/fints/model/mapper/BankDataMapper.kt diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/model/mapper/BankDataMapper.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/model/mapper/BankDataMapper.kt new file mode 100644 index 00000000..4048cd4f --- /dev/null +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/model/mapper/BankDataMapper.kt @@ -0,0 +1,20 @@ +package net.dankito.fints.model.mapper + +import net.dankito.fints.messages.datenelemente.abgeleiteteformate.Laenderkennzeichen +import net.dankito.fints.model.BankData +import net.dankito.fints.model.BankInfo + + +open class BankDataMapper { + + open fun mapFromBankInfo(bankInfo: BankInfo): BankData { + return BankData( + bankInfo.bankCode, + Laenderkennzeichen.Germany, // TODO: currently there are only German banks. But change this if ever other countries get supported + bankInfo.pinTanAddress ?: "", + name = bankInfo.name, + bic = bankInfo.bic + ) + } + +} \ No newline at end of file