Class: Twilio::REST::Content::V1::ContentList::CardAction
- Inherits:
-
Object
- Object
- Twilio::REST::Content::V1::ContentList::CardAction
- Defined in:
- lib/twilio-ruby/rest/content/v1/content.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(payload) ⇒ CardAction
constructor
A new instance of CardAction.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(payload) ⇒ CardAction
Returns a new instance of CardAction.
70 71 72 73 74 75 76 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 70 def initialize(payload) @type = payload["type"] @title = payload["title"] @url = payload["url"] @phone = payload["phone"] @id = payload["id"] end |
Instance Attribute Details
#id ⇒ Object
69 70 71 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 69 def id @id end |
#phone ⇒ Object
69 70 71 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 69 def phone @phone end |
#title ⇒ Object
69 70 71 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 69 def title @title end |
#type ⇒ Object
69 70 71 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 69 def type @type end |
#url ⇒ Object
69 70 71 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 69 def url @url end |
Instance Method Details
#to_json(options = {}) ⇒ Object
77 78 79 80 81 82 83 84 85 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 77 def to_json( = {}) { type: @type, title: @title, url: @url, phone: @phone, id: @id, }.to_json() end |