Class: AuthenticationStatus
- Inherits:
-
Object
- Object
- AuthenticationStatus
- Defined in:
- lib/toopher_api.rb
Overview
Contains information about a particular authentication request
Instance Attribute Summary collapse
-
#automated ⇒ Boolean
Indicates whether the request was automated.
-
#granted ⇒ Boolean
Indicates whether the request was granted.
-
#id ⇒ String
A unique string identifier generated and returned by the Toopher web service that is used to identify this authentication request.
-
#pending ⇒ Boolean
Indicates whether the request is still pending.
-
#reason ⇒ String
A string which provides additional information about the reason for the authentication outcome (if available).
-
#terminal_id ⇒ String
A unique string identifier generated and returned by the Toopher web service for a given terminal.
-
#terminal_name ⇒ String
The human recognizable terminal name associated with the given id.
Instance Method Summary collapse
-
#initialize(json_obj) ⇒ AuthenticationStatus
constructor
A new instance of AuthenticationStatus.
Constructor Details
#initialize(json_obj) ⇒ AuthenticationStatus
Returns a new instance of AuthenticationStatus.
188 189 190 191 192 193 194 195 196 |
# File 'lib/toopher_api.rb', line 188 def initialize(json_obj) @id = json_obj['id'] @pending = json_obj['pending'] @granted = json_obj['granted'] @automated = json_obj['automated'] @reason = json_obj['reason'] @terminal_id = json_obj['terminal']['id'] @terminal_name = json_obj['terminal']['name'] end |
Instance Attribute Details
#automated ⇒ Boolean
Returns Indicates whether the request was automated.
174 175 176 |
# File 'lib/toopher_api.rb', line 174 def automated @automated end |
#granted ⇒ Boolean
Returns Indicates whether the request was granted.
170 171 172 |
# File 'lib/toopher_api.rb', line 170 def granted @granted end |
#id ⇒ String
Returns A unique string identifier generated and returned by the Toopher web service that is used to identify this authentication request. It can be used to request status information for the authentication request.
162 163 164 |
# File 'lib/toopher_api.rb', line 162 def id @id end |
#pending ⇒ Boolean
Returns Indicates whether the request is still pending.
166 167 168 |
# File 'lib/toopher_api.rb', line 166 def pending @pending end |
#reason ⇒ String
Returns A string which provides additional information about the reason for the authentication outcome (if available).
178 179 180 |
# File 'lib/toopher_api.rb', line 178 def reason @reason end |
#terminal_id ⇒ String
Returns A unique string identifier generated and returned by the Toopher web service for a given terminal.
182 183 184 |
# File 'lib/toopher_api.rb', line 182 def terminal_id @terminal_id end |
#terminal_name ⇒ String
Returns The human recognizable terminal name associated with the given id.
186 187 188 |
# File 'lib/toopher_api.rb', line 186 def terminal_name @terminal_name end |