Package com.six.timapi
Class AmountDcc
java.lang.Object
com.six.timapi.Amount
com.six.timapi.AmountDcc
Contains the amount for transactions. The amount can be specified in minor units
as integer value or in major units as floating point value.
Immutable class.
-
Constructor Summary
ConstructorDescriptionAmountDcc
(long amount, Currency currency, int exponent, long rate, int rateExponent, Long markup, Long markupExponent, long rateRegulated, int rateExponentRegulated, Long markupRegulated, Long markupExponentRegulated) Create DCC amount.AmountDcc
(long amount, Currency currency, long rate, int rateExponent, Long markup, Long markupExponent, long rateRegulated, int rateExponentRegulated, Long markupRegulated, Long markupExponentRegulated) Create DCC amount. -
Method Summary
Modifier and TypeMethodDescriptionMarkup applied to the DCC rate by the DCC provider as minor units integer value.double
Markup applied to the DCC rate by the DCC provider as major units floating point value.Exponent of the markup.Exponent of the markup (regulated).Markup (regulated) applied to the DCC rate by the DCC provider as minor units integer value.int
getRate()
Deprecated.WARNING: This getter is deprecated! Use getRateAsLong instead! This will throw an IllegalArgumentException if rate value is bigger than an 32bit integer.Exchange Rate in minor units as long integer value.double
Exchange rate in major units as floating point value.int
Exchange Rate Exponent.int
Exchange Rate (regulated) Exponent.Exchange Rate (regulated) in minor units as long integer value.toString()
String representation for debugging purpose.Methods inherited from class com.six.timapi.Amount
createSavedState, getAmount, getCurrency, getDecimalValue, getExponent, getIntAmount, setAmount, setCurrency, setDecimalValue, setExponent, setIntAmount
-
Constructor Details
-
AmountDcc
public AmountDcc(long amount, Currency currency, long rate, int rateExponent, Long markup, Long markupExponent, long rateRegulated, int rateExponentRegulated, Long markupRegulated, Long markupExponentRegulated) Create DCC amount. -
AmountDcc
public AmountDcc(long amount, Currency currency, int exponent, long rate, int rateExponent, Long markup, Long markupExponent, long rateRegulated, int rateExponentRegulated, Long markupRegulated, Long markupExponentRegulated) Create DCC amount.
-
-
Method Details
-
getRate
public int getRate()Deprecated.WARNING: This getter is deprecated! Use getRateAsLong instead! This will throw an IllegalArgumentException if rate value is bigger than an 32bit integer.Exchange Rate in minor units as integer value. -
getRateAsLong
Exchange Rate in minor units as long integer value. -
getRateExponent
public int getRateExponent()Exchange Rate Exponent. -
getRateDecimal
public double getRateDecimal()Exchange rate in major units as floating point value. -
getMarkup
Markup applied to the DCC rate by the DCC provider as minor units integer value. -
getMarkupExponent
Exponent of the markup. -
getMarkupDecimal
public double getMarkupDecimal()Markup applied to the DCC rate by the DCC provider as major units floating point value.- Throws:
NullPointerException
- Markup or markup exponent is null.
-
getRateRegulated
Exchange Rate (regulated) in minor units as long integer value. -
getRateExponentRegulated
public int getRateExponentRegulated()Exchange Rate (regulated) Exponent. -
getMarkupRegulated
Markup (regulated) applied to the DCC rate by the DCC provider as minor units integer value. -
getMarkupExponentRegulated
Exponent of the markup (regulated). -
toString
String representation for debugging purpose.
-