[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: creating OfferedBankAccount type.
From: |
gnunet |
Subject: |
[libeufin] branch master updated: creating OfferedBankAccount type. |
Date: |
Thu, 25 Jun 2020 05:32:33 +0200 |
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 48a4ad8 creating OfferedBankAccount type.
48a4ad8 is described below
commit 48a4ad8bb7f1c1a3d29add0082d3657528cce2fd
Author: MS <ms@taler.net>
AuthorDate: Thu Jun 25 05:32:08 2020 +0200
creating OfferedBankAccount type.
---
nexus/src/main/kotlin/tech/libeufin/nexus/server/JSON.kt | 11 ++++++++++-
.../main/kotlin/tech/libeufin/nexus/server/NexusServer.kt | 15 ++++++++-------
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/server/JSON.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/server/JSON.kt
index 1a3cdeb..13888cd 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/server/JSON.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/server/JSON.kt
@@ -28,7 +28,6 @@ import tech.libeufin.nexus.BankTransaction
import tech.libeufin.util.*
import java.time.Instant
import java.time.ZoneId
-import java.time.ZoneOffset
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
import java.time.format.DateTimeFormatterBuilder
@@ -271,6 +270,16 @@ data class BankAccount(
var account: String
)
+data class OfferedBankAccount(
+ var ownerName: String,
+ var iban: String,
+ var bic: String,
+ var offeredAccountId: String,
+ var nexusBankAccountId: String?
+)
+
+
+
/** Response type of "GET /bank-accounts" */
data class BankAccounts(
var accounts: MutableList<BankAccount> = mutableListOf()
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
index 7100e19..1664476 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
@@ -49,7 +49,6 @@ import io.ktor.utils.io.ByteReadChannel
import io.ktor.utils.io.jvm.javaio.toByteReadChannel
import io.ktor.utils.io.jvm.javaio.toInputStream
import org.jetbrains.exposed.sql.and
-import org.jetbrains.exposed.sql.not
import org.jetbrains.exposed.sql.transactions.transaction
import org.slf4j.event.Level
import tech.libeufin.nexus.*
@@ -59,8 +58,6 @@ import tech.libeufin.nexus.bankaccount.getPaymentInitiation
import tech.libeufin.nexus.bankaccount.submitPaymentInitiation
import tech.libeufin.nexus.ebics.*
import tech.libeufin.util.*
-import tech.libeufin.util.ebics_h004.EbicsTypes
-import tech.libeufin.util.ebics_h004.HTDResponseOrderData
import tech.libeufin.nexus.logger
import java.lang.IllegalArgumentException
import java.net.URLEncoder
@@ -791,15 +788,19 @@ fun serverMain(dbName: String, host: String) {
// show all the offered accounts (both imported and non)
get("/accounts") {
- val ret = BankAccounts()
+ val ret = mutableListOf<OfferedBankAccount>()
transaction {
val conn = requireBankConnection(call, "connid")
OfferedBankAccountEntity.find {
OfferedBankAccountsTable.bankConnection eq
conn.id.value
}.forEach {
- ret.accounts.add(
- BankAccount(
- iban = it.iban, bic = it.bankCode, holder
= it.accountHolder, account = it.id.value
+ ret.add(
+ OfferedBankAccount(
+ ownerName = it.accountHolder,
+ iban = it.iban,
+ bic = it.bankCode,
+ offeredAccountId = it.id.value,
+ nexusBankAccountId = it.imported?.id?.value
)
)
}
--
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: creating OfferedBankAccount type.,
gnunet <=