Implemented mapping all AccountTypes

This commit is contained in:
dankl 2020-01-25 18:06:34 +01:00 committed by dankito
parent be479edc11
commit 69dea311bf
3 changed files with 30 additions and 4 deletions

View File

@ -14,7 +14,7 @@ open class BankAccount @JvmOverloads constructor(
var subAccountNumber: String?,
var balance: BigDecimal = BigDecimal.ZERO,
var currency: String = "EUR",
var type: BankAccountType = BankAccountType.Giro,
var type: BankAccountType = BankAccountType.Girokonto,
var supportsRetrievingAccountTransactions: Boolean = false,
var supportsRetrievingBalance: Boolean = false,
var supportsTransferringMoney: Boolean = false,

View File

@ -3,6 +3,24 @@ package net.dankito.banking.ui.model
enum class BankAccountType {
Giro
Girokonto,
Sparkonto,
Festgeldkonto,
Wertpapierdepot,
Darlehenskonto,
Kreditkartenkonto,
FondsDepot,
Bausparvertrag,
Versicherungsvertrag,
Sonstige
}

View File

@ -90,8 +90,16 @@ open class fints4javaModelMapper {
open fun mapBankAccountType(type: AccountType?): BankAccountType {
return when (type) {
else -> BankAccountType.Giro
AccountType.Girokonto -> BankAccountType.Girokonto
AccountType.Sparkonto -> BankAccountType.Sparkonto
AccountType.Festgeldkonto -> BankAccountType.Festgeldkonto
AccountType.Wertpapierdepot -> BankAccountType.Wertpapierdepot
AccountType.Darlehenskonto -> BankAccountType.Darlehenskonto
AccountType.Kreditkartenkonto -> BankAccountType.Kreditkartenkonto
AccountType.FondsDepot -> BankAccountType.FondsDepot
AccountType.Bausparvertrag -> BankAccountType.Bausparvertrag
AccountType.Versicherungsvertrag -> BankAccountType.Versicherungsvertrag
else -> BankAccountType.Sonstige
}
}