@Service public class CurrencyExchangeRatesServiceImpl extends Object implements CurrencyExchangeRatesService
| Constructor and Description |
|---|
CurrencyExchangeRatesServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
BigDecimal |
applyRate(BigDecimal amount,
ExchangeRateBO rate) |
BigDecimal |
applyRate(Currency curFrom,
Currency curTo,
BigDecimal value) |
List<ExchangeRateBO> |
getExchangeRates(Currency debtor,
Currency amount,
Currency creditor) |
void |
updateRates() |
@Scheduled(cron="0 0 8 * * MON-FRI")
public void updateRates()
throws IOException
updateRates in interface CurrencyExchangeRatesServiceIOExceptionpublic List<ExchangeRateBO> getExchangeRates(Currency debtor, Currency amount, Currency creditor)
getExchangeRates in interface CurrencyExchangeRatesServicepublic BigDecimal applyRate(BigDecimal amount, ExchangeRateBO rate)
applyRate in interface CurrencyExchangeRatesServicepublic BigDecimal applyRate(Currency curFrom, Currency curTo, BigDecimal value)
applyRate in interface CurrencyExchangeRatesServiceCopyright © 2020. All rights reserved.