commit 1d3c9aa738e8801750bc899efe968500aaaeb6ba
parent 674ff93b905972625d42b393b425427a31a51695
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date: Wed, 22 Jan 2020 20:37:34 +0100
make CLI send C52
Diffstat:
1 file changed, 20 insertions(+), 0 deletions(-)
diff --git a/sandbox/src/main/python/libeufin-cli b/sandbox/src/main/python/libeufin-cli
@@ -129,6 +129,26 @@ def tst(obj, customer_id):
print(resp.content.decode("utf-8"))
+
+@ebics.command(help="send C52 message")
+@click.pass_obj
+@click.option(
+ "--customer-id",
+ help="numerical ID of the customer at the Nexus",
+ required=False,
+ default=1)
+def c52(obj, customer_id):
+
+ url = urljoin(obj["base_url"], "/ebics/subscribers/{}/sendC52".format(customer_id))
+ try:
+ resp = post(url, json=dict(start="01-01-1970", end="31-12-2020"))
+ except Exception:
+ print("Could not reach the bank")
+ return
+
+ print(resp.content.decode("utf-8"))
+
+
@ebics.command(help="send INI message")
@click.pass_obj
@click.option(