Class: Twilio::REST::Content::V1::ContentList::CallToActionAction

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) ⇒ 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"]
        @code = payload["code"]
end

Instance Attribute Details

#codeObject

Parameters:

  • : (type)
    CallToActionActionType
  • : (title)
    String
  • : (url)
    String
  • : (phone)
    String
  • : (code)
    String


44
45
46
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 44

def code
  @code
end

#phoneObject

Parameters:

  • : (type)
    CallToActionActionType
  • : (title)
    String
  • : (url)
    String
  • : (phone)
    String
  • : (code)
    String


44
45
46
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 44

def phone
  @phone
end

#titleObject

Parameters:

  • : (type)
    CallToActionActionType
  • : (title)
    String
  • : (url)
    String
  • : (phone)
    String
  • : (code)
    String


44
45
46
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 44

def title
  @title
end

#typeObject

Parameters:

  • : (type)
    CallToActionActionType
  • : (title)
    String
  • : (url)
    String
  • : (phone)
    String
  • : (code)
    String


44
45
46
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 44

def type
  @type
end

#urlObject

Parameters:

  • : (type)
    CallToActionActionType
  • : (title)
    String
  • : (url)
    String
  • : (phone)
    String
  • : (code)
    String


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(options = {})
{
        "type": @type,
        "title": @title,
        "url": @url,
        "phone": @phone,
        "code": @code,
}.to_json(options)
end