Class AmountDiscount


  • public class AmountDiscount
    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.
    • Constructor Detail

      • AmountDiscount

        public AmountDiscount​(int amount,
                              Currency currency,
                              String discountId)
        Create amount using minor units.
      • AmountDiscount

        public AmountDiscount​(int amount,
                              Currency currency,
                              int exponent,
                              String discountId)
        Create amount using minor units.
      • AmountDiscount

        public AmountDiscount​(long amount,
                              Currency currency,
                              String discountId)
        Create amount using minor units.
      • AmountDiscount

        public AmountDiscount​(long amount,
                              Currency currency,
                              int exponent,
                              String discountId)
        Create amount using minor units.
      • AmountDiscount

        public AmountDiscount​(double amount,
                              Currency currency,
                              String discountId)
        Create amount using major units.
      • AmountDiscount

        public AmountDiscount​(double amount,
                              Currency currency,
                              int exponent,
                              String discountId)
        Create amount using major units.
    • Method Detail

      • getDiscountId

        public String getDiscountId()
        Discount type.
      • setDiscountId

        public void setDiscountId​(String discountId)
        Set discount type.
      • toString

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