gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] 01/02: nexus db


From: gnunet
Subject: [libeufin] 01/02: nexus db
Date: Sat, 18 Nov 2023 08:20:18 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

commit e2a0842bf0d845dcb3201920bed2ed0fdd0e7322
Author: MS <ms@taler.net>
AuthorDate: Sat Nov 18 08:07:25 2023 +0100

    nexus db
    
    setting as nullable the values that are not always found
    in CaMt documents for outgoing transactions.  Notably, the
    camt.054 Lastschriftavisierung lacks payee IBAN and name,
    and payment subject.
---
 database-versioning/libeufin-nexus-0001.sql           |  2 +-
 nexus/src/main/kotlin/tech/libeufin/nexus/Database.kt | 13 ++++++++-----
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/database-versioning/libeufin-nexus-0001.sql 
b/database-versioning/libeufin-nexus-0001.sql
index 5c6f3082..61f97294 100644
--- a/database-versioning/libeufin-nexus-0001.sql
+++ b/database-versioning/libeufin-nexus-0001.sql
@@ -64,7 +64,7 @@ CREATE TABLE IF NOT EXISTS outgoing_transactions
   ,amount taler_amount NOT NULL
   ,wire_transfer_subject TEXT
   ,execution_time INT8 NOT NULL
-  ,credit_payto_uri TEXT NOT NULL
+  ,credit_payto_uri TEXT
   ,bank_transfer_id TEXT NOT NULL
   );
 
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Database.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/Database.kt
index ae4b865f..64e2c9f7 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Database.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Database.kt
@@ -92,12 +92,15 @@ enum class PaymentInitiationOutcome {
 
 // OUTGOING PAYMENTS STRUCTS
 
+/**
+ * Collects data of a booked outgoing payment.
+ */
 data class OutgoingPayment(
     val amount: TalerAmount,
-    val wireTransferSubject: String,
     val executionTime: Instant,
-    val creditPaytoUri: String,
-    val bankTransferId: String
+    val bankTransferId: String,
+    val creditPaytoUri: String? = null, // not showing in camt.054
+    val wireTransferSubject: String? = null // not showing in camt.054
 )
 
 /**
@@ -183,8 +186,8 @@ class Database(dbConfig: String): java.io.Closeable {
      *
      * @param paymentData information about the outgoing payment.
      * @param reconcileId optional row ID of the initiated payment
-     *        that will reference this one.  Note: if this value is
-     *        not found, then NO row gets inserted in the database.
+     *        that will reference this one.  If null, then only the
+     *        outgoing payment record gets inserted.
      * @return operation outcome enum.
      */
     suspend fun outgoingPaymentCreate(

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]