Class: Isaca::Model::GetUserDetailsByToken
- Inherits:
-
Object
- Object
- Isaca::Model::GetUserDetailsByToken
- Defined in:
- lib/isaca/models/get_user_details_by_token.rb
Overview
Class is used as an object representation of the response from Request::GetUserDetailsByToken.
Instance Attribute Summary collapse
-
#country ⇒ String
The country of the requested user.
-
#email ⇒ String
The email of the requested user.
-
#enterprise_id ⇒ String
The Enterprise ID of the requested user.
-
#first_name ⇒ String
The first name of the requested user.
-
#imis_id ⇒ String
The IMIS ID of the requested user.
-
#last_name ⇒ String
The last name of the requested user.
-
#marketing ⇒ Boolean|nil
The marketing acceptance status of the requested user.
-
#privacy ⇒ Boolean|nil
The privacy acceptance status of the requested user.
-
#username ⇒ String
The username of the requested user.
Instance Method Summary collapse
-
#initialize(params) ⇒ GetUserDetailsByToken
constructor
A new instance of GetUserDetailsByToken.
Constructor Details
#initialize(params) ⇒ GetUserDetailsByToken
Returns a new instance of GetUserDetailsByToken.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/isaca/models/get_user_details_by_token.rb', line 54 def initialize(params) if params[:ID].to_s.strip.empty? raise ServiceError.new('User with given IMIS ID not found') else @imis_id = params[:ID] end @enterprise_id = params[:Ent_ID] @first_name = params[:First_Name] @last_name = params[:Last_Name] @email = params[:Email] @username = params[:UserName] @country = params[:Country] if params[:PRIVACY] == '1' @privacy = true elsif params[:PRIVACY] == '0' @privacy = false else @privacy = nil end if params[:MARKETING] == '1' @marketing = true elsif params[:MARKETING] == '0' @marketing = false else @marketing = nil end end |
Instance Attribute Details
#country ⇒ String
Returns The country of the requested user.
30 31 32 |
# File 'lib/isaca/models/get_user_details_by_token.rb', line 30 def country @country end |
#email ⇒ String
Returns The email of the requested user.
22 23 24 |
# File 'lib/isaca/models/get_user_details_by_token.rb', line 22 def email @email end |
#enterprise_id ⇒ String
Returns The Enterprise ID of the requested user.
10 11 12 |
# File 'lib/isaca/models/get_user_details_by_token.rb', line 10 def enterprise_id @enterprise_id end |
#first_name ⇒ String
Returns The first name of the requested user.
14 15 16 |
# File 'lib/isaca/models/get_user_details_by_token.rb', line 14 def first_name @first_name end |
#imis_id ⇒ String
Returns The IMIS ID of the requested user.
10 11 12 |
# File 'lib/isaca/models/get_user_details_by_token.rb', line 10 def imis_id @imis_id end |
#last_name ⇒ String
Returns The last name of the requested user.
18 19 20 |
# File 'lib/isaca/models/get_user_details_by_token.rb', line 18 def last_name @last_name end |
#marketing ⇒ Boolean|nil
Returns The marketing acceptance status of the requested user.
38 39 40 |
# File 'lib/isaca/models/get_user_details_by_token.rb', line 38 def marketing @marketing end |
#privacy ⇒ Boolean|nil
Returns The privacy acceptance status of the requested user.
34 35 36 |
# File 'lib/isaca/models/get_user_details_by_token.rb', line 34 def privacy @privacy end |
#username ⇒ String
Returns The username of the requested user.
26 27 28 |
# File 'lib/isaca/models/get_user_details_by_token.rb', line 26 def username @username end |