From d4a03e322349da9ceeb4e26394f0903881f914cc Mon Sep 17 00:00:00 2001 From: MS Date: Thu, 3 Dec 2020 13:55:42 +0100 Subject: ingestion test API --- libeufin/api-nexus.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libeufin/api-nexus.rst') diff --git a/libeufin/api-nexus.rst b/libeufin/api-nexus.rst index 01e8e926..5470707d 100644 --- a/libeufin/api-nexus.rst +++ b/libeufin/api-nexus.rst @@ -103,6 +103,20 @@ User Management Return list of users. +Test API +-------- + +.. http:post:: {nexusBase}/bank-accounts/{acctid}/test-camt-ingestion/{type} + + This call allows tests to **directly** give Nexus a Camt document. After + the processing, all the payment(s) details should be ingested as if the + Camt came normally from a bank / the Sandbox. + + **Response** + + The successful case should respond with a ``200 OK`` and a empty JSON body. + + Bank Accounts ------------- -- cgit v1.2.3 From afec3965583eff04bffa62bd4b53dc9de682ff32 Mon Sep 17 00:00:00 2001 From: MS Date: Thu, 3 Dec 2020 14:05:09 +0100 Subject: fix API description --- libeufin/api-nexus.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libeufin/api-nexus.rst') diff --git a/libeufin/api-nexus.rst b/libeufin/api-nexus.rst index 5470707d..6cf52190 100644 --- a/libeufin/api-nexus.rst +++ b/libeufin/api-nexus.rst @@ -110,7 +110,9 @@ Test API This call allows tests to **directly** give Nexus a Camt document. After the processing, all the payment(s) details should be ingested as if the - Camt came normally from a bank / the Sandbox. + Camt came normally from a bank / the Sandbox. ``acctid`` must match the + label of a locally imported bank account, and ``type`` for now can only be + ``C53``. **Response** -- cgit v1.2.3 From e4d9639bcb53cdf7968bd5eb87bd94f33bb73ccd Mon Sep 17 00:00:00 2001 From: MS Date: Thu, 3 Dec 2020 14:56:21 +0100 Subject: match implementation --- libeufin/api-nexus.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libeufin/api-nexus.rst') diff --git a/libeufin/api-nexus.rst b/libeufin/api-nexus.rst index 6cf52190..b7186f16 100644 --- a/libeufin/api-nexus.rst +++ b/libeufin/api-nexus.rst @@ -297,7 +297,8 @@ manages payment initiations of the account and tracks the initiations of payment Optional, defaults to "earliest possible" date. - **Response:** A list of `Transaction` objects. + **Response:** A object with a unique field named ``transactions`` + that contains a list of `Transaction` objects. .. ts:def:: Transaction -- cgit v1.2.3 From f1d0199a830e6b354c5d49b4dd8b0e1bea0c828e Mon Sep 17 00:00:00 2001 From: MS Date: Thu, 3 Dec 2020 15:47:54 +0100 Subject: Align specs to code. --- libeufin/api-nexus.rst | 72 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 56 insertions(+), 16 deletions(-) (limited to 'libeufin/api-nexus.rst') diff --git a/libeufin/api-nexus.rst b/libeufin/api-nexus.rst index b7186f16..67ac3c3e 100644 --- a/libeufin/api-nexus.rst +++ b/libeufin/api-nexus.rst @@ -303,28 +303,68 @@ manages payment initiations of the account and tracks the initiations of payment .. ts:def:: Transaction interface Transaction { - // local bank account involved in the transaction. - account: string; - // counterpart IBAN - counterpartIban: string; + // money moved by the transaction + amount: string; - // counterpart BIC - counterpartBic: string; + // CRDT or DBIT + creditDebitIndicator: string - // counterpart holder name - counterpartName: string; + // Two of the most used values are BOOK, or PENDING + status: string; - // amount, in the format [-]CURRENCY:XX.YY, - // where the minus sign as prefix indicates - // a debit for the user's bank account. - amount: string; + // FIXME + bankTransactionCode: string; - // Dashed date YYYY-MM(01-12)-DD(01-31) of the transaction. - date: string; + // FIXME + valueDate: string; + + // When this payment got booked. In the form YYYY-MM-DD + bookingDate: string; - // Payment subject. - subject: string; + // FIXME + accountServicerRef: string; + + // FIXME + batches: { + // list of batched transactions + batchTransactions: [BatchedTransaction] + }; + } + + .. ts:def:: BatchedTransaction + interface BatchedTransaction { + // FIXME + amount: string; + // FIXME + creditDebitIndicator: string; + // FIXME + details { + debtor: { + name: string; + }; + debtorAccount: { + iban: string; + }; + // Missing, when the payment is DBIT. + debtorAgent: { + bic: string; + }; + creditor: { + name: string; + }; + creditorAccount: { + iban: string; + }; + // Missing, when the payment is CRDT. + creditorAgent: { + iban: string; + }; + // FIXME + endToEndId: string; + // FIXME + unstructuredRemittanceInformation: string; + } } -- cgit v1.2.3 From 48611f18bd748d4fce4ac04b99413d6b25020e98 Mon Sep 17 00:00:00 2001 From: MS Date: Thu, 3 Dec 2020 16:00:00 +0100 Subject: fix rendering --- libeufin/api-nexus.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'libeufin/api-nexus.rst') diff --git a/libeufin/api-nexus.rst b/libeufin/api-nexus.rst index 67ac3c3e..33e88b21 100644 --- a/libeufin/api-nexus.rst +++ b/libeufin/api-nexus.rst @@ -333,6 +333,7 @@ manages payment initiations of the account and tracks the initiations of payment } .. ts:def:: BatchedTransaction + interface BatchedTransaction { // FIXME amount: string; -- cgit v1.2.3 From 85bf438809488f552d639fd04e13989a74a6cb95 Mon Sep 17 00:00:00 2001 From: MS Date: Thu, 3 Dec 2020 16:01:39 +0100 Subject: fix rendering --- libeufin/api-nexus.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libeufin/api-nexus.rst') diff --git a/libeufin/api-nexus.rst b/libeufin/api-nexus.rst index 33e88b21..f47101fd 100644 --- a/libeufin/api-nexus.rst +++ b/libeufin/api-nexus.rst @@ -328,7 +328,7 @@ manages payment initiations of the account and tracks the initiations of payment // FIXME batches: { // list of batched transactions - batchTransactions: [BatchedTransaction] + batchTransactions: BatchedTransaction[]; }; } -- cgit v1.2.3