Package money.zumo.zumokit
Class Transaction
- java.lang.Object
-
- money.zumo.zumokit.Transaction
-
public final class Transaction extends java.lang.Object
Record containing transaction details.
-
-
Constructor Summary
Constructors Constructor Description Transaction(java.lang.String id, java.lang.String type, java.lang.String currencyCode, java.lang.String direction, java.lang.String network, java.lang.String status, java.math.BigDecimal amount, java.math.BigDecimal fee, java.lang.String nonce, java.util.ArrayList<TransactionAmount> senders, java.util.ArrayList<TransactionAmount> recipients, java.util.ArrayList<InternalTransaction> internalTransactions, CustodyOrder custodyOrder, TransactionCryptoProperties cryptoProperties, TransactionFiatProperties fiatProperties, TransactionCardProperties cardProperties, Exchange exchange, java.lang.String metadata, java.lang.Integer submittedAt, java.lang.Integer confirmedAt, int timestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.math.BigDecimal
getAmount()
Amount in transaction currency or null if transaction is Ethereum contract deploy.TransactionCardProperties
getCardProperties()
Card properties if it is a card transaction, null otherwise.java.lang.Integer
getConfirmedAt()
Epoch timestamp when transaction was submitted or null if transaction was not confirmed yet.TransactionCryptoProperties
getCryptoProperties()
Crypto properties if it is a crypto transaction, null otherwise.java.lang.String
getCurrencyCode()
Currency code.CustodyOrder
getCustodyOrder()
Custody order properties if it is a transaction associated with a custody order, null otherwise.java.lang.String
getDirection()
Transaction direction relative toAccountDataSnapshot
.Exchange
getExchange()
Exchange properties if it is a transaction associated with an exchange, null otherwise.java.math.BigDecimal
getFee()
Transaction fee in transaction currency or null, if not yet available.TransactionFiatProperties
getFiatProperties()
Fiat properties if it is a fiat transaction, null otherwise.java.lang.String
getId()
Identifier.java.util.ArrayList<InternalTransaction>
getInternalTransactions()
Internal transactions, e.g.java.lang.String
getMetadata()
Transaction metadata if exists, null otherwise.java.lang.String
getNetwork()
Network type.java.lang.String
getNonce()
Transaction nonce or null.java.util.ArrayList<TransactionAmount>
getRecipients()
Transaction recipients.java.util.ArrayList<TransactionAmount>
getSenders()
Transaction senders.java.lang.String
getStatus()
Transaction status.java.lang.Integer
getSubmittedAt()
Epoch timestamp when transaction was submitted or null for incoming transactions from outside of Zumo ecosystem.int
getTimestamp()
Epoch timestamp, minimum non-null value between submitted at and confirmed at timestamps.java.lang.String
getType()
Transaction type.int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
Transaction
public Transaction(java.lang.String id, java.lang.String type, java.lang.String currencyCode, java.lang.String direction, java.lang.String network, java.lang.String status, java.math.BigDecimal amount, java.math.BigDecimal fee, java.lang.String nonce, java.util.ArrayList<TransactionAmount> senders, java.util.ArrayList<TransactionAmount> recipients, java.util.ArrayList<InternalTransaction> internalTransactions, CustodyOrder custodyOrder, TransactionCryptoProperties cryptoProperties, TransactionFiatProperties fiatProperties, TransactionCardProperties cardProperties, Exchange exchange, java.lang.String metadata, java.lang.Integer submittedAt, java.lang.Integer confirmedAt, int timestamp)
-
-
Method Detail
-
getId
public java.lang.String getId()
Identifier.
-
getType
public java.lang.String getType()
Transaction type.- See Also:
TransactionType
-
getCurrencyCode
public java.lang.String getCurrencyCode()
Currency code.- See Also:
CurrencyCode
-
getDirection
public java.lang.String getDirection()
Transaction direction relative toAccountDataSnapshot
.- See Also:
TransactionDirection
-
getNetwork
public java.lang.String getNetwork()
Network type.- See Also:
NetworkType
-
getStatus
public java.lang.String getStatus()
Transaction status.- See Also:
TransactionStatus
-
getAmount
public java.math.BigDecimal getAmount()
Amount in transaction currency or null if transaction is Ethereum contract deploy. Amount is calculated as transaction amount sent - transaction amounts received - change.
-
getFee
public java.math.BigDecimal getFee()
Transaction fee in transaction currency or null, if not yet available.
-
getNonce
public java.lang.String getNonce()
Transaction nonce or null. Used to prevent double spend.
-
getSenders
public java.util.ArrayList<TransactionAmount> getSenders()
Transaction senders.
-
getRecipients
public java.util.ArrayList<TransactionAmount> getRecipients()
Transaction recipients.
-
getInternalTransactions
public java.util.ArrayList<InternalTransaction> getInternalTransactions()
Internal transactions, e.g. ETH contract interaction side effects.
-
getCustodyOrder
public CustodyOrder getCustodyOrder()
Custody order properties if it is a transaction associated with a custody order, null otherwise.
-
getCryptoProperties
public TransactionCryptoProperties getCryptoProperties()
Crypto properties if it is a crypto transaction, null otherwise.- See Also:
TransactionType
-
getFiatProperties
public TransactionFiatProperties getFiatProperties()
Fiat properties if it is a fiat transaction, null otherwise.- See Also:
TransactionType
-
getCardProperties
public TransactionCardProperties getCardProperties()
Card properties if it is a card transaction, null otherwise.- See Also:
TransactionType
-
getExchange
public Exchange getExchange()
Exchange properties if it is a transaction associated with an exchange, null otherwise.
-
getMetadata
public java.lang.String getMetadata()
Transaction metadata if exists, null otherwise.
-
getSubmittedAt
public java.lang.Integer getSubmittedAt()
Epoch timestamp when transaction was submitted or null for incoming transactions from outside of Zumo ecosystem.
-
getConfirmedAt
public java.lang.Integer getConfirmedAt()
Epoch timestamp when transaction was submitted or null if transaction was not confirmed yet.
-
getTimestamp
public int getTimestamp()
Epoch timestamp, minimum non-null value between submitted at and confirmed at timestamps.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-