Class: Appwrite::Models::MfaChallenge

Inherits:
Object
  • Object
show all
Defined in:
lib/appwrite/models/mfa_challenge.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, created_at:, user_id:, expire:) ⇒ MfaChallenge

Returns a new instance of MfaChallenge.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/appwrite/models/mfa_challenge.rb', line 11

def initialize(
    id:,
    created_at:,
    user_id:,
    expire:
)
    @id = id
    @created_at = created_at
    @user_id = user_id
    @expire = expire
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



7
8
9
# File 'lib/appwrite/models/mfa_challenge.rb', line 7

def created_at
  @created_at
end

#expireObject (readonly)

Returns the value of attribute expire.



9
10
11
# File 'lib/appwrite/models/mfa_challenge.rb', line 9

def expire
  @expire
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/appwrite/models/mfa_challenge.rb', line 6

def id
  @id
end

#user_idObject (readonly)

Returns the value of attribute user_id.



8
9
10
# File 'lib/appwrite/models/mfa_challenge.rb', line 8

def user_id
  @user_id
end

Class Method Details

.from(map:) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/appwrite/models/mfa_challenge.rb', line 23

def self.from(map:)
    MfaChallenge.new(
        id: map["$id"],
        created_at: map["$createdAt"],
        user_id: map["userId"],
        expire: map["expire"]
    )
end

Instance Method Details

#to_mapObject



32
33
34
35
36
37
38
39
# File 'lib/appwrite/models/mfa_challenge.rb', line 32

def to_map
    {
        "$id": @id,
        "$createdAt": @created_at,
        "userId": @user_id,
        "expire": @expire
    }
end