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