[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Camt parsing.
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Camt parsing. |
Date: |
Mon, 30 Nov 2020 17:02:32 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new da14d2c Camt parsing.
da14d2c is described below
commit da14d2ca9f787f7a3be3fa96195c82d44cea0799
Author: MS <ms@taler.net>
AuthorDate: Mon Nov 30 16:57:51 2020 +0100
Camt parsing.
Abstracting even more over the "batched" or "singleton"
style of a money movement.
---
.../tech/libeufin/nexus/iso20022/Iso20022.kt | 29 ++++------------------
1 file changed, 5 insertions(+), 24 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/iso20022/Iso20022.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/iso20022/Iso20022.kt
index b3e0be0..796f49b 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/iso20022/Iso20022.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/iso20022/Iso20022.kt
@@ -326,7 +326,7 @@ data class CamtBankAccountEntry(
/**
* Details of the underlying transaction for type=Simple.
*/
- val details: TransactionDetails?,
+ val details: TransactionDetails? = null,
val batches: List<Batch>?
)
@@ -930,16 +930,6 @@ private fun
XmlElementDestructor.extractInnerTransactions(): CamtReport {
val acctSvcrRef = maybeUniqueChildNamed("AcctSvcrRef") {
focusElement.textContent }
val entryRef = maybeUniqueChildNamed("NtryRef") {
focusElement.textContent }
- val numInnerTxs = mapEachChildNamed("NtryDtls") {
- mapEachChildNamed("TxDtls") { Unit }
- }.flatten().count()
-
- val numBatches = mapEachChildNamed("NtryDtls") {
- mapEachChildNamed("Btch") { Unit }
- }.flatten().count()
-
- val isBatch = numBatches > 0 || numInnerTxs > 1
-
val currencyExchange = maybeUniqueChildNamed("AmtDtls") {
val cxCntrVal = maybeUniqueChildNamed("CntrValAmt") {
extractMaybeCurrencyExchange() }
val cxTx = maybeUniqueChildNamed("TxAmt") {
extractMaybeCurrencyExchange() }
@@ -965,19 +955,10 @@ private fun
XmlElementDestructor.extractInnerTransactions(): CamtReport {
instructedAmount = instructedAmount,
creditDebitIndicator = creditDebitIndicator,
bankTransactionCode = btc,
- details = if (isBatch) {
- null
- } else {
- extractSingleDetails(amount, creditDebitIndicator)
- },
- batches = if (isBatch) {
- extractBatches(
- if (mapEachChildNamed("NtryDtls") {}.count() == 1) amount
else null,
- creditDebitIndicator
- )
- } else {
- null
- },
+ batches = extractBatches(
+ if (mapEachChildNamed("NtryDtls") {}.count() == 1) amount else
null,
+ creditDebitIndicator
+ ),
bookingDate = maybeUniqueChildNamed("BookgDt") {
extractDateOrDateTime() },
valueDate = maybeUniqueChildNamed("ValDt") {
extractDateOrDateTime() },
accountServicerRef = acctSvcrRef,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: Camt parsing.,
gnunet <=