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:



224
225
226
227
228
229
230
231
232
233
234
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 224

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



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

def content_and_approvals
    @content_and_approvals
end

#headersObject



240
241
242
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 240

def headers
  @headers
end

#status_codeObject



244
245
246
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 244

def status_code
  @status_code
end