Class: WorkOS::UserAuthenticationFactorEnrollResponse

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

Constant Summary collapse

HASH_ATTRS =
{
  authentication_factor: :authentication_factor,
  authentication_challenge: :authentication_challenge
}.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) ⇒ UserAuthenticationFactorEnrollResponse

Returns a new instance of UserAuthenticationFactorEnrollResponse.



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

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

Instance Attribute Details

#authentication_challengeObject

Returns the value of attribute authentication_challenge.



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

def authentication_challenge
  @authentication_challenge
end

#authentication_factorObject

Returns the value of attribute authentication_factor.



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

def authentication_factor
  @authentication_factor
end