libeufin

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

commit 2da505a32407d693492b1a08842c186721c604c7
parent 8426fc73752b00fe6bebc6fcac359346225370cd
Author: MS <ms@taler.net>
Date:   Mon, 16 Aug 2021 03:13:02 -1100

cli, make Anastasis facade

Diffstat:
Mcli/bin/libeufin-cli | 36+++++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/cli/bin/libeufin-cli b/cli/bin/libeufin-cli @@ -915,6 +915,40 @@ def list_facades(obj): @facades.command( + "new-anastasis-facade", help="create a new Anastasis facade" +) +@click.option("--facade-name", help="Name of the facade", required=True) +@click.option("--currency", help="Facade's currency", required=True) +@click.argument("connection-name") +@click.argument("account-name") +@click.pass_obj +def new_anastasis_facade(obj, facade_name, connection_name, account_name, currency): + url = urljoin(obj.nexus_base_url, "/facades") + try: + resp = post( + url, + auth=auth.HTTPBasicAuth(obj.username, obj.password), + json=dict( + name=facade_name, + type="anastasis", + config=dict( + currency=currency, + bankAccount=account_name, + bankConnection=connection_name, + reserveTransferLevel="UNUSED", + intervalIncremental="UNUSED", + ), + ), + ) + except Exception as e: + print(f"Could not reach nexus (at {obj.nexus_base_url}): {e}") + exit(1) + + tell_user(resp) + check_response_status(resp) + + +@facades.command( "new-taler-wire-gateway-facade", help="create a new Taler Wire Gateway facade" ) @click.option("--facade-name", help="Name of the facade", required=True) @@ -922,7 +956,7 @@ def list_facades(obj): @click.argument("connection-name") @click.argument("account-name") @click.pass_obj -def new_facade(obj, facade_name, connection_name, account_name, currency): +def new_twg_facade(obj, facade_name, connection_name, account_name, currency): url = urljoin(obj.nexus_base_url, "/facades") try: resp = post(