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