class QuoteService {

	@HystrixCommand(fallbackMethod = "getQuoteFallback")
	public Quote getQuote(String symbol) throws SymbolNotFoundException {

		log.debug("QuoteService.getQuote: retrieving quote for: " + symbol);

		Map<String, String> params = new HashMap<String, String>();
		params.put("symbol", symbol);

		IexQuote quote = restTemplate.getForObject(quote_url, IexQuote.class, params);

		if (quote.getSymbol() == null) {
			throw new SymbolNotFoundException("Symbol not found: " + symbol);
		}

		log.debug("QuoteService.getQuote: retrieved quote: " + quote);


		return QuoteMapper.INSTANCE.mapFromIexQuote(quote);

	}

}