From 0d921da53e2532bed1de11b5855a684e9ecf4754 Mon Sep 17 00:00:00 2001 From: MS Date: Thu, 1 Dec 2022 17:06:54 +0100 Subject: Sandbox API. Match endpoints with implementation. --- core/api-bank-access.rst | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'core/api-bank-access.rst') diff --git a/core/api-bank-access.rst b/core/api-bank-access.rst index a33cbdbb..82578391 100644 --- a/core/api-bank-access.rst +++ b/core/api-bank-access.rst @@ -81,7 +81,7 @@ name and account password, at least in the GNU Taler demo bank implementation. } -.. http:POST:: ${BANK_API_BASE_URL}/accounts/${account_name}/withdrawals +.. http:post:: ${BANK_API_BASE_URL}/accounts/${account_name}/withdrawals Create a withdrawal operation, resulting in a ``taler://withdraw`` URI. @@ -107,7 +107,7 @@ name and account password, at least in the GNU Taler demo bank implementation. } -.. http:GET:: ${BANK_API_BASE_URL}/accounts/${account_name}/withdrawals/${withdrawal_id} +.. http:get:: ${BANK_API_BASE_URL}/accounts/${account_name}/withdrawals/${withdrawal_id} Query the status of a withdrawal operation. @@ -143,7 +143,7 @@ name and account password, at least in the GNU Taler demo bank implementation. } -.. http:POST:: ${BANK_API_BASE_URL}/accounts/${account_name}/withdrawals/${withdrawal_id}/abort +.. http:post:: ${BANK_API_BASE_URL}/accounts/${account_name}/withdrawals/${withdrawal_id}/abort Abort a withdrawal operation. Has no effect on an already aborted withdrawal operation. @@ -151,7 +151,7 @@ name and account password, at least in the GNU Taler demo bank implementation. :http:statuscode:`409 Conflict`: The reserve operation has been confirmed previously and can't be aborted. -.. http:POST:: ${BANK_API_BASE_URL}/accounts/${account_name}/withdrawals/${withdrawal_id}/confirm +.. http:post:: ${BANK_API_BASE_URL}/accounts/${account_name}/withdrawals/${withdrawal_id}/confirm Confirm a withdrawal operation. Has no effect on an already confirmed withdrawal operation. This call is responsible of wiring the funds to the exchange. @@ -169,7 +169,7 @@ name and account password, at least in the GNU Taler demo bank implementation. Transactions ------------ -.. http:GET:: ${BANK_API_BASE_URL}/accounts/${account_name}/transactions +.. http:get:: ${BANK_API_BASE_URL}/accounts/${account_name}/transactions Retrieve a subset of transactions related to $account_name. Without query parameters, it returns the last 5 transactions. @@ -187,7 +187,7 @@ Transactions transactions: BankAccountTransactionInfo[]; } -.. http:GET:: ${BANK_API_BASE_URL}/accounts/${account_name}/transactions/${transaction_id} +.. http:get:: ${BANK_API_BASE_URL}/accounts/${account_name}/transactions/${transaction_id} **Response** @@ -218,7 +218,7 @@ Transactions } -.. http:POST:: ${BANK_API_BASE_URL}/accounts/${account_name}/transactions +.. http:post:: ${BANK_API_BASE_URL}/accounts/${account_name}/transactions Create a new transaction where the bank account with the label ``account_name`` is **debited**. @@ -247,11 +247,16 @@ Transactions :http:statuscode:`400 Bad Request`: the request was invalid or the payto://-URI used unacceptable features. +.. http:delete:: ${BANK_API_BASE_URL}/accounts/${account_name} + + Delete the bank account (and the customer entry) from the database. + Note, customer usernames and bank accounts have the same value. + ---------------------- Registration (Testing) ---------------------- -.. http:POST:: ${BANK_API_BASE_URL}/testing/register +.. http:post:: ${BANK_API_BASE_URL}/testing/register Create a new bank account. This endpoint should be disabled for most deployments, but is useful for automated testing / integration tests. -- cgit v1.2.3