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.
317 318 319 320 321 322 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 317 def initialize(payload) @title = payload["title"] @subtitle = payload["subtitle"] @media = payload["media"] @actions = payload["actions"] end |
Instance Attribute Details
#actions ⇒ Object
316 317 318 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 316 def actions @actions end |
#media ⇒ Object
316 317 318 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 316 def media @media end |
#subtitle ⇒ Object
316 317 318 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 316 def subtitle @subtitle end |
#title ⇒ Object
316 317 318 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 316 def title @title end |
Instance Method Details
#to_json(options = {}) ⇒ Object
323 324 325 326 327 328 329 330 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 323 def to_json( = {}) { "title": @title, "subtitle": @subtitle, "media": @media, "actions": @actions, }.to_json() end |