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