public Double readExchangeRate()

in serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/ExchangeRatesDB.java [75:85]


    public Double readExchangeRate(String currencyFrom, String currencyTo, String exchangeDate) {
        Double euroToCurrencyFrom = EURO_TO_OTHERS_EXCHANGE_RATES.get(currencyFrom);
        if (euroToCurrencyFrom == null) {
            return 1d;
        }
        Double euroToCurrencyTo = EURO_TO_OTHERS_EXCHANGE_RATES.get(currencyTo);
        if (euroToCurrencyTo == null) {
            return 1d;
        }
        return (1 / euroToCurrencyFrom) * euroToCurrencyTo;
    }