Class: Twilio::REST::Content::V1::ContentList::CarouselAction

Inherits:
Object
  • Object
show all
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

Constructor Details

#initialize(payload) ⇒ CarouselAction

Returns a new instance of CarouselAction.



107
108
109
110
111
112
113
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 107

def initialize(payload)
        @type = payload["type"]
        @title = payload["title"]
        @url = payload["url"]
        @phone = payload["phone"]
        @id = payload["id"]
end

Instance Attribute Details

#id ⇒ Object

Parameters:

  • : (type) —

    [CarouselActionType]

  • : (title) —

    [String]

  • : (url) —

    [String]

  • : (phone) —

    [String]

  • : (id) —

    [String]



106
107
108
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 106

def id
  @id
end

#phone ⇒ Object

Parameters:

  • : (type) —

    [CarouselActionType]

  • : (title) —

    [String]

  • : (url) —

    [String]

  • : (phone) —

    [String]

  • : (id) —

    [String]



106
107
108
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 106

def phone
  @phone
end

#title ⇒ Object

Parameters:

  • : (type) —

    [CarouselActionType]

  • : (title) —

    [String]

  • : (url) —

    [String]

  • : (phone) —

    [String]

  • : (id) —

    [String]



106
107
108
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 106

def title
  @title
end

#type ⇒ Object

Parameters:

  • : (type) —

    [CarouselActionType]

  • : (title) —

    [String]

  • : (url) —

    [String]

  • : (phone) —

    [String]

  • : (id) —

    [String]



106
107
108
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 106

def type
  @type
end

#url ⇒ Object

Parameters:

  • : (type) —

    [CarouselActionType]

  • : (title) —

    [String]

  • : (url) —

    [String]

  • : (phone) —

    [String]

  • : (id) —

    [String]



106
107
108
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 106

def url
  @url
end

Instance Method Details

#to_json(options = {}) ⇒ Object



114
115
116
117
118
119
120
121
122
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 114

def to_json(options = {})
{
        "type": @type,
        "title": @title,
        "url": @url,
        "phone": @phone,
        "id": @id,
}.to_json(options)
end