Package com.six.timapi
Class AmountDcc
- java.lang.Object
-
- com.six.timapi.Amount
-
- com.six.timapi.AmountDcc
-
public class AmountDcc extends Amount
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
Constructors Constructor Description 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.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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description LonggetMarkup()Markup applied to the DCC rate by the DCC provider as minor units integer value.doublegetMarkupDecimal()Markup applied to the DCC rate by the DCC provider as major units floating point value.LonggetMarkupExponent()Exponent of the markup.LonggetMarkupExponentRegulated()Exponent of the markup (regulated).LonggetMarkupRegulated()Markup (regulated) applied to the DCC rate by the DCC provider as minor units integer value.intgetRate()Deprecated.WARNING: This getter is deprecated! Use getRateAsLong instead! This will throw an IllegalArgumentException if rate value is bigger than an 32bit integer.LonggetRateAsLong()Exchange Rate in minor units as long integer value.doublegetRateDecimal()Exchange rate in major units as floating point value.intgetRateExponent()Exchange Rate Exponent.intgetRateExponentRegulated()Exchange Rate (regulated) Exponent.LonggetRateRegulated()Exchange Rate (regulated) in minor units as long integer value.StringtoString()String representation for debugging purpose.-
Methods inherited from class com.six.timapi.Amount
createSavedState, getAmount, getCurrency, getDecimalValue, getExponent, getIntAmount, setAmount, setCurrency, setDecimalValue, setExponent, setIntAmount
-
-
-
-
Method Detail
-
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
public Long 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
public Long getMarkup()
Markup applied to the DCC rate by the DCC provider as minor units integer value.
-
getMarkupExponent
public Long 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
public Long getRateRegulated()
Exchange Rate (regulated) in minor units as long integer value.
-
getRateExponentRegulated
public int getRateExponentRegulated()
Exchange Rate (regulated) Exponent.
-
getMarkupRegulated
public Long getMarkupRegulated()
Markup (regulated) applied to the DCC rate by the DCC provider as minor units integer value.
-
getMarkupExponentRegulated
public Long getMarkupExponentRegulated()
Exponent of the markup (regulated).
-
-