diff options
author | Antoine A <> | 2023-11-08 16:25:29 +0000 |
---|---|---|
committer | Antoine A <> | 2023-11-08 16:25:43 +0000 |
commit | 0354eaa48cf1882825396cef315dfb4ccf8e633d (patch) | |
tree | 098b1f154c302cf0baceee7d82280b4d2f1314de | |
parent | ea8138a4979f07a1e12aac176dbbf82734508936 (diff) | |
download | docs-0354eaa48cf1882825396cef315dfb4ccf8e633d.tar.gz docs-0354eaa48cf1882825396cef315dfb4ccf8e633d.tar.bz2 docs-0354eaa48cf1882825396cef315dfb4ccf8e633d.zip |
Update bank spec
-rw-r--r-- | core/api-corebank.rst | 102 |
1 files changed, 47 insertions, 55 deletions
diff --git a/core/api-corebank.rst b/core/api-corebank.rst index aff40f3c..365062f2 100644 --- a/core/api-corebank.rst +++ b/core/api-corebank.rst @@ -775,7 +775,7 @@ Cashouts interface CashoutPending { // ID identifying the operation being created // and now waiting for the TAN confirmation. - cashout_id: string; + cashout_id: number; } @@ -829,46 +829,6 @@ Cashouts :http:statuscode:`429 Too Many Request`: Too many failed confirmation attempts, a new TAN must be requested. -.. _circuit-cashouts: - -.. http:get:: /accounts/$USERNAME/cashouts - - Returns the list of all the (pending and confirmed) cash-out operations - for an account. - - **Request:** - - :query start: *Optional.* - Row identifier to explicitly set the *starting point* of the query. - :query delta: *Optional.* - The *delta* value that determines the range of the query. - - **Response:** - - :http:statuscode:`200 OK`: - Response is a `Cashouts`. - :http:statuscode:`204 No Content`: - No cash-out operations were found at the bank - :http:statuscode:`404 Not found`: - The account pointed by ``$USERNAME`` was not found. - :http:statuscode:`503 Service unavailable`: - This server does not support cashout, client should check config response. - - **Details:** - - .. ts:def:: Cashouts - - interface Cashouts { - // Every string represents a cash-out operation ID. - cashouts: CashoutInfo[]; - } - - .. ts:def:: CashoutInfo - - interface CashoutInfo { - cashout_id: string; - status: "pending" | "confirmed"; - } .. _circuit-cashout-details: @@ -883,7 +843,6 @@ Cashouts Response is a `CashoutStatusResponse`. :http:statuscode:`404 Not found`: The cashout operation was not found. - Aborted cashout operations will also not be found. :http:statuscode:`503 Service unavailable`: This server does not support cashout, client should check config response. @@ -892,7 +851,7 @@ Cashouts .. ts:def:: CashoutStatusResponse interface CashoutStatusResponse { - status: "pending" | "confirmed"; + status: "pending" | "aborted" | "confirmed"; // Amount debited to the internal // regional currency bank account. @@ -904,10 +863,6 @@ Cashouts // Transaction subject. subject: string; - // Fiat bank account that will receive the cashed out amount. - // Specified as a payto URI. - credit_payto_uri: string; - // Time when the cashout was created. creation_time: Timestamp; @@ -916,6 +871,45 @@ Cashouts confirmation_time?: Timestamp; } +.. _circuit-cashouts: + +.. http:get:: /accounts/$USERNAME/cashouts + + Returns the list of all the (pending and confirmed) cash-out operations + for an account. + + **Request:** + + :query delta: *Optional.* + Takes value of the form ``N (-N)``, so that at most ``N`` values strictly older (younger) than ``start`` are returned. Defaults to ``-20`` to return the last 20 entries. + :query start: *Optional.* + Row number threshold, see ``delta`` for its interpretation. Defaults to smallest or biggest row id possible according to ``delta`` sign. + + **Response:** + + :http:statuscode:`200 OK`: + Response is a `Cashouts`. + :http:statuscode:`204 No Content`: + No cash-out operations were found. + :http:statuscode:`503 Service unavailable`: + This server does not support cashout, client should check config response. + + **Details:** + + .. ts:def:: Cashouts + + interface Cashouts { + // Every string represents a cash-out operation ID. + cashouts: CashoutInfo[]; + } + + .. ts:def:: CashoutInfo + + interface CashoutInfo { + cashout_id: number; + status: "pending" | "aborted" | "confirmed"; + } + .. http:get:: /cashouts Returns the list of all the (pending and confirmed) cash-out operations @@ -925,23 +919,22 @@ Cashouts **Request:** - :query start: *Optional.* - Row identifier to explicitly set the *starting point* of the query. :query delta: *Optional.* - The *delta* value that determines the range of the query. + Takes value of the form ``N (-N)``, so that at most ``N`` values strictly older (younger) than ``start`` are returned. Defaults to ``-20`` to return the last 20 entries. + :query start: *Optional.* + Row number threshold, see ``delta`` for its interpretation. Defaults to smallest or biggest row id possible according to ``delta`` sign. .. note:: We might want to add a filter in the future to only query pending cashout operations. - **Response:** :http:statuscode:`200 OK`: Response is a `GlobalCashouts`. :http:statuscode:`204 No Content`: - No cash-out operations were found at the bank + No cash-out operations were found. :http:statuscode:`503 Service unavailable`: This server does not support cashout, client should check config response. @@ -956,9 +949,9 @@ Cashouts .. ts:def:: GlobalCashoutInfo interface GlobalCashoutInfo { - cashout_id: string; + cashout_id: number; username: string; - status: "pending" | "confirmed"; + status: "pending" | "aborted" | "confirmed"; } .. _cashout-rates: @@ -980,7 +973,6 @@ Cashouts :query amount_debit: this is the amount that the user will get deducted from their regional bank account. - :query amount_credit: this is the amount that the user will receive in their fiat bank account. |