From 48d7b73e77f4567ce9dba6ee1f2024e9c001d4c8 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Mon, 1 Feb 2016 20:04:41 +0100 Subject: bank: specing errors --- api-bank.rst | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/api-bank.rst b/api-bank.rst index 0c1002fd..d59cfd54 100644 --- a/api-bank.rst +++ b/api-bank.rst @@ -23,21 +23,34 @@ namely mints. :status 200 OK: The request has been correctly handled, so the funds have been transferred to the recipient's account + +:status 400 Bad Request: The bank replies a `BankIncomingError`_ object **Details:** - .. _BankDepositRequest: - .. code-block:: tsref +.. _BankDepositRequest: +.. code-block:: tsref - interface BankDepositRequest { - - // JSON 'amount' object. The amount the caller wants to transfer - // to the recipient's count - amount: Amount; + interface BankDepositRequest { + + // JSON 'amount' object. The amount the caller wants to transfer + // to the recipient's count + amount: Amount; - // The id of this wire transfer - wid: base32; + // The id of this wire transfer + wid: base32; - // The recipient's account identificator - account: number; + // The recipient's account identificator + account: number; - } + } + +.. _BankIncomingError: +.. code-block:: tsref + + interface BankIncomingError { + + // The reason which made this request fail. Typically due to malfomation + // of the POST's body + reason: string + + } -- cgit v1.2.3