Fixed mapping retrieveAllTransactions

This commit is contained in:
dankito 2024-09-07 00:02:15 +02:00
parent c1140c1836
commit 9d5826ac3c
1 changed files with 2 additions and 2 deletions

View File

@ -73,8 +73,8 @@ class BankingService(
suspend fun addAccount(bank: BankInfo, loginName: String, password: String, retrieveAllTransactions: Boolean = false): Boolean {
try {
val options = GetAccountDataOptions(retrieveTransactions = RetrieveTransactions.All)
val response = client.getAccountDataAsync(GetAccountDataRequest(bank.bankCode, loginName, password, options))
val retrieveTransactions = if (retrieveAllTransactions) RetrieveTransactions.All else RetrieveTransactions.OfLast90Days
val response = client.getAccountDataAsync(GetAccountDataRequest(bank.bankCode, loginName, password, GetAccountDataOptions(retrieveTransactions)))
if (response.type == ResponseType.Success && response.data != null) {
handleSuccessfulGetAccountDataResponse(response.data!!)