libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 79755efe112a33db5d5076cbac6e1e7694d02f70
parent 391f7a62c1423be53d3779352e5e25bc17774278
Author: MS <ms@taler.net>
Date:   Fri,  5 Feb 2021 14:28:21 +0100

remove avoidable nullable affecting AcctSvcrRef

Diffstat:
Msandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt | 8+-------
Msandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt | 2+-
Mutil/src/main/kotlin/JSON.kt | 2+-
3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt @@ -342,13 +342,7 @@ fun buildCamtString(type: Int, subscriberIban: String, history: List<RawPayment> text(dashedDate) } // date of assets' actual (un)availability element("AcctSvcrRef") { - val uid = if (it.uid != null) it.uid.toString() else { - throw EbicsRequestError( - errorCode = "091116", - errorText = "EBICS_PROCESSING_ERROR" - ) - } - text(uid) + text(it.uid) } element("BkTxCd") { /* "Set of elements used to fully identify the type of underlying diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt @@ -43,7 +43,7 @@ fun historyForAccount(iban: String): List<RawPayment> { // The line below produces a value too long (>35 chars), // and it makes the document invalid! // uid = "${it[pmtInfId]}-${it[msgId]}" - uid = "${it[BankAccountTransactionsTable.pmtInfId]}", + uid = it[BankAccountTransactionsTable.accountServicerReference], direction = it[BankAccountTransactionsTable.direction], pmtInfId = it[BankAccountTransactionsTable.pmtInfId] ) diff --git a/util/src/main/kotlin/JSON.kt b/util/src/main/kotlin/JSON.kt @@ -35,7 +35,7 @@ data class RawPayment( val currency: String, val subject: String, val date: String? = null, - val uid: String? = null, // FIXME: explain this value. + val uid: String, // FIXME: explain this value. val direction: String, // FIXME: this following value should be restricted to only DBIT/CRDT. // The following two values are rather CAMT/PAIN