Class: WhatsAppCloudApi::GetPhoneNumberByIDResponse
- Defined in:
- lib/whats_app_cloud_api/models/get_phone_number_by_id_response.rb
Overview
GetPhoneNumberByIDResponse Model.
Instance Attribute Summary collapse
-
#display_phone_number ⇒ String
The string representation of the phone number.
-
#id ⇒ String
The ID associated with the phone number.
-
#quality_rating ⇒ QualityRatingEnum
The quality rating of the phone number based on how messages have been received by recipients in recent days.
-
#verified_name ⇒ String
The verified name associated with the phone number.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
Instance Method Summary collapse
-
#initialize(verified_name = nil, display_phone_number = nil, id = nil, quality_rating = nil) ⇒ GetPhoneNumberByIDResponse
constructor
A new instance of GetPhoneNumberByIDResponse.
-
#nullables ⇒ Object
An array for nullable fields.
-
#optionals ⇒ Object
An array for optional fields.
Methods inherited from BaseModel
Constructor Details
#initialize(verified_name = nil, display_phone_number = nil, id = nil, quality_rating = nil) ⇒ GetPhoneNumberByIDResponse
Returns a new instance of GetPhoneNumberByIDResponse.
49 50 51 52 53 54 55 56 57 |
# File 'lib/whats_app_cloud_api/models/get_phone_number_by_id_response.rb', line 49 def initialize(verified_name = nil, display_phone_number = nil, id = nil, = nil) @verified_name = verified_name unless verified_name == SKIP @display_phone_number = display_phone_number unless display_phone_number == SKIP @id = id unless id == SKIP @quality_rating = unless == SKIP end |
Instance Attribute Details
#display_phone_number ⇒ String
The string representation of the phone number.
18 19 20 |
# File 'lib/whats_app_cloud_api/models/get_phone_number_by_id_response.rb', line 18 def display_phone_number @display_phone_number end |
#id ⇒ String
The ID associated with the phone number.
22 23 24 |
# File 'lib/whats_app_cloud_api/models/get_phone_number_by_id_response.rb', line 22 def id @id end |
#quality_rating ⇒ QualityRatingEnum
The quality rating of the phone number based on how messages have been received by recipients in recent days.
27 28 29 |
# File 'lib/whats_app_cloud_api/models/get_phone_number_by_id_response.rb', line 27 def @quality_rating end |
#verified_name ⇒ String
The verified name associated with the phone number.
14 15 16 |
# File 'lib/whats_app_cloud_api/models/get_phone_number_by_id_response.rb', line 14 def verified_name @verified_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/whats_app_cloud_api/models/get_phone_number_by_id_response.rb', line 60 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. verified_name = hash.key?('verified_name') ? hash['verified_name'] : SKIP display_phone_number = hash.key?('display_phone_number') ? hash['display_phone_number'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP = hash.key?('quality_rating') ? hash['quality_rating'] : SKIP # Create object from extracted values. GetPhoneNumberByIDResponse.new(verified_name, display_phone_number, id, ) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 36 37 |
# File 'lib/whats_app_cloud_api/models/get_phone_number_by_id_response.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['verified_name'] = 'verified_name' @_hash['display_phone_number'] = 'display_phone_number' @_hash['id'] = 'id' @_hash['quality_rating'] = 'quality_rating' @_hash end |
Instance Method Details
#nullables ⇒ Object
An array for nullable fields
45 46 47 |
# File 'lib/whats_app_cloud_api/models/get_phone_number_by_id_response.rb', line 45 def nullables [] end |
#optionals ⇒ Object
An array for optional fields
40 41 42 |
# File 'lib/whats_app_cloud_api/models/get_phone_number_by_id_response.rb', line 40 def optionals [] end |