Class: Twilio::REST::Content::V1::ContentList::CarouselAction
- Inherits:
-
Object
- Object
- Twilio::REST::Content::V1::ContentList::CarouselAction
- Defined in:
- lib/twilio-ruby/rest/content/v1/content.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(payload) ⇒ CarouselAction
constructor
A new instance of CarouselAction.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(payload) ⇒ CarouselAction
Returns a new instance of CarouselAction.
104 105 106 107 108 109 110 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 104 def initialize(payload) @type = payload["type"] @title = payload["title"] @url = payload["url"] @phone = payload["phone"] @id = payload["id"] end |
Instance Attribute Details
#id ⇒ Object
103 104 105 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 103 def id @id end |
#phone ⇒ Object
103 104 105 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 103 def phone @phone end |
#title ⇒ Object
103 104 105 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 103 def title @title end |
#type ⇒ Object
103 104 105 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 103 def type @type end |
#url ⇒ Object
103 104 105 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 103 def url @url end |
Instance Method Details
#to_json(options = {}) ⇒ Object
111 112 113 114 115 116 117 118 119 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 111 def to_json( = {}) { "type": @type, "title": @title, "url": @url, "phone": @phone, "id": @id, }.to_json() end |