gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: json body


From: gnunet
Subject: [libeufin] branch master updated: json body
Date: Tue, 11 Feb 2020 15:48:11 +0100

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

dold pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 81ecdd6  json body
81ecdd6 is described below

commit 81ecdd6bf707bc41f028ff7da71dc30f4f576a49
Author: Florian Dold <address@hidden>
AuthorDate: Tue Feb 11 15:48:08 2020 +0100

    json body
---
 nexus/src/main/kotlin/tech/libeufin/nexus/Db.kt   | 37 +++++++++++++++++++++++
 nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt |  4 +++
 sandbox/src/main/python/libeufin-cli              |  2 +-
 3 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Db.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/Db.kt
index 79ed455..9056115 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Db.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Db.kt
@@ -4,10 +4,47 @@ import org.jetbrains.exposed.dao.*
 import org.jetbrains.exposed.sql.*
 import org.jetbrains.exposed.sql.transactions.TransactionManager
 import org.jetbrains.exposed.sql.transactions.transaction
+import tech.libeufin.nexus.EbicsSubscribersTable.entityId
+import tech.libeufin.nexus.EbicsSubscribersTable.primaryKey
 import java.sql.Connection
 
 const val ID_MAX_LENGTH = 50
 
+
+object EbicsRawBankTransactionsTable : IdTable<Long>() {
+    override val id = EbicsSubscribersTable.long("id").entityId().primaryKey()
+
+    val nexusSubscriber = reference("subscriber", EbicsSubscribersTable)
+
+    /**
+     * How did we learn about this transaction?  C52 / C53 / C54
+     */
+    val sourceType = text("sourceType")
+
+    val sourceFileName = text("sourceFileName")
+
+    
+
+    /**
+     * "Subject" of the SEPA transaction
+     */
+    val unstructuredRemittanceInformation = 
text("unstructuredRemittanceInformation")
+
+    /**
+     * Is it a credit or debit transaction?
+     */
+    val transactionType = text("transactionType")
+
+    val currency = text("currency")
+
+    val amount = text("amount")
+
+    val creditorIban = text("creditorIban")
+
+    val debitorIban = text("creditorIban")
+}
+
+
 object EbicsSubscribersTable : IdTable<String>() {
     override val id = varchar("id", ID_MAX_LENGTH).entityId().primaryKey()
     val ebicsURL = text("ebicsURL")
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
index d32f31d..605fecf 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
@@ -288,6 +288,10 @@ fun main() {
                 }
             }
 
+            post("/ebics/subscribers/{id}/collect-transactions-c52") {
+                // Download C52 and store the result in the right database 
table
+            }
+
             post("/ebics/subscribers/{id}/sendC52") {
                 val id = expectId(call.parameters["id"])
                 val paramsJson = call.receive<EbicsStandardOrderParamsJson>()
diff --git a/sandbox/src/main/python/libeufin-cli 
b/sandbox/src/main/python/libeufin-cli
index 4f35dbf..9ad387e 100755
--- a/sandbox/src/main/python/libeufin-cli
+++ b/sandbox/src/main/python/libeufin-cli
@@ -570,7 +570,7 @@ def htd(ctx, account_id, prepare, nexus_base_url):
         ctx.invoke(sync)
     url = urljoin(nexus_base_url, 
"/ebics/subscribers/{}/sendHtd".format(account_id))
     try:
-        resp = post(url)
+        resp = post(url, json=dict())
     except Exception:
         print("Could not reach the bank")
         return

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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