Class: WorkOS::AuthenticationChallengeVerifyResponse

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/multi_factor_auth/authentication_challenge_verify_response.rb

Constant Summary collapse

HASH_ATTRS =
{
  challenge: :challenge,
  valid: :valid
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

normalize

Methods included from HashProvider

#inspect, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ AuthenticationChallengeVerifyResponse

Returns a new instance of AuthenticationChallengeVerifyResponse.



16
17
18
19
20
# File 'lib/workos/multi_factor_auth/authentication_challenge_verify_response.rb', line 16

def initialize(json)
  hash = self.class.normalize(json)
  @challenge = hash[:challenge] ? WorkOS::AuthenticationChallenge.new(hash[:challenge]) : nil
  @valid = hash[:valid]
end

Instance Attribute Details

#challengeObject

Returns the value of attribute challenge.



12
13
14
# File 'lib/workos/multi_factor_auth/authentication_challenge_verify_response.rb', line 12

def challenge
  @challenge
end

#validObject

Returns the value of attribute valid.



12
13
14
# File 'lib/workos/multi_factor_auth/authentication_challenge_verify_response.rb', line 12

def valid
  @valid
end