Class: FXRates::Response::Timeseries

Inherits:
Object
  • Object
show all
Defined in:
lib/fx_rates/response/timeseries.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Timeseries

Returns a new instance of Timeseries.



5
6
7
8
9
10
11
12
# File 'lib/fx_rates/response/timeseries.rb', line 5

def initialize(response)
  @success = response["success"]
  @rates = response["rates"]
  @start_date = response["start_date"]
  @end_date = response["end_date"]
  @base = response["base"]
  @raw_response = response
end

Instance Attribute Details

#baseObject (readonly)

Returns the value of attribute base.



3
4
5
# File 'lib/fx_rates/response/timeseries.rb', line 3

def base
  @base
end

#end_dateObject (readonly)

Returns the value of attribute end_date.



3
4
5
# File 'lib/fx_rates/response/timeseries.rb', line 3

def end_date
  @end_date
end

#ratesObject (readonly)

Returns the value of attribute rates.



3
4
5
# File 'lib/fx_rates/response/timeseries.rb', line 3

def rates
  @rates
end

#raw_responseObject (readonly)

Returns the value of attribute raw_response.



3
4
5
# File 'lib/fx_rates/response/timeseries.rb', line 3

def raw_response
  @raw_response
end

#start_dateObject (readonly)

Returns the value of attribute start_date.



3
4
5
# File 'lib/fx_rates/response/timeseries.rb', line 3

def start_date
  @start_date
end

#successObject (readonly)

Returns the value of attribute success.



3
4
5
# File 'lib/fx_rates/response/timeseries.rb', line 3

def success
  @success
end