Class: Spear::Structure::User::Retrieve
- Defined in:
- lib/spear/structure/user/retrieve.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#external_id ⇒ Object
readonly
Returns the value of attribute external_id.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#phone ⇒ Object
Returns the value of attribute phone.
Attributes inherited from Base
#error_message, #response, #root, #status
Instance Method Summary collapse
-
#initialize(response) ⇒ Retrieve
constructor
A new instance of Retrieve.
Methods inherited from Base
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
#email ⇒ Object
Returns the value of attribute email.
6 7 8 |
# File 'lib/spear/structure/user/retrieve.rb', line 6 def email @email end |
#external_id ⇒ Object (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_name ⇒ Object
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_name ⇒ Object
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 |
#phone ⇒ Object
Returns the value of attribute phone.
6 7 8 |
# File 'lib/spear/structure/user/retrieve.rb', line 6 def phone @phone end |