Class: Twilio::REST::Content::V1::ContentList::CarouselCard
- Inherits:
-
Object
- Object
- Twilio::REST::Content::V1::ContentList::CarouselCard
- Defined in:
- lib/twilio-ruby/rest/content/v1/content.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(payload) ⇒ CarouselCard
constructor
A new instance of CarouselCard.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(payload) ⇒ CarouselCard
Returns a new instance of CarouselCard.
122 123 124 125 126 127 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 122 def initialize(payload) @title = payload["title"] @body = payload["body"] @media = payload["media"] @actions = payload["actions"] end |
Instance Attribute Details
#actions ⇒ Object
121 122 123 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 121 def actions @actions end |
#body ⇒ Object
121 122 123 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 121 def body @body end |
#media ⇒ Object
121 122 123 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 121 def media @media end |
#title ⇒ Object
121 122 123 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 121 def title @title end |
Instance Method Details
#to_json(options = {}) ⇒ Object
128 129 130 131 132 133 134 135 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 128 def to_json( = {}) { "title": @title, "body": @body, "media": @media, "actions": @actions, }.to_json() end |