# frozen_string_literal: true module EodFacade class Eod < ::EodFacade::Base class << self def call(symbol, params = {}) response = make_request(url_path(symbol), params.merge(fmt: 'json')) unless response.success? raise ArgumentError, "Error fetching end of day data for #{symbol}" end response.parsed_response end private def url_path(symbol) "/eod/#{symbol}" end end end end