Class: Twilio::REST::Content::V1::ContentList::TwilioCallToAction

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

Returns a new instance of TwilioCallToAction.



293
294
295
296
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 293

def initialize(payload)
        @body = payload["body"]
        @actions = payload["actions"]
end

Instance Attribute Details

#actionsObject

Parameters:

  • : (body)
    String
  • : (actions)
    Array<ContentList.CallToActionAction>


292
293
294
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 292

def actions
  @actions
end

#bodyObject

Parameters:

  • : (body)
    String
  • : (actions)
    Array<ContentList.CallToActionAction>


292
293
294
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 292

def body
  @body
end

Instance Method Details

#to_json(options = {}) ⇒ Object



297
298
299
300
301
302
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 297

def to_json(options = {})
{
        "body": @body,
        "actions": @actions,
}.to_json(options)
end