org.broadleafcommerce.common.money
Interface CurrencyConversionService


public interface CurrencyConversionService


Method Summary
 Money convertCurrency(Money source, Currency destinationCurrency, int destinationScale)
          Converts the given Money into the destination.
 

Method Detail

convertCurrency

Money convertCurrency(Money source,
                      Currency destinationCurrency,
                      int destinationScale)
Converts the given Money into the destination. The starting currency is determined by source.getCurrency()

Parameters:
source - - the Money to convert
destinationCurrency - - which Currency to convert to
destinationScale - - the scale that the result will be in. If zero, this defaults to the scale of source and if that is zero, defaults to BankersRounding.DEFAULT_SCALE
Returns:
a new Money in destinationCurrency. If the source and destination are the same currency, the original source is returned unchanged


Copyright © 2012. All Rights Reserved.