Class: MercadoBitcoin::Api::Data::Trade

Inherits:
Object
  • Object
show all
Defined in:
lib/mercado_bitcoin/api/data/trade.rb

Instance Method Summary collapse

Instance Method Details

#to_hashObject



10
11
12
13
14
15
16
17
18
# File 'lib/mercado_bitcoin/api/data/trade.rb', line 10

def to_hash
  {
    price: price,
    amount: amount,
    tid: tid,
    type: type,
    date: date
  }
end

#to_jsonObject



20
21
22
# File 'lib/mercado_bitcoin/api/data/trade.rb', line 20

def to_json
  to_hash.to_json
end