Class: ExchangerateHost::Endpoints::HistoricalRates

Inherits:
Base
  • Object
show all
Defined in:
lib/exchangerate_host/endpoints/historical_rates.rb

Constant Summary

Constants included from Validation

Validation::ACCEPTABLE_DATE_FORMAT, Validation::ALL_OPTIONS_WITH_VALIDATE_METHODS, Validation::VALID_FORMAT, Validation::VALID_SYMBOLS

Class Method Summary collapse

Methods inherited from Base

available_options, query_options, request

Methods included from Validation

#is_positive_integer?, #non_subset_values, #to_upcase_csv, #validate, #validate_date, #validate_option_values, #validate_options, #validate_required_options, #validate_subset, #validate_with_type

Class Method Details

.endpoint_pathObject



14
15
16
# File 'lib/exchangerate_host/endpoints/historical_rates.rb', line 14

def endpoint_path
  @query[:date]
end

.optional_optionsObject



6
7
8
# File 'lib/exchangerate_host/endpoints/historical_rates.rb', line 6

def optional_options
  [:base, :symbols, :places, :amount, :format]
end

.required_optionsObject



10
11
12
# File 'lib/exchangerate_host/endpoints/historical_rates.rb', line 10

def required_options
  [:date]
end