summaryrefslogtreecommitdiff
path: root/nexus/src/main/kotlin/tech/libeufin/nexus/Iso20022.kt
diff options
context:
space:
mode:
Diffstat (limited to 'nexus/src/main/kotlin/tech/libeufin/nexus/Iso20022.kt')
-rw-r--r--nexus/src/main/kotlin/tech/libeufin/nexus/Iso20022.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Iso20022.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/Iso20022.kt
index 6269377a..103795d6 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Iso20022.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Iso20022.kt
@@ -145,7 +145,7 @@ data class CustomerAck(
/** Parse HAC pain.002 XML file */
fun parseCustomerAck(xml: InputStream): List<CustomerAck> {
- return destructXml(xml, "Document") {
+ return XmlDestructor.fromStream(xml, "Document") {
one("CstmrPmtStsRpt").map("OrgnlPmtInfAndSts") {
val actionType = one("OrgnlPmtInfId").enum<HacAction>()
one("StsRsnInf") {
@@ -219,7 +219,7 @@ fun parseCustomerPaymentStatusReport(xml: InputStream): PaymentStatus {
Reason(code, "")
}
}
- return destructXml(xml, "Document") {
+ return XmlDestructor.fromStream(xml, "Document") {
// TODO handle batch status
one("CstmrPmtStsRpt") {
val (msgId, msgCode, msgReasons) = one("OrgnlGrpInfAndSts") {
@@ -288,7 +288,7 @@ fun parseTxNotif(
fun notificationForEachTx(
directionLambda: XmlDestructor.(Instant, Boolean, String?) -> Unit
) {
- destructXml(notifXml, "Document") {
+ XmlDestructor.fromStream(notifXml, "Document") {
opt("BkToCstmrDbtCdtNtfctn")?.each("Ntfctn") {
each("Ntry") {
val reversal = opt("RvslInd")?.bool() ?: false