Interface CurrencyExchangeRatesService
-
public interface CurrencyExchangeRatesService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BigDecimalapplyRate(BigDecimal amount, ExchangeRateBO rate)BigDecimalapplyRate(Currency from, Currency to, BigDecimal value)From amount to debtor or from amount to creditorList<ExchangeRateBO>getExchangeRates(Currency debtor, Currency amount, Currency creditor)voidupdateRates()Updates Rates whenever is called out of scheduling
-
-
-
Method Detail
-
updateRates
void updateRates() throws IOExceptionUpdates Rates whenever is called out of scheduling- Throws:
IOException
-
getExchangeRates
List<ExchangeRateBO> getExchangeRates(Currency debtor, Currency amount, Currency creditor)
-
applyRate
BigDecimal applyRate(BigDecimal amount, ExchangeRateBO rate)
- Parameters:
amount- big decimal amountrate- rate to apply to amount- Returns:
- big decimal representation of value with rate applied
-
applyRate
BigDecimal applyRate(Currency from, Currency to, BigDecimal value)
From amount to debtor or from amount to creditor- Parameters:
from- amount currencyto- debtor/creditor currencyvalue- big decimal value to apply rate to- Returns:
- big decimal representation of value with rate applied
-
-