Class: Twilio::REST::Content::V1::ContentList::WhatsappCard

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

Returns a new instance of WhatsappCard.



554
555
556
557
558
559
560
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 554

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

Instance Attribute Details

#actionsObject

Parameters:



553
554
555
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 553

def actions
  @actions
end

#bodyObject

Parameters:



553
554
555
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 553

def body
  @body
end

Parameters:



553
554
555
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 553

def footer
  @footer
end

#header_textObject

Parameters:



553
554
555
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 553

def header_text
  @header_text
end

#mediaObject

Parameters:



553
554
555
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 553

def media
  @media
end

Instance Method Details

#to_json(options = {}) ⇒ Object



561
562
563
564
565
566
567
568
569
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 561

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