Renamed transactionsRetentionDays to serverTransactionsRetentionDays
This commit is contained in:
parent
288af22ac6
commit
376cb08a9f
|
@ -22,7 +22,7 @@ open class BankAccount(
|
|||
// var balance: BigDecimal = BigDecimal.ZERO,
|
||||
var balance: Amount = Amount.Zero, // TODO: add a BigDecimal library
|
||||
|
||||
val transactionsRetentionDays: Int? = null,
|
||||
val serverTransactionsRetentionDays: Int? = null,
|
||||
open var lastTransactionsRetrievalTime: Instant? = null,
|
||||
var retrievedTransactionsFrom: LocalDate? = null,
|
||||
|
||||
|
@ -61,7 +61,7 @@ open class BankAccount(
|
|||
/**
|
||||
* Determines if all transactions that are retained on bank server have been fetched.
|
||||
*
|
||||
* Does this by comparing [transactionsRetentionDays] to [retrievedTransactionsFrom].
|
||||
* Does this by comparing [serverTransactionsRetentionDays] to [retrievedTransactionsFrom].
|
||||
*/
|
||||
open val haveAllRetainedTransactionsBeenRetrieved: Boolean by lazy {
|
||||
val fromDay = retrievedTransactionsFrom
|
||||
|
@ -69,7 +69,7 @@ open class BankAccount(
|
|||
false
|
||||
} else {
|
||||
// if countDaysForWhichTransactionsAreKeptOnBankServer is not set, we cannot know for how long bank server keeps transactions. We then assume for 90 days
|
||||
val storageDays = transactionsRetentionDays ?: 90
|
||||
val storageDays = serverTransactionsRetentionDays ?: 90
|
||||
fromDay < Clock.System.now().toLocalDateTime(TimeZone.of("Europe/Berlin")).date.minus(storageDays, DateTimeUnit.DAY)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue