Class: Twilio::REST::Content::V1::ContentList::TwilioCard
- Inherits:
-
Object
- Object
- Twilio::REST::Content::V1::ContentList::TwilioCard
- Defined in:
- lib/twilio-ruby/rest/content/v1/content.rb,
lib/twilio-ruby/rest/content/v1/content.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(payload) ⇒ TwilioCard
constructor
A new instance of TwilioCard.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(payload) ⇒ TwilioCard
Returns a new instance of TwilioCard.
320 321 322 323 324 325 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 320 def initialize(payload) @title = payload["title"] @subtitle = payload["subtitle"] @media = payload["media"] @actions = payload["actions"] end |
Instance Attribute Details
#actions ⇒ Object
319 320 321 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 319 def actions @actions end |
#media ⇒ Object
319 320 321 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 319 def media @media end |
#subtitle ⇒ Object
319 320 321 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 319 def subtitle @subtitle end |
#title ⇒ Object
319 320 321 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 319 def title @title end |
Instance Method Details
#to_json(options = {}) ⇒ Object
326 327 328 329 330 331 332 333 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 326 def to_json( = {}) { "title": @title, "subtitle": @subtitle, "media": @media, "actions": @actions, }.to_json() end |