Class: Appwrite::Models::MockNumber

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(phone:, otp:) ⇒ MockNumber

Returns a new instance of MockNumber.



9
10
11
12
13
14
15
# File 'lib/appwrite/models/mock_number.rb', line 9

def initialize(
    phone:,
    otp:
)
    @phone = phone
    @otp = otp
end

Instance Attribute Details

#otpObject (readonly)

Returns the value of attribute otp.



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

def otp
  @otp
end

#phoneObject (readonly)

Returns the value of attribute phone.



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

def phone
  @phone
end

Class Method Details

.from(map:) ⇒ Object



17
18
19
20
21
22
# File 'lib/appwrite/models/mock_number.rb', line 17

def self.from(map:)
    MockNumber.new(
        phone: map["phone"],
        otp: map["otp"]
    )
end

Instance Method Details

#to_mapObject



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

def to_map
    {
        "phone": @phone,
        "otp": @otp
    }
end