Updated to new BankingClient model that renamed lastTransactionsRetrievalTime to lastAccountUpdateTime and made fints4k an implementation detail
This commit is contained in:
parent
28530d63cd
commit
35624c0034
|
@ -55,7 +55,7 @@ open class SqliteBankingRepository(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun getAllBankAccounts(): List<BankAccountEntity> = userQueries.selectAllBankAccounts { id, userId, identifier, subAccountNumber, iban, productName, accountHolderName, type, currency, accountLimit, isAccountTypeSupportedByApplication, features, balance, serverTransactionsRetentionDays, lastTransactionsRetrievalTime, retrievedTransactionsFrom, userSetDisplayName, displayIndex, hideAccount, includeInAutomaticAccountsUpdate ->
|
fun getAllBankAccounts(): List<BankAccountEntity> = userQueries.selectAllBankAccounts { id, userId, identifier, subAccountNumber, iban, productName, accountHolderName, type, currency, accountLimit, isAccountTypeSupportedByApplication, features, balance, serverTransactionsRetentionDays, lastAccountUpdateTime, retrievedTransactionsFrom, userSetDisplayName, displayIndex, hideAccount, includeInAutomaticAccountsUpdate ->
|
||||||
BankAccountEntity(
|
BankAccountEntity(
|
||||||
id, userId,
|
id, userId,
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ open class SqliteBankingRepository(
|
||||||
mapToAmount(balance),
|
mapToAmount(balance),
|
||||||
|
|
||||||
mapToInt(serverTransactionsRetentionDays),
|
mapToInt(serverTransactionsRetentionDays),
|
||||||
mapToInstant(lastTransactionsRetrievalTime), mapToDate(retrievedTransactionsFrom),
|
mapToInstant(lastAccountUpdateTime), mapToDate(retrievedTransactionsFrom),
|
||||||
|
|
||||||
mutableListOf(), mutableListOf(), emptyList(),
|
mutableListOf(), mutableListOf(), emptyList(),
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ open class SqliteBankingRepository(
|
||||||
account.isAccountTypeSupportedByApplication, mapEnumCollectionToString(account.features),
|
account.isAccountTypeSupportedByApplication, mapEnumCollectionToString(account.features),
|
||||||
|
|
||||||
mapInt(account.serverTransactionsRetentionDays),
|
mapInt(account.serverTransactionsRetentionDays),
|
||||||
mapInstant(account.lastTransactionsRetrievalTime), mapDate(account.retrievedTransactionsFrom),
|
mapInstant(account.lastAccountUpdateTime), mapDate(account.retrievedTransactionsFrom),
|
||||||
|
|
||||||
account.userSetDisplayName, mapInt(account.displayIndex),
|
account.userSetDisplayName, mapInt(account.displayIndex),
|
||||||
account.hideAccount, account.includeInAutomaticAccountsUpdate
|
account.hideAccount, account.includeInAutomaticAccountsUpdate
|
||||||
|
|
|
@ -25,7 +25,7 @@ class BankAccountEntity(
|
||||||
balance: Amount = Amount.Zero, // TODO: add a BigDecimal library
|
balance: Amount = Amount.Zero, // TODO: add a BigDecimal library
|
||||||
|
|
||||||
serverTransactionsRetentionDays: Int? = null,
|
serverTransactionsRetentionDays: Int? = null,
|
||||||
lastTransactionsRetrievalTime: Instant? = null,
|
lastAccountUpdateTime: Instant? = null,
|
||||||
retrievedTransactionsFrom: LocalDate? = null,
|
retrievedTransactionsFrom: LocalDate? = null,
|
||||||
|
|
||||||
bookedTransactions: MutableList<AccountTransactionEntity> = mutableListOf(),
|
bookedTransactions: MutableList<AccountTransactionEntity> = mutableListOf(),
|
||||||
|
@ -46,7 +46,7 @@ class BankAccountEntity(
|
||||||
|
|
||||||
balance,
|
balance,
|
||||||
|
|
||||||
serverTransactionsRetentionDays, lastTransactionsRetrievalTime, retrievedTransactionsFrom,
|
serverTransactionsRetentionDays, lastAccountUpdateTime, retrievedTransactionsFrom,
|
||||||
|
|
||||||
bookedTransactions as MutableList<AccountTransaction>, prebookedTransactions,
|
bookedTransactions as MutableList<AccountTransaction>, prebookedTransactions,
|
||||||
holdings,
|
holdings,
|
||||||
|
@ -66,7 +66,7 @@ class BankAccountEntity(
|
||||||
account.balance,
|
account.balance,
|
||||||
|
|
||||||
account.serverTransactionsRetentionDays,
|
account.serverTransactionsRetentionDays,
|
||||||
account.lastTransactionsRetrievalTime, account.retrievedTransactionsFrom,
|
account.lastAccountUpdateTime, account.retrievedTransactionsFrom,
|
||||||
|
|
||||||
transactions.toMutableList(), mutableListOf(), holdings,
|
transactions.toMutableList(), mutableListOf(), holdings,
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ import kotlinx.coroutines.*
|
||||||
import kotlinx.datetime.LocalDate
|
import kotlinx.datetime.LocalDate
|
||||||
import net.codinux.banking.client.SimpleBankingClientCallback
|
import net.codinux.banking.client.SimpleBankingClientCallback
|
||||||
import net.codinux.banking.client.fints4k.FinTs4kBankingClient
|
import net.codinux.banking.client.fints4k.FinTs4kBankingClient
|
||||||
|
import net.codinux.banking.client.fints4k.FinTsClientOptions
|
||||||
import net.codinux.banking.client.model.*
|
import net.codinux.banking.client.model.*
|
||||||
import net.codinux.banking.client.model.options.GetAccountDataOptions
|
import net.codinux.banking.client.model.options.GetAccountDataOptions
|
||||||
import net.codinux.banking.client.model.options.RetrieveTransactions
|
import net.codinux.banking.client.model.options.RetrieveTransactions
|
||||||
|
@ -17,8 +18,6 @@ import net.codinux.banking.dataaccess.BankingRepository
|
||||||
import net.codinux.banking.dataaccess.entities.AccountTransactionEntity
|
import net.codinux.banking.dataaccess.entities.AccountTransactionEntity
|
||||||
import net.codinux.banking.dataaccess.entities.BankAccountEntity
|
import net.codinux.banking.dataaccess.entities.BankAccountEntity
|
||||||
import net.codinux.banking.dataaccess.entities.UserEntity
|
import net.codinux.banking.dataaccess.entities.UserEntity
|
||||||
import net.codinux.banking.fints.config.FinTsClientConfiguration
|
|
||||||
import net.codinux.banking.fints.config.FinTsClientOptions
|
|
||||||
import net.codinux.banking.ui.IOorDefault
|
import net.codinux.banking.ui.IOorDefault
|
||||||
import net.codinux.banking.ui.model.AccountTransactionViewModel
|
import net.codinux.banking.ui.model.AccountTransactionViewModel
|
||||||
import net.codinux.banking.ui.model.BankInfo
|
import net.codinux.banking.ui.model.BankInfo
|
||||||
|
@ -37,7 +36,7 @@ class BankingService(
|
||||||
private val bankFinder: BankFinder
|
private val bankFinder: BankFinder
|
||||||
) {
|
) {
|
||||||
|
|
||||||
private val client = FinTs4kBankingClient(FinTsClientConfiguration(FinTsClientOptions(true)), SimpleBankingClientCallback { tanChallenge, callback ->
|
private val client = FinTs4kBankingClient(FinTsClientOptions(true, closeDialogs = false), SimpleBankingClientCallback { tanChallenge, callback ->
|
||||||
uiState.receivedTanChallenge(tanChallenge, callback)
|
uiState.receivedTanChallenge(tanChallenge, callback)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package net.codinux.banking.ui.service
|
||||||
import kotlinx.datetime.DayOfWeek
|
import kotlinx.datetime.DayOfWeek
|
||||||
import kotlinx.datetime.LocalDate
|
import kotlinx.datetime.LocalDate
|
||||||
import kotlinx.datetime.Month
|
import kotlinx.datetime.Month
|
||||||
import net.codinux.banking.fints.extensions.minusDays
|
import net.codinux.banking.client.model.extensions.minusDays
|
||||||
import net.codinux.banking.ui.model.AccountTransactionViewModel
|
import net.codinux.banking.ui.model.AccountTransactionViewModel
|
||||||
import net.codinux.banking.ui.model.TransactionsGrouping
|
import net.codinux.banking.ui.model.TransactionsGrouping
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue