Class: WorkOS::AuthenticationFactorTotp

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

Constant Summary collapse

HASH_ATTRS =
{
  issuer: :issuer,
  user: :user
}.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) ⇒ AuthenticationFactorTotp

Returns a new instance of AuthenticationFactorTotp.



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

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

Instance Attribute Details

#issuerObject

Returns the value of attribute issuer.



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

def issuer
  @issuer
end

#userObject

Returns the value of attribute user.



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

def user
  @user
end