class Coinone::Account::DailyBalance::Balance

Attributes

btc[R]
etc[R]
eth[R]
krw[R]
timestamp[R]
value[R]

Public Class Methods

new(options={}) click to toggle source
# File lib/coinone/account/daily_balance/balance.rb, line 11
def initialize(options={})

  @timestamp = nil
  @value = 0
  @btc = 0
  @eth = 0
  @etc = 0
  @krw = 0

  update_balance(options)
end

Public Instance Methods

update_balance(params={}) click to toggle source
# File lib/coinone/account/daily_balance/balance.rb, line 23
def update_balance(params={})

  @timestamp= params[:timestamp].to_i if params.has_key? :timestamp
  @value = params[:value].to_d if params.has_key? :value
  @btc = params[:btc].to_d if params.has_key? :btc
  @eth = params[:eth].to_d if params.has_key? :eth
  @etc = params[:etc].to_d if params.has_key? :etc
  @krw = params[:krw].to_d if params.has_key? :krw

end