Class: Twilio::REST::Content::V1::ContentList::TwilioMedia

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

Returns a new instance of TwilioMedia.



441
442
443
444
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 441

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

Instance Attribute Details

#bodyObject

Parameters:

  • : (body)
    String
  • : (media)
    Array<String>


440
441
442
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 440

def body
  @body
end

#mediaObject

Parameters:

  • : (body)
    String
  • : (media)
    Array<String>


440
441
442
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 440

def media
  @media
end

Instance Method Details

#to_json(options = {}) ⇒ Object



445
446
447
448
449
450
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 445

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