libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 7ec8e050a3cae07b2ec02867a1a9f4010743da94
parent 7b0b802861fcf5a7e75e61237ee4c82e0cd6079e
Author: MS <ms@taler.net>
Date:   Mon,  1 Jun 2020 16:01:00 +0200

Make new bank account under loopback.

Diffstat:
Mnexus/src/main/kotlin/tech/libeufin/nexus/Main.kt | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt @@ -197,6 +197,14 @@ fun createLoopbackBankConnection(bankConnectionName: String, user: NexusUserEnti owner = user type = "loopback" } + val bankAccount = jacksonObjectMapper().treeToValue(data, BankAccount::class.java) + NexusBankAccountEntity.new(bankAccount.account){ + iban = bankAccount.iban + bankCode = bankAccount.bic + accountHolder = bankAccount.holder + defaultBankConnection = bankConn + highestSeenBankMessageId = 0 + } } fun createEbicsBankConnection(bankConnectionName: String, user: NexusUserEntity, data: JsonNode) { @@ -703,7 +711,7 @@ fun serverMain(dbName: String) { } else -> { - throw NexusError(HttpStatusCode.BadRequest, "connection type not supported") + throw NexusError(HttpStatusCode.BadRequest, "connection type ${body.type} not supported") } } }