Class: Cryptoexchange::Models::Trade

Inherits:
Object
  • Object
show all
Defined in:
lib/cryptoexchange/models/trade.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#amountObject

Returns the value of attribute amount.



4
5
6
# File 'lib/cryptoexchange/models/trade.rb', line 4

def amount
  @amount
end

#baseObject

Returns the value of attribute base.



4
5
6
# File 'lib/cryptoexchange/models/trade.rb', line 4

def base
  @base
end

#marketObject

Returns the value of attribute market.



4
5
6
# File 'lib/cryptoexchange/models/trade.rb', line 4

def market
  @market
end

#payloadObject

Returns the value of attribute payload.



4
5
6
# File 'lib/cryptoexchange/models/trade.rb', line 4

def payload
  @payload
end

#priceObject

Returns the value of attribute price.



4
5
6
# File 'lib/cryptoexchange/models/trade.rb', line 4

def price
  @price
end

#targetObject

Returns the value of attribute target.



4
5
6
# File 'lib/cryptoexchange/models/trade.rb', line 4

def target
  @target
end

#timestampObject

Returns the value of attribute timestamp.



4
5
6
# File 'lib/cryptoexchange/models/trade.rb', line 4

def timestamp
  @timestamp
end

#trade_idObject

Returns the value of attribute trade_id.



4
5
6
# File 'lib/cryptoexchange/models/trade.rb', line 4

def trade_id
  @trade_id
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/cryptoexchange/models/trade.rb', line 4

def type
  @type
end