Class: WorkOS::EnrollUserAuthenticationFactor

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

Constant Summary collapse

HASH_ATTRS =
{
  type: :type,
  totp_issuer: :totp_issuer,
  totp_user: :totp_user,
  totp_secret: :totp_secret
}.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) ⇒ EnrollUserAuthenticationFactor

Returns a new instance of EnrollUserAuthenticationFactor.



20
21
22
23
24
25
26
# File 'lib/workos/multi_factor_auth/enroll_user_authentication_factor.rb', line 20

def initialize(json)
  hash = self.class.normalize(json)
  @type = hash[:type]
  @totp_issuer = hash[:totp_issuer]
  @totp_user = hash[:totp_user]
  @totp_secret = hash[:totp_secret]
end

Instance Attribute Details

#totp_issuerObject

Returns the value of attribute totp_issuer.



14
15
16
# File 'lib/workos/multi_factor_auth/enroll_user_authentication_factor.rb', line 14

def totp_issuer
  @totp_issuer
end

#totp_secretObject

Returns the value of attribute totp_secret.



14
15
16
# File 'lib/workos/multi_factor_auth/enroll_user_authentication_factor.rb', line 14

def totp_secret
  @totp_secret
end

#totp_userObject

Returns the value of attribute totp_user.



14
15
16
# File 'lib/workos/multi_factor_auth/enroll_user_authentication_factor.rb', line 14

def totp_user
  @totp_user
end

#typeObject

Returns the value of attribute type.



14
15
16
# File 'lib/workos/multi_factor_auth/enroll_user_authentication_factor.rb', line 14

def type
  @type
end