diff options
author | Torsten Grote <t@grobox.de> | 2020-05-12 11:26:19 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2020-05-12 11:26:19 -0300 |
commit | 05cb8fc7935cb409d4776eb78f21452a86e66693 (patch) | |
tree | f6fd3dc2074cebd93b3cb08a16aaef94b2ea3e04 /taler-wallet.rst | |
parent | 47961a49d928223feb4ca79c4ed3baa442894c06 (diff) | |
download | docs-05cb8fc7935cb409d4776eb78f21452a86e66693.tar.gz docs-05cb8fc7935cb409d4776eb78f21452a86e66693.tar.bz2 docs-05cb8fc7935cb409d4776eb78f21452a86e66693.zip |
Small tweaks of transactions API
Diffstat (limited to 'taler-wallet.rst')
-rw-r--r-- | taler-wallet.rst | 52 |
1 files changed, 42 insertions, 10 deletions
diff --git a/taler-wallet.rst b/taler-wallet.rst index 11167ea9..beae2068 100644 --- a/taler-wallet.rst +++ b/taler-wallet.rst @@ -92,8 +92,8 @@ Transactions are all operations or events that are affecting the balance. .. ts:def:: TransactionsRequest interface TransactionsRequest { - // return only transactions in the given currency - currency: string; + // return only transactions in the given currency, if present + currency?: string; // if present, results will be limited to transactions related to the given search string search?: string; @@ -177,9 +177,8 @@ Transactions are all operations or events that are affecting the balance. // Additional information about the payment. info: TransactionInfo; - // true if the payment failed, false otherwise. - // Note that failed payments with zero effective amount will not be returned by the API. - failed: boolean; + // The current status of this payment. + status: PaymentStatus; // Amount that must be paid for the contract amountRaw: Amount; @@ -210,6 +209,26 @@ Transactions are all operations or events that are affecting the balance. fulfillmentUrl: string; } + .. ts:def:: PaymentStatus + + enum PaymentStatus { + // Explicitly aborted after timeout / failure + Aborted = "aborted", + + // Payment failed, wallet will auto-retry. + // User should be given the option to retry now / abort. + Failed = "failed", + + // Paid successfully + Paid = "paid", + + // Only offered, user must accept / decline + Offered = "offered", + + // User accepted, payment is processing. + Accepted = "accepted", + } + .. ts:def:: TransactionRefund interface TransactionRefund extends Transaction { @@ -236,11 +255,8 @@ Transactions are all operations or events that are affecting the balance. interface TransactionTip extends Transaction { type: string = "tip", - // true if the user still needs to accept/decline this tip - waiting: boolean; - - // true if the user has accepted this top, false otherwise - accepted: boolean; + // The current status of this tip. + status: TipStatus; // Exchange that the tip will be (or was) withdrawn from exchangeBaseUrl: string; @@ -255,6 +271,22 @@ Transactions are all operations or events that are affecting the balance. amountEffective: Amount; } + .. ts:def:: TipStatus + + enum TipStatus { + // Only offered, user must accept / decline + Offered = "offered", + + // User accepted, tip is processing. + Accepted = "accepted", + + // User declined. + Declined = "declined", + + // Received successfully + Received = "received", + } + .. ts:def:: TransactionRefresh // A transaction shown for refreshes that are not associated to other transactions |