Class: Cryptoexchange::Models::Trade
- Inherits:
-
Object
- Object
- Cryptoexchange::Models::Trade
- Defined in:
- lib/cryptoexchange/models/trade.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#base ⇒ Object
Returns the value of attribute base.
-
#market ⇒ Object
Returns the value of attribute market.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#price ⇒ Object
Returns the value of attribute price.
-
#target ⇒ Object
Returns the value of attribute target.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
-
#trade_id ⇒ Object
Returns the value of attribute trade_id.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Trade
constructor
A new instance of Trade.
Constructor Details
#initialize(params = {}) ⇒ Trade
Returns a new instance of Trade.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/cryptoexchange/models/trade.rb', line 6 def initialize(params = {}) @trade_id = params[:id] @base = params[:base] @target = params[:target] @type = params[:type] @price = params[:price] @amount = params[:amount] @timestamp = params[:timestamp] @payload = params[:payload] @market = params[:market] end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
4 5 6 |
# File 'lib/cryptoexchange/models/trade.rb', line 4 def amount @amount end |
#base ⇒ Object
Returns the value of attribute base.
4 5 6 |
# File 'lib/cryptoexchange/models/trade.rb', line 4 def base @base end |
#market ⇒ Object
Returns the value of attribute market.
4 5 6 |
# File 'lib/cryptoexchange/models/trade.rb', line 4 def market @market end |
#payload ⇒ Object
Returns the value of attribute payload.
4 5 6 |
# File 'lib/cryptoexchange/models/trade.rb', line 4 def payload @payload end |
#price ⇒ Object
Returns the value of attribute price.
4 5 6 |
# File 'lib/cryptoexchange/models/trade.rb', line 4 def price @price end |
#target ⇒ Object
Returns the value of attribute target.
4 5 6 |
# File 'lib/cryptoexchange/models/trade.rb', line 4 def target @target end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
4 5 6 |
# File 'lib/cryptoexchange/models/trade.rb', line 4 def @timestamp end |
#trade_id ⇒ Object
Returns the value of attribute trade_id.
4 5 6 |
# File 'lib/cryptoexchange/models/trade.rb', line 4 def trade_id @trade_id end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/cryptoexchange/models/trade.rb', line 4 def type @type end |