Interface B2BCurrencyConversionService

All Known Implementing Classes:
DefaultB2BCurrencyConversionService

public interface B2BCurrencyConversionService
A service around CurrencyModel
Spring Bean ID:
b2bCurrencyConversionService
  • Method Details

    • convertAmount

      Double convertAmount(Double amount, CurrencyModel sourceCurrency, CurrencyModel targetCurrency)
      Used to convert amount from one currency to another
      Parameters:
      amount - the dollar amount to convert
      sourceCurrency - the current currency type
      targetCurrency - the currency in which to convert to
      Returns:
      converted amount
    • formatCurrencyAmount

      String formatCurrencyAmount(Locale locale, CurrencyModel currency, double amount)
      Formats the currency amount for the correct locale
      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