Class 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 Detail

      • 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 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).
      • toString

        public String toString()
        String representation for debugging purpose.
        Overrides:
        toString in class Amount