summaryrefslogtreecommitdiff
path: root/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-08-24 17:29:21 -0300
committerTorsten Grote <t@grobox.de>2020-08-24 17:29:21 -0300
commit0e28f811d20457925615e9dfe4a5471fb7689b05 (patch)
tree2b5a2cfd93de963ed258bc09b7bd534279ff8fc7 /wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt
parent39dcd04750eef1581d0bdde394371ef9ca2808b9 (diff)
downloadtaler-android-0e28f811d20457925615e9dfe4a5471fb7689b05.tar.gz
taler-android-0e28f811d20457925615e9dfe4a5471fb7689b05.tar.bz2
taler-android-0e28f811d20457925615e9dfe4a5471fb7689b05.zip
[wallet] upgrade to latest wallet-core version
Diffstat (limited to 'wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt')
-rw-r--r--wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt16
1 files changed, 15 insertions, 1 deletions
diff --git a/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt b/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt
index 8c00540..3210093 100644
--- a/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt
+++ b/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt
@@ -86,6 +86,7 @@ class TransactionWithdrawal(
) : Transaction() {
override val icon = R.drawable.transaction_withdrawal
override val detailPageLayout = R.layout.fragment_transaction_withdrawal
+
@Transient
override val amountType = AmountType.Positive
override fun getTitle(context: Context) = cleanExchange(exchangeBaseUrl)
@@ -142,6 +143,7 @@ class TransactionPayment(
) : Transaction() {
override val icon = R.drawable.ic_cash_usd_outline
override val detailPageLayout = R.layout.fragment_transaction_payment
+
@Transient
override val amountType = AmountType.Negative
override fun getTitle(context: Context) = info.merchant.name
@@ -156,7 +158,16 @@ class TransactionInfo(
@SerialName("summary_i18n")
val summaryI18n: Map<String, String>? = null,
val products: List<ContractProduct>,
- val fulfillmentUrl: String
+ val fulfillmentUrl: String? = null,
+ /**
+ * Message shown to the user after the payment is complete.
+ * TODO actually show this
+ */
+ val fulfillmentMessage: String? = null,
+ /**
+ * Map from IETF BCP 47 language tags to localized fulfillment messages
+ */
+ val fulfillmentMessage_i18n: Map<String, String>? = null,
)
@Serializable
@@ -194,6 +205,7 @@ class TransactionRefund(
) : Transaction() {
override val icon = R.drawable.transaction_refund
override val detailPageLayout = R.layout.fragment_transaction_payment
+
@Transient
override val amountType = AmountType.Positive
override fun getTitle(context: Context): String {
@@ -218,6 +230,7 @@ class TransactionTip(
) : Transaction() {
override val icon = R.drawable.transaction_tip_accepted // TODO different when declined
override val detailPageLayout = R.layout.fragment_transaction_payment
+
@Transient
override val amountType = AmountType.Positive
override fun getTitle(context: Context): String {
@@ -240,6 +253,7 @@ class TransactionRefresh(
) : Transaction() {
override val icon = R.drawable.transaction_refresh
override val detailPageLayout = R.layout.fragment_transaction_withdrawal
+
@Transient
override val amountType = AmountType.Negative
override fun getTitle(context: Context): String {