Class: Twilio::REST::Content::V1::ContentList::TwilioMedia
- Inherits:
-
Object
- Object
- Twilio::REST::Content::V1::ContentList::TwilioMedia
- Defined in:
- lib/twilio-ruby/rest/content/v1/content.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(payload) ⇒ TwilioMedia
constructor
A new instance of TwilioMedia.
- #to_json(options = {}) ⇒ Object
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
#body ⇒ Object
440 441 442 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 440 def body @body end |
#media ⇒ Object
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( = {}) { "body": @body, "media": @media, }.to_json() end |