Class: QuestradeApi::REST::Time
- Defined in:
- lib/questrade_api/rest/time.rb
Overview
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
#account_id, #authorization, #connection, #data, #endpoint, #id, #raw_body
Class Method Summary collapse
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(authorization) ⇒ Time
constructor
A new instance of Time.
Methods inherited from Base
#build_attributes, #build_data, connection, fetch, post, #url
Constructor Details
#initialize(authorization) ⇒ Time
Returns a new instance of Time.
7 8 9 |
# File 'lib/questrade_api/rest/time.rb', line 7 def initialize() super() end |
Class Method Details
.endpoint ⇒ Object
23 24 25 |
# File 'lib/questrade_api/rest/time.rb', line 23 def self.endpoint "#{BASE_ENDPOINT}/time" end |
Instance Method Details
#fetch ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/questrade_api/rest/time.rb', line 11 def fetch response = super if raw_body build_data(raw_body) data.time = DateTime.parse(data.time) response = data.time end response end |