Class: Tastytrade::Models::Base
- Inherits:
-
Object
- Object
- Tastytrade::Models::Base
- Defined in:
- lib/tastytrade/models/base.rb
Overview
Base class for all Tastytrade data models
Direct Known Subclasses
Account, AccountBalance, BuyingPowerEffect, CurrentPosition, Fill, LiveOrder, LiveOrderLeg, OrderLegResponse, OrderResponse, TradingStatus, Transaction, User
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(data = {}) ⇒ Base
Returns a new instance of Base.
9 10 11 12 |
# File 'lib/tastytrade/models/base.rb', line 9 def initialize(data = {}) @data = stringify_keys(data) parse_attributes end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
14 15 16 |
# File 'lib/tastytrade/models/base.rb', line 14 def data @data end |