Class: WorkOS::AuthenticationFactorEnrolledTotp

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

Constant Summary collapse

HASH_ATTRS =
{
  issuer: :issuer,
  user: :user,
  secret: :secret,
  qr_code: :qr_code,
  uri: :uri
}.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) ⇒ AuthenticationFactorEnrolledTotp

Returns a new instance of AuthenticationFactorEnrolledTotp.



22
23
24
25
26
27
28
29
# File 'lib/workos/multi_factor_auth/authentication_factor_enrolled_totp.rb', line 22

def initialize(json)
  hash = self.class.normalize(json)
  @issuer = hash[:issuer]
  @user = hash[:user]
  @secret = hash[:secret]
  @qr_code = hash[:qr_code]
  @uri = hash[:uri]
end

Instance Attribute Details

#issuerObject

Returns the value of attribute issuer.



15
16
17
# File 'lib/workos/multi_factor_auth/authentication_factor_enrolled_totp.rb', line 15

def issuer
  @issuer
end

#qr_codeObject

Returns the value of attribute qr_code.



15
16
17
# File 'lib/workos/multi_factor_auth/authentication_factor_enrolled_totp.rb', line 15

def qr_code
  @qr_code
end

#secretObject

Returns the value of attribute secret.



15
16
17
# File 'lib/workos/multi_factor_auth/authentication_factor_enrolled_totp.rb', line 15

def secret
  @secret
end

#uriObject

Returns the value of attribute uri.



15
16
17
# File 'lib/workos/multi_factor_auth/authentication_factor_enrolled_totp.rb', line 15

def uri
  @uri
end

#userObject

Returns the value of attribute user.



15
16
17
# File 'lib/workos/multi_factor_auth/authentication_factor_enrolled_totp.rb', line 15

def user
  @user
end