Class DefaultB2BCurrencyConversionService

    • Constructor Detail

      • DefaultB2BCurrencyConversionService

        public DefaultB2BCurrencyConversionService()
    • Method Detail

      • convertAmount

        public java.lang.Double convertAmount​(java.lang.Double amount,
                                              CurrencyModel sourceCurrency,
                                              CurrencyModel targetCurrency)
        Description copied from interface: B2BCurrencyConversionService
        Used to convert amount from one currency to another
        Specified by:
        convertAmount in interface B2BCurrencyConversionService
        Parameters:
        amount - the dollar amount to convert
        sourceCurrency - the current currency type
        targetCurrency - the currency in which to convert to
        Returns:
        converted amount
      • formatCurrencyAmount

        public java.lang.String formatCurrencyAmount​(java.util.Locale locale,
                                                     CurrencyModel currency,
                                                     double amount)
        Description copied from interface: B2BCurrencyConversionService
        Formats the currency amount for the correct locale
        Specified by:
        formatCurrencyAmount in interface B2BCurrencyConversionService
        Parameters:
        locale - the local in which to format for
        currency - the currency type
        amount - the dollar amount
        Returns:
        the String representation of the currency correctly formatted