Class: Virgil::SDK::HighLevel::VirgilIdentity::EmailConfirmation
- Inherits:
-
Object
- Object
- Virgil::SDK::HighLevel::VirgilIdentity::EmailConfirmation
- Defined in:
- lib/virgil/sdk/high_level/virgil_identity/email_confirmation.rb
Overview
This class provides a logic to confirm the email identity.
Instance Attribute Summary collapse
-
#confirmation_code ⇒ Object
readonly
Returns the value of attribute confirmation_code.
Instance Method Summary collapse
-
#confirm_and_grab_validation_token(verification_attempt, client) ⇒ String
Confirms the identity using confirmation code, that has been generated to confirm an identity.
-
#initialize(confirmation_code) ⇒ EmailConfirmation
constructor
Initializes a new instance of the EmailConfirmation class.
Constructor Details
#initialize(confirmation_code) ⇒ EmailConfirmation
Initializes a new instance of the Virgil::SDK::HighLevel::VirgilIdentity::EmailConfirmation class
45 46 47 |
# File 'lib/virgil/sdk/high_level/virgil_identity/email_confirmation.rb', line 45 def initialize(confirmation_code) @confirmation_code = confirmation_code end |
Instance Attribute Details
#confirmation_code ⇒ Object (readonly)
Returns the value of attribute confirmation_code
41 42 43 |
# File 'lib/virgil/sdk/high_level/virgil_identity/email_confirmation.rb', line 41 def confirmation_code @confirmation_code end |
Instance Method Details
#confirm_and_grab_validation_token(verification_attempt, client) ⇒ String
Confirms the identity using confirmation code, that has been generated to confirm an identity.
53 54 55 56 57 58 59 60 61 |
# File 'lib/virgil/sdk/high_level/virgil_identity/email_confirmation.rb', line 53 def confirm_and_grab_validation_token(verification_attempt, client) token = client.confirm_identity(verification_attempt.action_id, confirmation_code, verification_attempt..time_to_live, verification_attempt..count_to_live ) token end |