gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: CLI.


From: gnunet
Subject: [libeufin] branch master updated: CLI.
Date: Wed, 18 Mar 2020 17:43:57 +0100

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

marcello pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 04ca190  CLI.
04ca190 is described below

commit 04ca190f445629ae1c6fa4c6a7df3824196e6edd
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Mar 18 17:43:08 2020 +0100

    CLI.
    
    Give the option to specify a date range when requesting CRZ.
---
 cli/python/libeufin-cli | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/cli/python/libeufin-cli b/cli/python/libeufin-cli
index 618ff7c..2517599 100755
--- a/cli/python/libeufin-cli
+++ b/cli/python/libeufin-cli
@@ -558,14 +558,24 @@ def prepare(ctx, account_id, nexus_base_url):
     help="Numerical ID of the customer at the Nexus",
     required=True
 )
+@click.option(
+    "--date-range",
+    help="Date range for the query",
+    nargs=2,
+    required=False,
+)
 @click.argument(
   "nexus-base-url"
 )
-def download_payment_status(ctx, account_id, nexus_base_url):
+def fetch_payment_status(ctx, account_id, date_range, nexus_base_url):
+    if date_range is not None and len(date_range) == 2:
+        req = dict(dateRange=dict(start=date_range[0], end=date_range[1]))
+    else:
+        req = dict()
     try:
         url = urljoin(
             nexus_base_url, 
"/ebics/subscribers/{}/fetch-payment-status".format(account_id))
-        resp = post(url)
+        resp = post(url, json=req)
     except Exception as e:
         print("Could not reach the Nexus", e)
         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]