Class: Twilio::REST::Content::V1::ContentList::CardAction

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

Returns a new instance of CardAction.



75
76
77
78
79
80
81
82
83
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 75

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

Instance Attribute Details

#codeObject

Parameters:



74
75
76
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 74

def code
  @code
end

#idObject

Parameters:



74
75
76
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 74

def id
  @id
end

#phoneObject

Parameters:



74
75
76
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 74

def phone
  @phone
end

#titleObject

Parameters:



74
75
76
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 74

def title
  @title
end

#typeObject

Parameters:



74
75
76
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 74

def type
  @type
end

#urlObject

Parameters:



74
75
76
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 74

def url
  @url
end

#webview_sizeObject

Parameters:



74
75
76
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 74

def webview_size
  @webview_size
end

Instance Method Details

#to_json(options = {}) ⇒ Object



84
85
86
87
88
89
90
91
92
93
94
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 84

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