Package money.zumo.zumokit
Class Exchange
- java.lang.Object
-
- money.zumo.zumokit.Exchange
-
public final class Exchange extends java.lang.Object
Record containing exchange details.
-
-
Constructor Summary
Constructors Constructor Description Exchange(java.lang.String id, java.lang.String status, java.lang.String pair, java.lang.String side, java.math.BigDecimal price, java.math.BigDecimal amount, java.lang.String debitAccountId, java.lang.String debitTransactionId, java.lang.String creditAccountId, java.lang.String creditTransactionId, Quote quote, java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.math.BigDecimal>> rates, java.lang.String nonce, java.lang.String createdAt, java.lang.String updatedAt)
-
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 base currency.java.lang.String
getCreatedAt()
Timestamp when exchange was created, e.g.java.lang.String
getCreditAccountId()
CreditAccount
identifier.java.lang.String
getCreditTransactionId()
CreditTransaction
identifier.java.lang.String
getDebitAccountId()
DebitAccount
identifier.java.lang.String
getDebitTransactionId()
DebitTransaction
identifier.java.lang.String
getId()
Identifierjava.lang.String
getNonce()
Exchange nonce or null.java.lang.String
getPair()
Exchange pair, e.g.java.math.BigDecimal
getPrice()
Exchange quote price.Quote
getQuote()
Exchange rate quote used.java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.math.BigDecimal>>
getRates()
Exchange rates at the time exchange was made.java.lang.String
getSide()
Exchange side, "BUY" or "SELL".java.lang.String
getStatus()
Exchange status.java.lang.String
getUpdatedAt()
Timestamp when exchange was updated, e.g.int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
Exchange
public Exchange(java.lang.String id, java.lang.String status, java.lang.String pair, java.lang.String side, java.math.BigDecimal price, java.math.BigDecimal amount, java.lang.String debitAccountId, java.lang.String debitTransactionId, java.lang.String creditAccountId, java.lang.String creditTransactionId, Quote quote, java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.math.BigDecimal>> rates, java.lang.String nonce, java.lang.String createdAt, java.lang.String updatedAt)
-
-
Method Detail
-
getId
public java.lang.String getId()
Identifier
-
getStatus
public java.lang.String getStatus()
Exchange status.- See Also:
ExchangeStatus
-
getPair
public java.lang.String getPair()
Exchange pair, e.g. "ETH-GBP".
-
getSide
public java.lang.String getSide()
Exchange side, "BUY" or "SELL".- See Also:
ExchangeSide
-
getPrice
public java.math.BigDecimal getPrice()
Exchange quote price.
-
getAmount
public java.math.BigDecimal getAmount()
Amount in base currency.
-
getDebitAccountId
public java.lang.String getDebitAccountId()
DebitAccount
identifier.
-
getDebitTransactionId
public java.lang.String getDebitTransactionId()
DebitTransaction
identifier.
-
getCreditAccountId
public java.lang.String getCreditAccountId()
CreditAccount
identifier.
-
getCreditTransactionId
public java.lang.String getCreditTransactionId()
CreditTransaction
identifier.
-
getQuote
public Quote getQuote()
Exchange rate quote used.
-
getRates
public java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.math.BigDecimal>> getRates()
Exchange rates at the time exchange was made. This can be used to display amounts in local currency to the user.
-
getNonce
public java.lang.String getNonce()
Exchange nonce or null. Used to prevent double spend.
-
getCreatedAt
public java.lang.String getCreatedAt()
Timestamp when exchange was created, e.g. "2020-07-29T09:46:34.288Z".
-
getUpdatedAt
public java.lang.String getUpdatedAt()
Timestamp when exchange was updated, e.g. "2020-07-29T09:46:34.288Z".
-
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
-
-