Class: Twilio::REST::Content::V1::ContentListResponse

Inherits:
InstanceListResource show all
Defined in:
lib/twilio-ruby/rest/content/v1/content.rb,
lib/twilio-ruby/rest/content/v1/content.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, key, limit = :unset) ⇒ ContentListResponse

Returns a new instance of ContentListResponse.

Parameters:

  • instance (Array<ContentInstance>)
  • headers (Hash{String => Object})
  • status_code (Integer)


1664
1665
1666
1667
1668
1669
1670
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 1664

def initialize(version, payload, key)
   @content_instance = payload.body[key].map do |data|
    ContentInstance.new(version, data)
   end
   @headers = payload.headers
   @status_code = payload.status_code
end

Instance Method Details

#contentObject



1753
1754
1755
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 1753

def content
    @content
end

#content_instanceObject



1672
1673
1674
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 1672

def content_instance
    @instance
end

#headersObject



1757
1758
1759
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 1757

def headers
  @headers
end

#status_codeObject



1761
1762
1763
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 1761

def status_code
  @status_code
end