class Bitex::SpecieDeposit

A deposit of some specie into your bitex.la balance

Attributes

created_at[RW]

@!attribute created_at

@return [Time] Time when this deposit credited.
id[RW]

@!attribute id

@return [Integer] This SpecieDeposit's unique ID.
quantity[RW]

@!attribute quantity

@return [BigDecimal] Quantity deposited
specie[RW]

@!attribute specie

@return [Symbol] :btc

Public Class Methods

all(specie) click to toggle source
# File lib/bitex/specie_deposit.rb, line 32
def self.all(specie)
  Api.private(:get, "/private/#{specie}/deposits").map { |sd| from_json(sd) }
end
find(specie, id) click to toggle source
# File lib/bitex/specie_deposit.rb, line 28
def self.find(specie, id)
  from_json(Api.private(:get, "/private/#{specie}/deposits/#{id}"))
end
from_json(json) click to toggle source

@visibility private

# File lib/bitex/specie_deposit.rb, line 21
def self.from_json(json)
  Api.from_json(new, json) do |thing|
    thing.specie = { 1 => :btc }[json[3]]
    thing.quantity = (json[4] || 0).to_d
  end
end
species() click to toggle source
# File lib/bitex/specie_deposit.rb, line 36
def self.species
  { 0 => :btc }
end