Class: Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::SharedCostListResponse

Inherits:
InstanceListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/shared_cost.rb

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of SharedCostListResponse.

Parameters:

  • instance (Array<SharedCostInstance>)
  • headers (Hash{String => Object})
  • status_code (Integer)


363
364
365
366
367
368
369
370
371
372
373
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/shared_cost.rb', line 363

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

Instance Method Details

#headersObject



379
380
381
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/shared_cost.rb', line 379

def headers
  @headers
end

#shared_costObject



375
376
377
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/shared_cost.rb', line 375

def shared_cost
    @shared_cost
end

#status_codeObject



383
384
385
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/shared_cost.rb', line 383

def status_code
  @status_code
end