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.



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

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

Instance Attribute Details

#codeObject

Parameters:

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


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

def code
  @code
end

#idObject

Parameters:

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


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

def id
  @id
end

#phoneObject

Parameters:

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


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

def phone
  @phone
end

#titleObject

Parameters:

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


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

def title
  @title
end

#typeObject

Parameters:

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


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

def type
  @type
end

#urlObject

Parameters:

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


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

def url
  @url
end

Instance Method Details

#to_json(options = {}) ⇒ Object



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

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