class Vertpig::Wallet

Attributes

address[R]
available[R]
balance[R]
currency[R]
id[R]
pending[R]
raw[R]
requested[R]

Public Class Methods

all() click to toggle source
# File lib/vertpig/wallet.rb, line 16
def self.all
  client.get('account/getbalances').map{|data| new(data) }
end
balance(currency) click to toggle source
# File lib/vertpig/wallet.rb, line 20
def self.balance(currency)
  client.get('account/getbalance', {
    currency: currency
  })
end
new(attrs = {}) click to toggle source
# File lib/vertpig/wallet.rb, line 5
def initialize(attrs = {})
  @id = attrs['Uuid'].to_s
  @address = attrs['CryptoAddress']
  @currency = attrs['Currency']
  @balance = attrs['Balance']
  @available = attrs['Available']
  @pending = attrs['Pending']
  @raw = attrs
  @requested = attrs['Requested']
end

Private Class Methods

client() click to toggle source
# File lib/vertpig/wallet.rb, line 28
def self.client
  @client ||= Vertpig.client
end