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.



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

#automatedBoolean

Returns Indicates whether the request was automated.

Returns:

  • (Boolean)

    Indicates whether the request was automated.



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

def automated
  @automated
end

#grantedBoolean

Returns Indicates whether the request was granted.

Returns:

  • (Boolean)

    Indicates whether the request was granted.



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

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.



162
163
164
# File 'lib/toopher_api.rb', line 162

def id
  @id
end

#pendingBoolean

Returns Indicates whether the request is still pending.

Returns:

  • (Boolean)

    Indicates whether the request is still pending.



166
167
168
# File 'lib/toopher_api.rb', line 166

def pending
  @pending
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).



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

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.



182
183
184
# File 'lib/toopher_api.rb', line 182

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.



186
187
188
# File 'lib/toopher_api.rb', line 186

def terminal_name
  @terminal_name
end