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.
-
#raw ⇒ hash
The raw data returned from the Toopher API.
-
#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.
197 198 199 200 201 202 203 204 205 206 |
# File 'lib/toopher_api.rb', line 197 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'] @raw = json_obj end |
Instance Attribute Details
#automated ⇒ Boolean
Returns Indicates whether the request was automated.
179 180 181 |
# File 'lib/toopher_api.rb', line 179 def automated @automated end |
#granted ⇒ Boolean
Returns Indicates whether the request was granted.
175 176 177 |
# File 'lib/toopher_api.rb', line 175 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.
167 168 169 |
# File 'lib/toopher_api.rb', line 167 def id @id end |
#pending ⇒ Boolean
Returns Indicates whether the request is still pending.
171 172 173 |
# File 'lib/toopher_api.rb', line 171 def pending @pending end |
#raw ⇒ hash
Returns The raw data returned from the Toopher API.
195 196 197 |
# File 'lib/toopher_api.rb', line 195 def raw @raw end |
#reason ⇒ String
Returns A string which provides additional information about the reason for the authentication outcome (if available).
183 184 185 |
# File 'lib/toopher_api.rb', line 183 def reason @reason end |
#terminal_id ⇒ String
Returns A unique string identifier generated and returned by the Toopher web service for a given terminal.
187 188 189 |
# File 'lib/toopher_api.rb', line 187 def terminal_id @terminal_id end |
#terminal_name ⇒ String
Returns The human recognizable terminal name associated with the given id.
191 192 193 |
# File 'lib/toopher_api.rb', line 191 def terminal_name @terminal_name end |