Class: WhatsAppCloudApi::ResponseContact
- Defined in:
- lib/whats_app_cloud_api/models/response_contact.rb
Overview
ResponseContact Model.
Instance Attribute Summary collapse
-
#input ⇒ String
TODO: Write general description for this method.
-
#wa_id ⇒ String
TODO: Write general description for this method.
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(input = nil, wa_id = nil) ⇒ ResponseContact
constructor
A new instance of ResponseContact.
-
#nullables ⇒ Object
An array for nullable fields.
-
#optionals ⇒ Object
An array for optional fields.
Methods inherited from BaseModel
Constructor Details
#initialize(input = nil, wa_id = nil) ⇒ ResponseContact
Returns a new instance of ResponseContact.
38 39 40 41 42 |
# File 'lib/whats_app_cloud_api/models/response_contact.rb', line 38 def initialize(input = nil, wa_id = nil) @input = input unless input == SKIP @wa_id = wa_id unless wa_id == SKIP end |
Instance Attribute Details
#input ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/whats_app_cloud_api/models/response_contact.rb', line 14 def input @input end |
#wa_id ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/whats_app_cloud_api/models/response_contact.rb', line 18 def wa_id @wa_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/whats_app_cloud_api/models/response_contact.rb', line 45 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. input = hash.key?('input') ? hash['input'] : SKIP wa_id = hash.key?('wa_id') ? hash['wa_id'] : SKIP # Create object from extracted values. ResponseContact.new(input, wa_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/whats_app_cloud_api/models/response_contact.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['input'] = 'input' @_hash['wa_id'] = 'wa_id' @_hash end |
Instance Method Details
#nullables ⇒ Object
An array for nullable fields
34 35 36 |
# File 'lib/whats_app_cloud_api/models/response_contact.rb', line 34 def nullables [] end |
#optionals ⇒ Object
An array for optional fields
29 30 31 |
# File 'lib/whats_app_cloud_api/models/response_contact.rb', line 29 def optionals [] end |