class FixerIo::Response::LatestRates
Latest Rates response.
Attributes
base[R]
The three-letter currency code of the base currency used for this request. @return [Symbol]
rates[R]
Exchange rate data for the currencies you have requested. @return [Hash<Symbol, Numeric>]
timestamp[R]
The exact date and time the given rates were collected. @return [Time]
Public Class Methods
new(args)
click to toggle source
Create a new instance.
@param [Hash] args arguments used to create the object. @option args [Integer] :timestamp the exact date and time the given
rates were collected.
@option args [String] :base the three-letter currency code of the base
currency used for this request.
@option args [Hash] :rates exchange rate data for the currencies.
# File lib/fixer_io/response/latest_rates.rb, line 28 def initialize(args) @timestamp = Time.at args[:timestamp].to_i @base = args[:base].downcase.to_sym @rates = Response.symbolize_hash_keys args[:rates] end