From 7bc11a4b5d3e656824948045b072b02706529c33 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 17 Jan 2020 13:00:34 +0100 Subject: add-incoming docs --- core/api-wire.rst | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/core/api-wire.rst b/core/api-wire.rst index 9992be4c..fe6890a8 100644 --- a/core/api-wire.rst +++ b/core/api-wire.rst @@ -51,7 +51,7 @@ Making Transactions :status 200 OK: The request has been correctly handled, so the funds have been transferred to - the recipient's account. The body is a `TransactionResponse` + the recipient's account. The body is a `TransferResponse` :status 400 Bad Request: The bank replies with an `ErrorDetail` object. :status 409 Conflict: A transaction with the same ``transaction_uid`` but different transaction details @@ -59,9 +59,9 @@ Making Transactions **Details:** - .. ts:def:: TransactionResponse + .. ts:def:: TransferResponse - interface TransactionResponse { + interface TransferResponse { // Timestamp that indicates when the wire transfer will be executed. // In cases where the wire transfer gateway is unable to know when @@ -265,7 +265,15 @@ exposed by bank gateways in production. Simulate a transfer from a customer to the exchange. This API is *not* idempotent since it's only used in testing. - .. ts:def:: OutgoingBankTransaction + **Request:** The body of this request must have the format of a `AddIncomingRequest`. + + **Response:** + + :status 200 OK: + The request has been correctly handled, so the funds have been transferred to + the recipient's account. The body is a `AddIncomingResponse` + + .. ts:def:: AddIncomingRequest interface AddIncomingRequest { // Amount to transfer. @@ -281,3 +289,21 @@ exposed by bank gateways in production. // specified, as it is automatically created. debit_account: string; } + + + .. ts:def:: AddIncomingResponse + + interface AddIncomingResponse { + + // Timestamp that indicates when the wire transfer will be executed. + // In cases where the wire transfer gateway is unable to know when + // the wire transfer will be executed, the time at which the request + // has been received and stored will be returned. + // The purpose of this field is for debugging (humans trying to find + // the transaction) as well as for taxation (determining which + // time period a transaction belongs to). + timestamp: Timestamp; + + // Opaque of the transaction that the bank has made. + row_id: SafeUint64; + } -- cgit v1.2.3