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:



288
289
290
291
292
293
294
295
296
297
298
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 288

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



304
305
306
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 304

def headers
  @headers
end

#status_codeObject



308
309
310
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 308

def status_code
  @status_code
end

#usage_recordObject



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

def usage_record
    @usage_record
end