diff options
author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2022-02-02 04:05:34 -0500 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2022-02-02 04:05:34 -0500 |
commit | 9a8006da401086097955011d799cfa176ee4244a (patch) | |
tree | c567b38e1c5e9638aad306fa262e0bca63c4b089 /manpages | |
parent | 592ec49e52792bb4d9f22c5d5de5a0ebacfc1c44 (diff) | |
download | docs-9a8006da401086097955011d799cfa176ee4244a.tar.gz docs-9a8006da401086097955011d799cfa176ee4244a.tar.bz2 docs-9a8006da401086097955011d799cfa176ee4244a.zip |
document ‘libeufin-cli sandbox demobank’ commands
specifically:
- sandbox demobank register
- sandbox demobank info
- sandbox demobank new-ebicssubscriber
- sandbox demobank new-transaction
There are two FIXMEs in the new-transaction example.
Diffstat (limited to 'manpages')
-rw-r--r-- | manpages/libeufin-cli.1.rst | 124 |
1 files changed, 123 insertions, 1 deletions
diff --git a/manpages/libeufin-cli.1.rst b/manpages/libeufin-cli.1.rst index b8c995f0..ce929a3b 100644 --- a/manpages/libeufin-cli.1.rst +++ b/manpages/libeufin-cli.1.rst @@ -358,7 +358,129 @@ as well. sandbox demobank ---------------- -subcommands for the 'demobank' model and the Access API -- WRITEME +The ``demobank`` command provides an interface to the Access API, +which includes three commands: register, info, new-transaction. +There is also a fourth ``demobank`` command, new-ebicssubscriber, +that does not use the Access API. + +For all ``demobank`` commands, the sandbox URL *must* specify which +*one* bank the command applies to in the base URL. +Note that this URL cannot be used with other sandbox commands. +In other words: + +``--sandbox-url http://localhost:5016/demobanks/default`` + This base URL can be used for commands: + + - sandbox demobank register + - sandbox demobank info + - sandbox demobank new-ebicssubscriber + - sandbox demobank new-transaction + + It specifies the ``default`` demobank. + +``--sandbox-url http://localhost:5016`` + This base URL can be used for all other sandbox commands. + +In the following examples, the base URL will be explicitly shown with +the ``--sandbox-url`` option for the ``demobank`` commands. + +The ``demobank register`` command registers a new bank account. +Note that the username will be both the username to login at +the bank and the bank account label. +It takes the username and password from the +``LIBEUFIN_SANDBOX_USERNAME`` and ``LIBEUFIN_SANDBOX_PASSWORD`` +environment variables. +Th username *need not be* ``admin``. + +For example: + +.. code-block:: console + + $ export LIBEUFIN_SANDBOX_USERNAME=jrluser + $ export LIBEUFIN_SANDBOX_PASSWORD=easy + $ libeufin-cli sandbox \ + --sandbox-url http://localhost:5016/demobanks/default \ + demobank register + +The ``demobank info`` command returns basic information on a bank account. +It takes option ``--bank-account NAME``. + +For example: + +.. code-block:: console + + $ libeufin-cli sandbox \ + --sandbox-url http://localhost:5016/demobanks/default \ + demobank info --bank-account jrluser + { + "balance" : { + "amount" : "EUR:100", + "credit_debit_indicator" : "credit" + }, + "paytoUri" : "payto://iban/SANDBOXX/DE948559?receiver-name=admin" + } + +Note that ``jrluser`` is the same username / bank account name +as in the ``register`` example (see above). + +The ``demobank new-ebicssubscriber`` command associates a new Ebics +subscriber to an existing bank account. +It takes several options, all required: + +:: + + --host-id TEXT Ebics host ID + --partner-id TEXT Ebics partner ID + --user-id TEXT Ebics user ID + --bank-account TEXT Label of the bank account to associate + with this Ebics subscriber + +For example: + +.. code-block: console + + $ libeufin-cli sandbox \ + --sandbox-url http://localhost:5016/demobanks/default \ + demobank new-ebicssubscriber \ + --host-id testhost \ + --partner-id partner01 \ + --user-id user02 \ + --bank-account jrluser + +Note that ``testhost`` is the same as in the ``ebicshost create`` +example, and that ``partner01`` is the same as in the +``ebicssubscriber create`` example (see above). +The ``user02`` is new. +The ``--bank-account jrluser`` is the same as in the +``info`` example (see above). +You can see the effect of the ``new-ebicssubscriber`` command +with the ``bankaccount list`` command. + +The ``demobank new-transaction`` command initiates a new transaction. +It takes several options, all required: + +:: + + --bank-account TEXT Label of the bank account to be + debited for the transaction + --payto-with-subject TEXT Payto address including the + subject as a query parameter + --amount CUR:X.Y Amount to transfer + +For example: + +.. code-block:: console + + $ libeufin-cli sandbox \ + --sandbox-url http://localhost:5016/demobanks/default \ + demobank new-transaction \ + --bank-account jrluser \ + --payto-with-subject 'payto://FIXME/?subject=1kg+coffee' \ + --amount EUR:10.50 + FIXME: Any output? + +Note that ``--bank-account jrluser`` is the same as in the +``info`` and ``new-ebicssubscriber`` command examples (see above). users |