use of org.folio.rest.acq.model.finance.ExchangeRate in project mod-invoice by folio-org.
the class MockServer method handleGetRateOfExchange.
private void handleGetRateOfExchange(RoutingContext ctx) {
logger.info("handleGetRateOfExchange: " + ctx.request().path());
String fromParam = StringUtils.trimToEmpty(ctx.request().getParam("from"));
String toParam = StringUtils.trimToEmpty(ctx.request().getParam("to"));
ExchangeRate exchangeRate = new ExchangeRate().withExchangeRate(1.0d).withFrom(fromParam).withTo(toParam);
addServerRqRsData(HttpMethod.GET, FINANCE_EXCHANGE_RATE, new JsonObject().mapFrom(exchangeRate));
serverResponse(ctx, 200, APPLICATION_JSON, JsonObject.mapFrom(exchangeRate).encodePrettily());
}
use of org.folio.rest.acq.model.finance.ExchangeRate in project mod-orders by folio-org.
the class MockServer method handleGetRateOfExchange.
private void handleGetRateOfExchange(RoutingContext ctx) {
logger.info("handleGetRateOfExchange: " + ctx.request().path());
String fromParam = StringUtils.trimToEmpty(ctx.request().getParam("from"));
String toParam = StringUtils.trimToEmpty(ctx.request().getParam("to"));
ExchangeRate exchangeRate = new ExchangeRate().withExchangeRate(1.0d).withFrom(fromParam).withTo(toParam);
addServerRqRsData(HttpMethod.GET, FINANCE_EXCHANGE_RATE, JsonObject.mapFrom(exchangeRate));
serverResponse(ctx, 200, APPLICATION_JSON, JsonObject.mapFrom(exchangeRate).encodePrettily());
}
Aggregations