Class: Virgil::SDK::HighLevel::VirgilIdentity::VerificationAttempt

Inherits:
Object
  • Object
show all
Defined in:
lib/virgil/sdk/high_level/virgil_identity/verification_attempt.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context:, action_id:, identity:, identity_type:, additional_options: nil) ⇒ VerificationAttempt

Returns a new instance of VerificationAttempt.



41
42
43
44
45
46
47
# File 'lib/virgil/sdk/high_level/virgil_identity/verification_attempt.rb', line 41

def initialize(context:, action_id:, identity:, identity_type:, additional_options: nil)
  @context = context
  @action_id = action_id
  @identity = identity
  @identity_type = identity_type
  @additional_options = additional_options || VerificationOptions.new
end

Instance Attribute Details

#action_idObject (readonly)

Returns the value of attribute action_id.



39
40
41
# File 'lib/virgil/sdk/high_level/virgil_identity/verification_attempt.rb', line 39

def action_id
  @action_id
end

#additional_optionsObject (readonly)

Returns the value of attribute additional_options.



39
40
41
# File 'lib/virgil/sdk/high_level/virgil_identity/verification_attempt.rb', line 39

def additional_options
  @additional_options
end

#contextObject (readonly)

Returns the value of attribute context.



39
40
41
# File 'lib/virgil/sdk/high_level/virgil_identity/verification_attempt.rb', line 39

def context
  @context
end

#identityObject (readonly)

Returns the value of attribute identity.



39
40
41
# File 'lib/virgil/sdk/high_level/virgil_identity/verification_attempt.rb', line 39

def identity
  @identity
end

#identity_typeObject (readonly)

Returns the value of attribute identity_type.



39
40
41
# File 'lib/virgil/sdk/high_level/virgil_identity/verification_attempt.rb', line 39

def identity_type
  @identity_type
end

Instance Method Details

#confirm(confirmation) ⇒ Object



50
51
52
53
54
55
# File 'lib/virgil/sdk/high_level/virgil_identity/verification_attempt.rb', line 50

def confirm(confirmation)
  raise ConfirmationIsNotValid unless confirmation
  token = confirmation.confirm_and_grab_validation_token(self, self.context.client)
  ValidationToken.new(token)

end