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