Class: Twilio::REST::Content::V1::ContentList::TwilioListPicker

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

Returns a new instance of TwilioListPicker.



404
405
406
407
408
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 404

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

Instance Attribute Details

#bodyObject

Parameters:

  • : (body)
    String
  • : (button)
    String
  • : (items)
    Array<ContentList.ListItem>


403
404
405
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 403

def body
  @body
end

#buttonObject

Parameters:

  • : (body)
    String
  • : (button)
    String
  • : (items)
    Array<ContentList.ListItem>


403
404
405
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 403

def button
  @button
end

#itemsObject

Parameters:

  • : (body)
    String
  • : (button)
    String
  • : (items)
    Array<ContentList.ListItem>


403
404
405
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 403

def items
  @items
end

Instance Method Details

#to_json(options = {}) ⇒ Object



409
410
411
412
413
414
415
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 409

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