Renamed countDaysForWhichTransactionsAreKeptOnBankServer to transactionsRetentionDays

This commit is contained in:
dankito 2024-09-05 22:06:06 +02:00
parent 1e5c83c369
commit 7353b0347e
1 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ open class BankAccount(
val isAccountTypeSupportedByApplication: Boolean = false, val isAccountTypeSupportedByApplication: Boolean = false,
val features: Set<BankAccountFeatures> = emptySet(), val features: Set<BankAccountFeatures> = emptySet(),
val countDaysForWhichTransactionsAreKeptOnBankServer: Int? = null, val transactionsRetentionDays: Int? = null,
open var lastTransactionsRetrievalTime: Instant? = null, open var lastTransactionsRetrievalTime: Instant? = null,
var retrievedTransactionsFrom: LocalDate? = null, var retrievedTransactionsFrom: LocalDate? = null,
@ -44,7 +44,7 @@ open class BankAccount(
/** /**
* Determines if all transactions that are retained on bank server have been fetched. * Determines if all transactions that are retained on bank server have been fetched.
* *
* Does this by comparing [countDaysForWhichTransactionsAreKeptOnBankServer] to [retrievedTransactionsFrom]. * Does this by comparing [transactionsRetentionDays] to [retrievedTransactionsFrom].
*/ */
open val haveAllRetainedTransactionsBeenRetrieved: Boolean by lazy { open val haveAllRetainedTransactionsBeenRetrieved: Boolean by lazy {
val fromDay = retrievedTransactionsFrom val fromDay = retrievedTransactionsFrom
@ -52,7 +52,7 @@ open class BankAccount(
false false
} else { } else {
// if countDaysForWhichTransactionsAreKeptOnBankServer is not set, we cannot know for how long bank server keeps transactions. We then assume for 90 days // if countDaysForWhichTransactionsAreKeptOnBankServer is not set, we cannot know for how long bank server keeps transactions. We then assume for 90 days
val storageDays = countDaysForWhichTransactionsAreKeptOnBankServer ?: 90 val storageDays = transactionsRetentionDays ?: 90
fromDay < Clock.System.now().toLocalDateTime(TimeZone.of("Europe/Berlin")).date.minus(storageDays, DateTimeUnit.DAY) fromDay < Clock.System.now().toLocalDateTime(TimeZone.of("Europe/Berlin")).date.minus(storageDays, DateTimeUnit.DAY)
} }
} }