Class: Appwrite::Models::MfaFactors
- Inherits:
-
Object
- Object
- Appwrite::Models::MfaFactors
- Defined in:
- lib/appwrite/models/mfa_factors.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#recovery_code ⇒ Object
readonly
Returns the value of attribute recovery_code.
-
#totp ⇒ Object
readonly
Returns the value of attribute totp.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(totp:, phone:, email:, recovery_code:) ⇒ MfaFactors
constructor
A new instance of MfaFactors.
- #to_map ⇒ Object
Constructor Details
#initialize(totp:, phone:, email:, recovery_code:) ⇒ MfaFactors
Returns a new instance of MfaFactors.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/appwrite/models/mfa_factors.rb', line 11 def initialize( totp:, phone:, email:, recovery_code: ) @totp = totp @phone = phone @email = email @recovery_code = recovery_code end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
8 9 10 |
# File 'lib/appwrite/models/mfa_factors.rb', line 8 def email @email end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
7 8 9 |
# File 'lib/appwrite/models/mfa_factors.rb', line 7 def phone @phone end |
#recovery_code ⇒ Object (readonly)
Returns the value of attribute recovery_code.
9 10 11 |
# File 'lib/appwrite/models/mfa_factors.rb', line 9 def recovery_code @recovery_code end |
#totp ⇒ Object (readonly)
Returns the value of attribute totp.
6 7 8 |
# File 'lib/appwrite/models/mfa_factors.rb', line 6 def totp @totp end |
Class Method Details
.from(map:) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/appwrite/models/mfa_factors.rb', line 23 def self.from(map:) MfaFactors.new( totp: map["totp"], phone: map["phone"], email: map["email"], recovery_code: map["recoveryCode"] ) end |
Instance Method Details
#to_map ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/appwrite/models/mfa_factors.rb', line 32 def to_map { "totp": @totp, "phone": @phone, "email": @email, "recoveryCode": @recovery_code } end |