Package money.zumo.zumokit
Class Quote
- java.lang.Object
-
- money.zumo.zumokit.Quote
-
public final class Quote extends java.lang.ObjectRecord containing Zumo exchange rate quote used in making exchanges.
-
-
Constructor Summary
Constructors Constructor Description Quote(java.lang.String id, int ttl, java.lang.String createdAt, java.lang.String expiresAt, java.lang.String debitCurrency, java.lang.String creditCurrency, java.math.BigDecimal price, java.math.BigDecimal feeRate, java.math.BigDecimal debitAmount, java.math.BigDecimal feeAmount, java.math.BigDecimal creditAmount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetCreatedAt()Timestamp when quote was created, e.g.java.math.BigDecimalgetCreditAmount()Amount to be credited to credit account.java.lang.StringgetCreditCurrency()Credit currency.java.math.BigDecimalgetDebitAmount()Amount to be debited from debit account.java.lang.StringgetDebitCurrency()Debit currency.java.lang.StringgetExpiresAt()Timestamp representing expiration time of this quote, e.g.java.math.BigDecimalgetFeeAmount()Amount that will be paid in fees.java.math.BigDecimalgetFeeRate()Fee rate in points of a percentage, e.g.java.lang.StringgetId()Identifier.java.math.BigDecimalgetPrice()Value of 1 unit of debit currency in credit currency.intgetTtl()Expiration in seconds at the time of quote creation, e.g.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
Quote
public Quote(java.lang.String id, int ttl, java.lang.String createdAt, java.lang.String expiresAt, java.lang.String debitCurrency, java.lang.String creditCurrency, java.math.BigDecimal price, java.math.BigDecimal feeRate, java.math.BigDecimal debitAmount, java.math.BigDecimal feeAmount, java.math.BigDecimal creditAmount)
-
-
Method Detail
-
getId
public java.lang.String getId()
Identifier.
-
getTtl
public int getTtl()
Expiration in seconds at the time of quote creation, e.g. 60.
-
getCreatedAt
public java.lang.String getCreatedAt()
Timestamp when quote was created, e.g. "2022-10-13T12:39:59.056Z".
-
getExpiresAt
public java.lang.String getExpiresAt()
Timestamp representing expiration time of this quote, e.g. "2022-10-13T12:40:58.871Z".
-
getDebitCurrency
public java.lang.String getDebitCurrency()
Debit currency.- See Also:
CurrencyCode
-
getCreditCurrency
public java.lang.String getCreditCurrency()
Credit currency.- See Also:
CurrencyCode
-
getPrice
public java.math.BigDecimal getPrice()
Value of 1 unit of debit currency in credit currency.
-
getFeeRate
public java.math.BigDecimal getFeeRate()
Fee rate in points of a percentage, e.g. "0.1" representing 0.1%
-
getDebitAmount
public java.math.BigDecimal getDebitAmount()
Amount to be debited from debit account.
-
getFeeAmount
public java.math.BigDecimal getFeeAmount()
Amount that will be paid in fees.
-
getCreditAmount
public java.math.BigDecimal getCreditAmount()
Amount to be credited to credit account.
-
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
-
-