Changed type of tanExpirationTime to Instant so that UI can better convert it to user's time zone
This commit is contained in:
parent
be2908517f
commit
75320da2be
|
@ -1,6 +1,6 @@
|
|||
package net.codinux.banking.fints.model
|
||||
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
import kotlinx.datetime.Instant
|
||||
import net.codinux.banking.fints.tan.FlickerCode
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ open class FlickerCodeTanChallenge(
|
|||
tanMediaIdentifier: String?,
|
||||
bank: BankData,
|
||||
account: AccountData? = null,
|
||||
tanExpirationTime: LocalDateTime? = null
|
||||
tanExpirationTime: Instant? = null
|
||||
) : TanChallenge(forAction, messageToShowToUser, challenge, tanMethod, tanMediaIdentifier, bank, account, tanExpirationTime) {
|
||||
|
||||
override fun toString(): String {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package net.codinux.banking.fints.model
|
||||
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
import kotlinx.datetime.Instant
|
||||
import net.codinux.banking.fints.tan.TanImage
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ open class ImageTanChallenge(
|
|||
tanMediaIdentifier: String?,
|
||||
bank: BankData,
|
||||
account: AccountData? = null,
|
||||
tanExpirationTime: LocalDateTime? = null
|
||||
tanExpirationTime: Instant? = null
|
||||
) : TanChallenge(forAction, messageToShowToUser, challenge, tanMethod, tanMediaIdentifier, bank, account, tanExpirationTime) {
|
||||
|
||||
override fun toString(): String {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package net.codinux.banking.fints.model
|
||||
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
import net.codinux.banking.fints.extensions.nowExt
|
||||
import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanMedium
|
||||
import net.codinux.banking.fints.response.BankResponse
|
||||
|
@ -21,7 +20,7 @@ open class TanChallenge(
|
|||
*
|
||||
* In server's time zone, that is Europe/Berlin.
|
||||
*/
|
||||
val tanExpirationTime: LocalDateTime? = null,
|
||||
val tanExpirationTime: Instant? = null,
|
||||
val challengeCreationTimestamp: Instant = Instant.nowExt()
|
||||
) {
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package net.codinux.banking.fints.response
|
||||
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
import kotlinx.datetime.LocalTime
|
||||
import kotlinx.datetime.atTime
|
||||
import kotlinx.datetime.*
|
||||
import net.codinux.banking.fints.extensions.EuropeBerlin
|
||||
import net.codinux.log.logger
|
||||
import net.codinux.banking.fints.log.IMessageLogAppender
|
||||
import net.codinux.banking.fints.messages.Separators
|
||||
|
@ -577,7 +575,7 @@ open class ResponseParser(
|
|||
if (dataElementGroups.size > 3) parseStringToNullIfEmpty(dataElementGroups[3]) else null,
|
||||
if (dataElementGroups.size > 4) parseStringToNullIfEmpty(dataElementGroups[4]) else null,
|
||||
binaryChallengeHHD_UC?.let { extractBinaryData(it) },
|
||||
if (dataElementGroups.size > 6) parseNullableDateTime(dataElementGroups[6]) else null,
|
||||
if (dataElementGroups.size > 6) parseNullableDateTime(dataElementGroups[6])?.toInstant(TimeZone.EuropeBerlin) else null,
|
||||
if (dataElementGroups.size > 7) parseStringToNullIfEmpty(dataElementGroups[7]) else null,
|
||||
segment
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package net.codinux.banking.fints.response.segments
|
||||
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
import kotlinx.datetime.Instant
|
||||
import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanProcess
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@ open class TanResponse(
|
|||
*
|
||||
* In server's time zone, that is Europe/Berlin.
|
||||
*/
|
||||
val tanExpirationTime: LocalDateTime?,
|
||||
val tanExpirationTime: Instant?,
|
||||
val tanMediaIdentifier: String? = null, // M: bei TAN-Prozess=1, 3, 4 und „Anzahl unterstützter aktiver TAN-Medien“ nicht vorhanden. O: sonst
|
||||
|
||||
segmentString: String
|
||||
|
|
Loading…
Reference in New Issue