Class: Twilio::REST::Supersim::V1::UsageRecordListResponse

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of UsageRecordListResponse.

Parameters:



280
281
282
283
284
285
286
287
288
289
290
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 280

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

Instance Method Details

#headersObject



296
297
298
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 296

def headers
  @headers
end

#status_codeObject



300
301
302
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 300

def status_code
  @status_code
end

#usage_recordObject



292
293
294
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 292

def usage_record
    @usage_record
end