commit eb392e409d94e5776b2ae4fc9bf9fa73a30c1873
parent e7b73b2762fb65efd0020ec60fc0ebec2ec1b90c
Author: Antoine A <>
Date: Tue, 2 Dec 2025 14:51:07 +0100
nexus: remove unused EBICS v2 orders
Diffstat:
3 files changed, 12 insertions(+), 24 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/cli/EbicsFetch.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/cli/EbicsFetch.kt
@@ -442,7 +442,7 @@ class EbicsFetch: EbicsCmd() {
val docs = if (documents.isEmpty()) OrderDoc.entries else documents.toList()
// EBICS order than should be fetched
- val selectedOrder = docs.flatMap { cfg.ebics.dialect.downloadDoc(it, false) }
+ val selectedOrder = docs.flatMap { cfg.ebics.dialect.downloadDoc(it) }
// Try to obtain real-time notification channel if not transient
val wssNotification = if (transient) {
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/cli/Testing.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/cli/Testing.kt
@@ -114,7 +114,7 @@ class TxCheck: TalerCmd() {
val nexusCgf = nexusConfig(config)
val cfg = nexusCgf.ebics
val (clientKeys, bankKeys) = expectFullKeys(cfg)
- val order = cfg.dialect.downloadDoc(OrderDoc.acknowledgement, false)
+ val order = cfg.dialect.downloadDoc(OrderDoc.acknowledgement)
val client = httpClient()
val result = tech.libeufin.nexus.test.txCheck(client, cfg, clientKeys, bankKeys, order[0], cfg.dialect.directDebit())
println("$result")
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsOrder.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsOrder.kt
@@ -154,25 +154,13 @@ enum class Standard {
/// German Banking Industry Committee
GBIC;
- fun downloadDoc(doc: OrderDoc, ebics2: Boolean): List<EbicsOrder> = when (this) {
- SIX -> {
- if (ebics2) {
- when (doc) {
- OrderDoc.acknowledgement -> listOf(EbicsOrder.V2_5("HAC", "DZHNN"))
- OrderDoc.status -> listOf(EbicsOrder.V2_5("Z01", "DZHNN"))
- OrderDoc.report -> listOf(EbicsOrder.V2_5("Z52", "DZHNN"))
- OrderDoc.statement -> listOf(EbicsOrder.V2_5("Z53", "DZHNN"))
- OrderDoc.notification -> listOf(EbicsOrder.V2_5("Z54", "DZHNN"))
- }
- } else {
- when (doc) {
- OrderDoc.acknowledgement -> listOf(EbicsOrder.V3.HAC)
- OrderDoc.status -> listOf(EbicsOrder.V3("BTD", "PSR", "CH", "pain.002", "10", "ZIP"))
- OrderDoc.report -> listOf(EbicsOrder.V3("BTD", "STM", "CH", "camt.052", "08", "ZIP"))
- OrderDoc.statement -> listOf(EbicsOrder.V3("BTD", "EOP", "CH", "camt.053", "08", "ZIP"))
- OrderDoc.notification -> listOf(EbicsOrder.V3("BTD", "REP", "CH", "camt.054", "08", "ZIP"))
- }
- }
+ fun downloadDoc(doc: OrderDoc): List<EbicsOrder> = when (this) {
+ SIX -> when (doc) {
+ OrderDoc.acknowledgement -> listOf(EbicsOrder.V3.HAC)
+ OrderDoc.status -> listOf(EbicsOrder.V3("BTD", "PSR", "CH", "pain.002", "10", "ZIP"))
+ OrderDoc.report -> listOf(EbicsOrder.V3("BTD", "STM", "CH", "camt.052", "08", "ZIP"))
+ OrderDoc.statement -> listOf(EbicsOrder.V3("BTD", "EOP", "CH", "camt.053", "08", "ZIP"))
+ OrderDoc.notification -> listOf(EbicsOrder.V3("BTD", "REP", "CH", "camt.054", "08", "ZIP"))
}
GBIC -> when (doc) {
OrderDoc.acknowledgement -> listOf(EbicsOrder.V3.HAC)
@@ -212,9 +200,9 @@ enum class Dialect {
gls -> Standard.GBIC
}
- fun downloadDoc(doc: OrderDoc, ebics2: Boolean): List<EbicsOrder> {
+ fun downloadDoc(doc: OrderDoc): List<EbicsOrder> {
if (this == maerki_baumann) throw IllegalArgumentException("Maerki Baumann does not have EBICS access")
- return this.standard().downloadDoc(doc, ebics2)
+ return this.standard().downloadDoc(doc)
}
fun directDebit(): EbicsOrder {
@@ -232,6 +220,6 @@ enum class Dialect {
// Administrative orders
sequenceOf(EbicsOrder.V3.HAA, EbicsOrder.V3.HKD)
// and documents orders
- + OrderDoc.entries.flatMap { downloadDoc(it, false) }
+ + OrderDoc.entries.flatMap { downloadDoc(it) }
).toSet()
}
\ No newline at end of file