Class: Coinone::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/coinone/account.rb,
lib/coinone/account/balance.rb,
lib/coinone/account/account_info.rb,
lib/coinone/account/daily_balance.rb,
lib/coinone/account/balance/wallet.rb,
lib/coinone/account/deposit_address.rb,
lib/coinone/account/virtual_account.rb,
lib/coinone/account/balance/normal_wallet.rb,
lib/coinone/account/daily_balance/balance.rb,
lib/coinone/account/account_info/bank_info.rb,
lib/coinone/account/account_info/fee_rates.rb,
lib/coinone/account/deposit_address/wallet.rb,
lib/coinone/account/account_info/email_info.rb,
lib/coinone/account/account_info/mobile_info.rb,
lib/coinone/account/account_info/fee_rates/fee_rate.rb,
lib/coinone/account/account_info/virtual_account_info.rb

Defined Under Namespace

Classes: AccountInfo, Balance, DailyBalance, DepositAddress, VirtualAccount

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}, connection = nil) ⇒ Account

Returns a new instance of Account.



14
15
16
17
18
19
20
21
22
23
# File 'lib/coinone/account.rb', line 14

def initialize(options={}, connection=nil)

  @connection = connection || Connection.factory(options)
  @account_info = AccountInfo.new()
  @balance = Balance.new()
  @daily_balance = DailyBalance.new()
  @deposit_address = DepositAddress.new()
   = VirtualAccount.new()

end

Instance Attribute Details

#account_infoObject (readonly)

Returns the value of attribute account_info.



12
13
14
# File 'lib/coinone/account.rb', line 12

def 
  @account_info
end

#balanceObject (readonly)

Returns the value of attribute balance.



12
13
14
# File 'lib/coinone/account.rb', line 12

def balance
  @balance
end

#connectionObject (readonly)

Returns the value of attribute connection.



11
12
13
# File 'lib/coinone/account.rb', line 11

def connection
  @connection
end

#daily_balanceObject (readonly)

Returns the value of attribute daily_balance.



12
13
14
# File 'lib/coinone/account.rb', line 12

def daily_balance
  @daily_balance
end

#deposit_addressObject (readonly)

Returns the value of attribute deposit_address.



12
13
14
# File 'lib/coinone/account.rb', line 12

def deposit_address
  @deposit_address
end

#virtual_accountObject (readonly)

Returns the value of attribute virtual_account.



12
13
14
# File 'lib/coinone/account.rb', line 12

def 
  
end

Instance Method Details

#get_balanceObject



34
35
36
37
38
39
40
41
# File 'lib/coinone/account.rb', line 34

def get_balance

  response = @connection.post("/v2/account/balance/")

  @balance.update_balance(response)
  @balance

end

#get_daily_balanceObject



43
44
45
46
47
48
49
50
# File 'lib/coinone/account.rb', line 43

def get_daily_balance

  response = @connection.post("/v2/account/daily_balance/")

  @daily_balance.update_balance(response)
  @daily_balance

end

#get_deposit_addressObject



52
53
54
55
56
57
58
59
# File 'lib/coinone/account.rb', line 52

def get_deposit_address

  response = @connection.post("/v2/account/deposit_address/")

  @deposit_address.update_address(response)
  @deposit_address

end

#get_user_infoObject



26
27
28
29
30
31
32
# File 'lib/coinone/account.rb', line 26

def 
  response = @connection.post( "/v2/account/user_info/")

  @account_info.(response)
  @account_info

end

#get_virtual_accountObject



61
62
63
64
65
66
67
68
# File 'lib/coinone/account.rb', line 61

def 

  response = @connection.post("/v2/account/virtual_account/")

  .(response)
  

end