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:



302
303
304
305
306
307
308
309
310
311
312
# File 'lib/twilio-ruby/rest/content/v2/content_and_approvals.rb', line 302

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



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

def content_and_approvals
    @content_and_approvals
end

#headersObject



318
319
320
# File 'lib/twilio-ruby/rest/content/v2/content_and_approvals.rb', line 318

def headers
  @headers
end

#status_codeObject



322
323
324
# File 'lib/twilio-ruby/rest/content/v2/content_and_approvals.rb', line 322

def status_code
  @status_code
end