Class: Twilio::REST::Content::V1::ContentList::TwilioCard

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

Returns a new instance of TwilioCard.



311
312
313
314
315
316
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 311

def initialize(payload)
        @title = payload["title"]
        @subtitle = payload["subtitle"]
        @media = payload["media"]
        @actions = payload["actions"]
end

Instance Attribute Details

#actionsObject

Parameters:



310
311
312
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 310

def actions
  @actions
end

#mediaObject

Parameters:



310
311
312
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 310

def media
  @media
end

#subtitleObject

Parameters:



310
311
312
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 310

def subtitle
  @subtitle
end

#titleObject

Parameters:



310
311
312
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 310

def title
  @title
end

Instance Method Details

#to_json(options = {}) ⇒ Object



317
318
319
320
321
322
323
324
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 317

def to_json(options = {})
{
        "title": @title,
        "subtitle": @subtitle,
        "media": @media,
        "actions": @actions,
}.to_json(options)
end