Class: Tradier::Adjustment
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#[], #attr_equal, attr_reader, #attrs, #attrs_equal, #initialize, #update
Constructor Details
This class inherits a constructor from Tradier::Base
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/tradier/adjustment.rb', line 6 def type @type end |
Class Method Details
.from_response(body = {}) ⇒ Object
12 13 14 |
# File 'lib/tradier/adjustment.rb', line 12 def self.from_response(body={}) new(body[:balances] || body) end |
Instance Method Details
#strikes ⇒ Object
8 9 10 |
# File 'lib/tradier/adjustment.rb', line 8 def strikes @strikes ||= (@attrs[:strikes][:strike] || []) end |