Class: Isaca::Model::AuthenticateUser
- Inherits:
-
Object
- Object
- Isaca::Model::AuthenticateUser
- Defined in:
- lib/isaca/models/authenticate_user.rb
Overview
Class that is used as an object representation of the response from Request::AuthenticateUser.
Instance Attribute Summary collapse
-
#error ⇒ Array
The ISACA error – ISACA documentation on this is currently limited.
-
#error_code ⇒ String
The ISACA error code – ISACA documentation on this is currently limited.
-
#is_valid ⇒ Boolean
Whether or not the session is valid.
-
#value ⇒ String
Session value or error message.
Instance Method Summary collapse
-
#initialize(params) ⇒ AuthenticateUser
constructor
A new instance of AuthenticateUser.
-
#is_valid? ⇒ Boolean
Helper method for checking the validity of a session.
Constructor Details
#initialize(params) ⇒ AuthenticateUser
Returns a new instance of AuthenticateUser.
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/isaca/models/authenticate_user.rb', line 23 def initialize(params) raise AttributeError.new(:Error, self.class.name, params) unless params.has_key?(:Error) raise AttributeError.new(:ErrorCode, self.class.name, params) unless params.has_key?(:ErrorCode) raise AttributeError.new(:IsValid, self.class.name, params) unless params.has_key?(:IsValid) raise AttributeError.new(:Value, self.class.name, params) unless params.has_key?(:Value) @error = params[:Error] @error_code = params[:ErrorCode] @is_valid = Isaca::Helpers.parse_boolean params[:IsValid] @value = params[:Value] end |
Instance Attribute Details
#error ⇒ Array
Returns The ISACA error – ISACA documentation on this is currently limited.
8 9 10 |
# File 'lib/isaca/models/authenticate_user.rb', line 8 def error @error end |
#error_code ⇒ String
Returns The ISACA error code – ISACA documentation on this is currently limited.
8 9 10 |
# File 'lib/isaca/models/authenticate_user.rb', line 8 def error_code @error_code end |
#is_valid ⇒ Boolean
Returns Whether or not the session is valid.
11 12 13 |
# File 'lib/isaca/models/authenticate_user.rb', line 11 def is_valid @is_valid end |
#value ⇒ String
Returns Session value or error message.
14 15 16 |
# File 'lib/isaca/models/authenticate_user.rb', line 14 def value @value end |
Instance Method Details
#is_valid? ⇒ Boolean
Helper method for checking the validity of a session
38 39 40 |
# File 'lib/isaca/models/authenticate_user.rb', line 38 def is_valid? is_valid end |