Class: Spear::Structure::User::Retrieve

Inherits:
Base
  • Object
show all
Defined in:
lib/spear/structure/user/retrieve.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#error_message, #response, #root, #status

Instance Method Summary collapse

Methods inherited from Base

#success?

Constructor Details

#initialize(response) ⇒ Retrieve

Returns a new instance of Retrieve.



8
9
10
11
12
13
14
15
16
17
# File 'lib/spear/structure/user/retrieve.rb', line 8

def initialize(response)
  super(response)

  @user_info = @root['UserInfo']
  @external_id = @root['Request']['ExternalID']
  @email = @user_info['Email']
  @first_name = @user_info['FirstName']
  @last_name = @user_info['LastName']
  @phone = @user_info['Phone']
end

Instance Attribute Details

#emailObject

Returns the value of attribute email.



6
7
8
# File 'lib/spear/structure/user/retrieve.rb', line 6

def email
  @email
end

#external_idObject (readonly)

Returns the value of attribute external_id.



5
6
7
# File 'lib/spear/structure/user/retrieve.rb', line 5

def external_id
  @external_id
end

#first_nameObject

Returns the value of attribute first_name.



6
7
8
# File 'lib/spear/structure/user/retrieve.rb', line 6

def first_name
  @first_name
end

#last_nameObject

Returns the value of attribute last_name.



6
7
8
# File 'lib/spear/structure/user/retrieve.rb', line 6

def last_name
  @last_name
end

#phoneObject

Returns the value of attribute phone.



6
7
8
# File 'lib/spear/structure/user/retrieve.rb', line 6

def phone
  @phone
end