Class: Twilio::REST::Content::V1::ContentAndApprovalsListResponse

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ContentAndApprovalsListResponse.

Parameters:



216
217
218
219
220
221
222
223
224
225
226
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 216

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



228
229
230
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 228

def content_and_approvals
    @content_and_approvals
end

#headersObject



232
233
234
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 232

def headers
  @headers
end

#status_codeObject



236
237
238
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 236

def status_code
  @status_code
end