Package money.zumo.zumokit
Class Transaction
- java.lang.Object
-
- money.zumo.zumokit.Transaction
-
public final class Transaction extends java.lang.ObjectRecord 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 booleanequals(java.lang.Object obj)java.math.BigDecimalgetAmount()Amount in transaction currency or null if transaction is Ethereum contract deploy.TransactionCardPropertiesgetCardProperties()Card properties if it is a card transaction, null otherwise.java.lang.IntegergetConfirmedAt()Epoch timestamp when transaction was submitted or null if transaction was not confirmed yet.TransactionCryptoPropertiesgetCryptoProperties()Crypto properties if it is a crypto transaction, null otherwise.java.lang.StringgetCurrencyCode()Currency code.CustodyOrdergetCustodyOrder()Custody order properties if it is a transaction associated with a custody order, null otherwise.java.lang.StringgetDirection()Transaction direction relative toAccountDataSnapshot.ExchangegetExchange()Exchange properties if it is a transaction associated with an exchange, null otherwise.java.math.BigDecimalgetFee()Transaction fee in transaction currency or null, if not yet available.TransactionFiatPropertiesgetFiatProperties()Fiat properties if it is a fiat transaction, null otherwise.java.lang.StringgetId()Identifier.java.util.ArrayList<InternalTransaction>getInternalTransactions()Internal transactions, e.g.java.lang.StringgetMetadata()Transaction metadata if exists, null otherwise.java.lang.StringgetNetwork()Network type.java.lang.StringgetNonce()Transaction nonce or null.java.util.ArrayList<TransactionAmount>getRecipients()Transaction recipients.java.util.ArrayList<TransactionAmount>getSenders()Transaction senders.java.lang.StringgetStatus()Transaction status.java.lang.IntegergetSubmittedAt()Epoch timestamp when transaction was submitted or null for incoming transactions from outside of Zumo ecosystem.intgetTimestamp()Epoch timestamp, minimum non-null value between submitted at and confirmed at timestamps.java.lang.StringgetType()Transaction type.inthashCode()java.lang.StringtoString()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-