diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-10-15 10:43:26 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-10-15 10:43:26 +0200 |
commit | eebc030f6cf61d36b80e3273709fd9f254b155c3 (patch) | |
tree | f7e8c80b8aeabdc9067841da0b7be32a367a51f2 /src/include/taler_exchangedb_plugin.h | |
parent | 5f333f817c0fe4d66d1223833f8b8f7f22ad174c (diff) | |
download | exchange-eebc030f6cf61d36b80e3273709fd9f254b155c3.tar.xz |
add logic to return information about purse refunds in coin histories
Diffstat (limited to 'src/include/taler_exchangedb_plugin.h')
-rw-r--r-- | src/include/taler_exchangedb_plugin.h | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 0df32241c..a12c2ac3f 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -1789,6 +1789,31 @@ struct TALER_EXCHANGEDB_PurseDepositListEntry /** + * @brief Specification for a purse refund operation in a coin's transaction list. + */ +struct TALER_EXCHANGEDB_PurseRefundListEntry +{ + + /** + * Public key of the purse. + */ + struct TALER_PurseContractPublicKeyP purse_pub; + + /** + * Fraction of the original deposit's value to be refunded, including + * refund fee (if any). The coin is identified by @e coin_pub. + */ + struct TALER_Amount refund_amount; + + /** + * Refund fee to be covered by the customer. + */ + struct TALER_Amount refund_fee; + +}; + + +/** * Information about a /reserves/$RID/open operation in a coin transaction history. */ struct TALER_EXCHANGEDB_ReserveOpenListEntry @@ -1975,9 +2000,14 @@ enum TALER_EXCHANGEDB_TransactionType TALER_EXCHANGEDB_TT_PURSE_DEPOSIT = 6, /** + * Purse deposit operation. + */ + TALER_EXCHANGEDB_TT_PURSE_REFUND = 7, + + /** * Reserve open deposit operation. */ - TALER_EXCHANGEDB_TT_RESERVE_OPEN = 7 + TALER_EXCHANGEDB_TT_RESERVE_OPEN = 8 }; @@ -2054,6 +2084,12 @@ struct TALER_EXCHANGEDB_TransactionList struct TALER_EXCHANGEDB_PurseDepositListEntry *purse_deposit; /** + * Coin was refunded upon purse expiration + * (#TALER_EXCHANGEDB_TT_PURSE_REFUND) + */ + struct TALER_EXCHANGEDB_PurseRefundListEntry *purse_refund; + + /** * Coin was used to pay to open a reserve. * (#TALER_EXCHANGEDB_TT_RESERVE_OPEN) */ |