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.



46
47
48
49
50
51
52
53
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 46

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

Instance Attribute Details

#codeObject

Parameters:

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


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

def code
  @code
end

#idObject

Parameters:

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


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

def id
  @id
end

#phoneObject

Parameters:

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


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

def phone
  @phone
end

#titleObject

Parameters:

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


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

def title
  @title
end

#typeObject

Parameters:

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


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

def type
  @type
end

#urlObject

Parameters:

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


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

def url
  @url
end

Instance Method Details

#to_json(options = {}) ⇒ Object



54
55
56
57
58
59
60
61
62
63
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 54

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