Class: AuthenticationStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/toopher_api.rb

Overview

Contains information about a particular authentication request

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#automatedBoolean

Returns Indicates whether the request was automated.

Returns:

  • (Boolean)

    Indicates whether the request was automated.



179
180
181
# File 'lib/toopher_api.rb', line 179

def automated
  @automated
end

#grantedBoolean

Returns Indicates whether the request was granted.

Returns:

  • (Boolean)

    Indicates whether the request was granted.



175
176
177
# File 'lib/toopher_api.rb', line 175

def granted
  @granted
end

#idString

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.

Returns:

  • (String)

    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

#pendingBoolean

Returns Indicates whether the request is still pending.

Returns:

  • (Boolean)

    Indicates whether the request is still pending.



171
172
173
# File 'lib/toopher_api.rb', line 171

def pending
  @pending
end

#rawhash

Returns The raw data returned from the Toopher API.

Returns:

  • (hash)

    The raw data returned from the Toopher API



195
196
197
# File 'lib/toopher_api.rb', line 195

def raw
  @raw
end

#reasonString

Returns A string which provides additional information about the reason for the authentication outcome (if available).

Returns:

  • (String)

    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_idString

Returns A unique string identifier generated and returned by the Toopher web service for a given terminal.

Returns:

  • (String)

    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_nameString

Returns The human recognizable terminal name associated with the given id.

Returns:

  • (String)

    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