Class: Twilio::REST::Content::V1::ContentList::CarouselCard

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) ⇒ 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

#actionsObject

Parameters:

  • : (title)
    String
  • : (body)
    String
  • : (media)
    String
  • : (actions)
    Array<ContentList.CarouselAction>


121
122
123
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 121

def actions
  @actions
end

#bodyObject

Parameters:

  • : (title)
    String
  • : (body)
    String
  • : (media)
    String
  • : (actions)
    Array<ContentList.CarouselAction>


121
122
123
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 121

def body
  @body
end

#mediaObject

Parameters:

  • : (title)
    String
  • : (body)
    String
  • : (media)
    String
  • : (actions)
    Array<ContentList.CarouselAction>


121
122
123
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 121

def media
  @media
end

#titleObject

Parameters:

  • : (title)
    String
  • : (body)
    String
  • : (media)
    String
  • : (actions)
    Array<ContentList.CarouselAction>


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(options = {})
{
        "title": @title,
        "body": @body,
        "media": @media,
        "actions": @actions,
}.to_json(options)
end