commit 611f2a37a9940d2241dea36b23b2a23ebed5324a
parent 393bbe05e44a99773befd49758d0377722d153ed
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date: Mon, 25 Nov 2019 16:39:02 +0100
provide TST command to the Python CLI.
Diffstat:
1 file changed, 20 insertions(+), 0 deletions(-)
diff --git a/sandbox/src/main/python/libeufin-cli b/sandbox/src/main/python/libeufin-cli
@@ -101,6 +101,26 @@ def backup(obj, customer_id, output_file):
print("Backup stored in {}".format(output_file))
+
+@ebics.command(help="send TST message")
+@click.pass_obj
+@click.option(
+ "--customer-id",
+ help="numerical ID of the customer at the Nexus",
+ required=False,
+ default=1)
+def tst(obj, customer_id):
+
+ url = urljoin(obj["base_url"], "/ebics/subscribers/{}/sendTst".format(customer_id))
+ try:
+ resp = post(url)
+ 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(