class Appwrite::Models::Phone

Attributes

code[R]
country_code[R]
country_name[R]

Public Class Methods

from(map:) click to toggle source
# File lib/appwrite/models/phone.rb, line 20
def self.from(map:)
    Phone.new(
        code: map["code"],
        country_code: map["countryCode"],
        country_name: map["countryName"]
    )
end
new( code:, country_code:, country_name: ) click to toggle source
# File lib/appwrite/models/phone.rb, line 10
def initialize(
    code:,
    country_code:,
    country_name:
)
    @code = code
    @country_code = country_code
    @country_name = country_name
end

Public Instance Methods

to_map() click to toggle source
# File lib/appwrite/models/phone.rb, line 28
def to_map
    {
        "code": @code,
        "countryCode": @country_code,
        "countryName": @country_name
    }
end