Class: Coinone::Account::AccountInfo::BankInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/coinone/account/account_info/bank_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ BankInfo

Returns a new instance of BankInfo.



7
8
9
10
11
12
13
14
15
# File 'lib/coinone/account/account_info/bank_info.rb', line 7

def initialize(params={})

  @depositor = nil
  @bank_code = nil
  @is_authenticated = nil
  @account_number = nil

  update_info(params)
end

Instance Attribute Details

#account_numberObject (readonly)

Returns the value of attribute account_number.



5
6
7
# File 'lib/coinone/account/account_info/bank_info.rb', line 5

def 
  @account_number
end

#bank_codeObject (readonly)

Returns the value of attribute bank_code.



5
6
7
# File 'lib/coinone/account/account_info/bank_info.rb', line 5

def bank_code
  @bank_code
end

#depositorObject (readonly)

Returns the value of attribute depositor.



5
6
7
# File 'lib/coinone/account/account_info/bank_info.rb', line 5

def depositor
  @depositor
end

#is_authenticatedObject (readonly)

Returns the value of attribute is_authenticated.



5
6
7
# File 'lib/coinone/account/account_info/bank_info.rb', line 5

def is_authenticated
  @is_authenticated
end

Instance Method Details

#update_info(params = {}) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/coinone/account/account_info/bank_info.rb', line 17

def update_info(params={})

  @depositor = params[:depositor].strip if params.has_key? :depositor
  @bank_code = params[:bankCode].strip if params.has_key? :bankCode
  @is_authenticated = params[:isAuthenticated] == "true"
  @account_number = params[:accountNumber].strip if params.has_key? :accountNumber

end