libeufin

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

commit 87786e0edf022edae2e70b23a7540a86ff992bae
parent d46034385b9cf87b1e7690327b6619aba724bfe8
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Wed,  4 Mar 2020 17:06:53 +0100

Add PAIN.002 download trigger to the CLI.

Diffstat:
Mcli/python/libeufin-cli | 20++++++++++++++++++++
1 file changed, 20 insertions(+), 0 deletions(-)

diff --git a/cli/python/libeufin-cli b/cli/python/libeufin-cli @@ -571,6 +571,26 @@ def prepare(ctx, account_id, nexus_base_url): ctx.invoke(sync, account_id=account_id, nexus_base_url=nexus_base_url) +@ebics.command(help="Download PAIN.002 related to a particular customer") +@click.pass_context +@click.option( + "--account-id", + help="Numerical ID of the customer at the Nexus", + required=True +) +@click.argument( + "nexus-base-url" +) +def download_payment_status(ctx, account_id, nexus_base_url): + try: + url = urljoin( + nexus_base_url, "/ebics/subscribers/{}/fetch-payment-status".format(account_id)) + resp = post(url) + except Exception as e: + print("Could not reach the Nexus", e) + return + print(resp.content.decode("utf-8")) + @ebics.command(help="Picks the first unsubmitted payment and send it to the bank") @click.pass_context @click.argument(