Class: Twilio::REST::Content::V2::ContentAndApprovalsListResponse

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ContentAndApprovalsListResponse.

Parameters:



294
295
296
297
298
299
300
301
302
303
304
# File 'lib/twilio-ruby/rest/content/v2/content_and_approvals.rb', line 294

def initialize(version, payload, key, limit = :unset)
  data_list = payload.body[key]
  if limit != :unset
    data_list = data_list[0, limit]
  end
  @content_and_approvals = data_list.map do |data|
    ContentAndApprovalsInstance.new(version, data)
  end
  @headers = payload.headers
  @status_code = payload.status_code
end

Instance Method Details

#content_and_approvalsObject



306
307
308
# File 'lib/twilio-ruby/rest/content/v2/content_and_approvals.rb', line 306

def content_and_approvals
    @content_and_approvals
end

#headersObject



310
311
312
# File 'lib/twilio-ruby/rest/content/v2/content_and_approvals.rb', line 310

def headers
  @headers
end

#status_codeObject



314
315
316
# File 'lib/twilio-ruby/rest/content/v2/content_and_approvals.rb', line 314

def status_code
  @status_code
end