Package io.moov.sdk.models.components
Class Amount
- java.lang.Object
-
- io.moov.sdk.models.components.Amount
-
public class Amount extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAmount.Builder
-
Constructor Summary
Constructors Constructor Description Amount(java.lang.String currency, long value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Amount.Builderbuilder()java.lang.Stringcurrency()A 3-letter ISO 4217 currency code.booleanequals(java.lang.Object o)inthashCode()java.lang.StringtoString()longvalue()Quantity in the smallest unit of the specified currency.AmountwithCurrency(java.lang.String currency)A 3-letter ISO 4217 currency code.AmountwithValue(long value)Quantity in the smallest unit of the specified currency.
-
-
-
Method Detail
-
currency
public java.lang.String currency()
A 3-letter ISO 4217 currency code.
-
value
public long value()
Quantity in the smallest unit of the specified currency.In USD this is cents, for example, $12.04 is 1204 and $0.99 is 99.
-
builder
public static final Amount.Builder builder()
-
withCurrency
public Amount withCurrency(java.lang.String currency)
A 3-letter ISO 4217 currency code.
-
withValue
public Amount withValue(long value)
Quantity in the smallest unit of the specified currency.In USD this is cents, for example, $12.04 is 1204 and $0.99 is 99.
-
equals
public boolean equals(java.lang.Object o)
- 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
-
-