Class: OandaAPI::Resource::Labs::CalendarEvent

Inherits:
OandaAPI::ResourceBase show all
Defined in:
lib/oanda_api/resource/labs/calendar_event.rb

Overview

Calendar value object. See the Oanda Developer Guide for information about Calendar.

Constant Summary

Constants inherited from OandaAPI::ResourceBase

OandaAPI::ResourceBase::NOT_PLURALIZED

Instance Attribute Summary collapse

Attributes inherited from OandaAPI::ResourceBase

#location

Instance Method Summary collapse

Methods inherited from OandaAPI::ResourceBase

class_from_symbol, #initialize, labs_resource?, pluralize, #to_json

Constructor Details

This class inherits a constructor from OandaAPI::ResourceBase

Instance Attribute Details

#actualObject

Returns the value of attribute actual.



8
9
10
# File 'lib/oanda_api/resource/labs/calendar_event.rb', line 8

def actual
  @actual
end

#currencyObject

Returns the value of attribute currency.



8
9
10
# File 'lib/oanda_api/resource/labs/calendar_event.rb', line 8

def currency
  @currency
end

#forecastObject

Returns the value of attribute forecast.



8
9
10
# File 'lib/oanda_api/resource/labs/calendar_event.rb', line 8

def forecast
  @forecast
end

#impactObject

Returns the value of attribute impact.



8
9
10
# File 'lib/oanda_api/resource/labs/calendar_event.rb', line 8

def impact
  @impact
end

#marketObject

Returns the value of attribute market.



8
9
10
# File 'lib/oanda_api/resource/labs/calendar_event.rb', line 8

def market
  @market
end

#previousObject

Returns the value of attribute previous.



8
9
10
# File 'lib/oanda_api/resource/labs/calendar_event.rb', line 8

def previous
  @previous
end

#regionObject

Returns the value of attribute region.



8
9
10
# File 'lib/oanda_api/resource/labs/calendar_event.rb', line 8

def region
  @region
end

#timestampObject

Returns the value of attribute timestamp.



8
9
10
# File 'lib/oanda_api/resource/labs/calendar_event.rb', line 8

def timestamp
  @timestamp
end

#titleObject

Returns the value of attribute title.



8
9
10
# File 'lib/oanda_api/resource/labs/calendar_event.rb', line 8

def title
  @title
end

#unitObject

Returns the value of attribute unit.



8
9
10
# File 'lib/oanda_api/resource/labs/calendar_event.rb', line 8

def unit
  @unit
end

Instance Method Details

#timeObject



19
20
21
# File 'lib/oanda_api/resource/labs/calendar_event.rb', line 19

def time
  Time.at(timestamp).utc if timestamp
end