Class: Coinone::Account::AccountInfo::MobileInfo

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ MobileInfo

Returns a new instance of MobileInfo.



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

def initialize(params={})
  @user_name = nil
  @phone_number = nil
  @phone_corp = nil
  @is_authenticated = nil
  update_info(params)
end

Instance Attribute Details

#is_authenticatedObject (readonly)

Returns the value of attribute is_authenticated.



6
7
8
# File 'lib/coinone/account/account_info/mobile_info.rb', line 6

def is_authenticated
  @is_authenticated
end

#phone_corpObject (readonly)

Returns the value of attribute phone_corp.



6
7
8
# File 'lib/coinone/account/account_info/mobile_info.rb', line 6

def phone_corp
  @phone_corp
end

#phone_numberObject (readonly)

Returns the value of attribute phone_number.



6
7
8
# File 'lib/coinone/account/account_info/mobile_info.rb', line 6

def phone_number
  @phone_number
end

#user_nameObject (readonly)

Returns the value of attribute user_name.



6
7
8
# File 'lib/coinone/account/account_info/mobile_info.rb', line 6

def user_name
  @user_name
end

Instance Method Details

#update_info(params = {}) ⇒ Object



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

def update_info(params={})

  @user_name = params[:userName].strip if params.has_key? :userName
  @phone_number = params[:phoneNumber].strip if params.has_key? :phoneNumber
  @phone_corp = params[:phoneCorp].strip if params.has_key? :phoneCorp
  @is_authenticated = params[:isAuthenticated] == "true"

end