Class: WhatsAppCloudApi::Footer
- Defined in:
- lib/whats_app_cloud_api/models/footer.rb
Overview
Footer Model.
Instance Attribute Summary collapse
-
#text ⇒ String
The footer content.
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(text = nil) ⇒ Footer
constructor
A new instance of Footer.
-
#nullables ⇒ Object
An array for nullable fields.
-
#optionals ⇒ Object
An array for optional fields.
Methods inherited from BaseModel
Constructor Details
#initialize(text = nil) ⇒ Footer
Returns a new instance of Footer.
34 35 36 |
# File 'lib/whats_app_cloud_api/models/footer.rb', line 34 def initialize(text = nil) @text = text unless text == SKIP end |
Instance Attribute Details
#text ⇒ String
The footer content. Emojis and markdown are supported. Links are supported.
15 16 17 |
# File 'lib/whats_app_cloud_api/models/footer.rb', line 15 def text @text end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
39 40 41 42 43 44 45 46 47 |
# File 'lib/whats_app_cloud_api/models/footer.rb', line 39 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. text = hash.key?('text') ? hash['text'] : SKIP # Create object from extracted values. .new(text) end |
.names ⇒ Object
A mapping from model property names to API property names.
18 19 20 21 22 |
# File 'lib/whats_app_cloud_api/models/footer.rb', line 18 def self.names @_hash = {} if @_hash.nil? @_hash['text'] = 'text' @_hash end |
Instance Method Details
#nullables ⇒ Object
An array for nullable fields
30 31 32 |
# File 'lib/whats_app_cloud_api/models/footer.rb', line 30 def nullables [] end |
#optionals ⇒ Object
An array for optional fields
25 26 27 |
# File 'lib/whats_app_cloud_api/models/footer.rb', line 25 def optionals [] end |