Class: Twilio::REST::Content::V1::ContentList::CallToActionAction
- Inherits:
-
Object
- Object
- Twilio::REST::Content::V1::ContentList::CallToActionAction
- Defined in:
- lib/twilio-ruby/rest/content/v1/content.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(payload) ⇒ CallToActionAction
constructor
A new instance of CallToActionAction.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(payload) ⇒ CallToActionAction
Returns a new instance of CallToActionAction.
45 46 47 48 49 50 51 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 45 def initialize(payload) @type = payload["type"] @title = payload["title"] @url = payload["url"] @phone = payload["phone"] @id = payload["id"] end |
Instance Attribute Details
#id ⇒ Object
44 45 46 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 44 def id @id end |
#phone ⇒ Object
44 45 46 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 44 def phone @phone end |
#title ⇒ Object
44 45 46 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 44 def title @title end |
#type ⇒ Object
44 45 46 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 44 def type @type end |
#url ⇒ Object
44 45 46 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 44 def url @url end |
Instance Method Details
#to_json(options = {}) ⇒ Object
52 53 54 55 56 57 58 59 60 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 52 def to_json( = {}) { type: @type, title: @title, url: @url, phone: @phone, id: @id, }.to_json() end |