Class: Twilio::REST::Content::V1::ContentList::TwilioCarousel

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/content/v1/content.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ TwilioCarousel

Returns a new instance of TwilioCarousel.



312
313
314
315
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 312

def initialize(payload)
        @body = payload["body"]
        @cards = payload["cards"]
end

Instance Attribute Details

#bodyObject

Parameters:

  • : (body)
    String
  • : (cards)
    Array<ContentList.CarouselCard>


311
312
313
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 311

def body
  @body
end

#cardsObject

Parameters:

  • : (body)
    String
  • : (cards)
    Array<ContentList.CarouselCard>


311
312
313
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 311

def cards
  @cards
end

Instance Method Details

#to_json(options = {}) ⇒ Object



316
317
318
319
320
321
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 316

def to_json(options = {})
{
        "body": @body,
        "cards": @cards,
}.to_json(options)
end