Class: Twilio::REST::Content::V1::ContentList::WhatsappCard
- Inherits:
-
Object
- Object
- Twilio::REST::Content::V1::ContentList::WhatsappCard
- Defined in:
- lib/twilio-ruby/rest/content/v1/content.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(payload) ⇒ WhatsappCard
constructor
A new instance of WhatsappCard.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(payload) ⇒ WhatsappCard
Returns a new instance of WhatsappCard.
566 567 568 569 570 571 572 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 566 def initialize(payload) @body = payload["body"] = payload["footer"] @media = payload["media"] @header_text = payload["header_text"] @actions = payload["actions"] end |
Instance Attribute Details
#actions ⇒ Object
565 566 567 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 565 def actions @actions end |
#body ⇒ Object
565 566 567 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 565 def body @body end |
#footer ⇒ Object
565 566 567 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 565 def end |
#header_text ⇒ Object
565 566 567 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 565 def header_text @header_text end |
#media ⇒ Object
565 566 567 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 565 def media @media end |
Instance Method Details
#to_json(options = {}) ⇒ Object
573 574 575 576 577 578 579 580 581 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 573 def to_json( = {}) { "body": @body, "footer": , "media": @media, "header_text": @header_text, "actions": @actions, }.to_json() end |