com.ibm.commerce.marketing.promotion.condition

Class PriceConverter

  • java.lang.Object
    • com.ibm.commerce.marketing.promotion.condition.PriceConverter


  • public class PriceConverter
    extends java.lang.Object
    This class is used to convert the amount from one currency to another.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Constructor Summary

      Constructors 
      Constructor and Description
      PriceConverter()
      Constructor for PriceConverter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.math.BigDecimal convertBtwnCurrrency(java.math.BigDecimal price, java.lang.String convertFrom, java.lang.String convertTo)
      This method converts the input from one currency to another.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PriceConverter

        public PriceConverter()
        Constructor for PriceConverter.
    • Method Detail

      • convertBtwnCurrrency

        public java.math.BigDecimal convertBtwnCurrrency(java.math.BigDecimal price,
                                                         java.lang.String convertFrom,
                                                         java.lang.String convertTo)
        This method converts the input from one currency to another. Possible values of the currency include 'CAD', 'USD', 'EUR', 'GBP' or 'AUD'.
        Parameters:
        price - The amount to convert.
        convertFrom - The currency of the amount to convert from.
        convertTo - The currency of the amount to convert to.
        Returns:
        BigDecimal The converted amount.