Class: Twilio::REST::Content::V1::ContentList::TwilioCarousel
- Inherits:
-
Object
- Object
- Twilio::REST::Content::V1::ContentList::TwilioCarousel
- 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) ⇒ TwilioCarousel
constructor
A new instance of TwilioCarousel.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(payload) ⇒ TwilioCarousel
Returns a new instance of TwilioCarousel.
337 338 339 340 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 337 def initialize(payload) @body = payload["body"] @cards = payload["cards"] end |
Instance Attribute Details
#body ⇒ Object
336 337 338 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 336 def body @body end |
#cards ⇒ Object
336 337 338 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 336 def cards @cards end |
Instance Method Details
#to_json(options = {}) ⇒ Object
341 342 343 344 345 346 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 341 def to_json( = {}) { "body": @body, "cards": @cards, }.to_json() end |