Class: Twilio::REST::Pricing::V2::VoiceList::CountryListResponse

Inherits:
InstanceListResource show all
Defined in:
lib/twilio-ruby/rest/pricing/v2/voice/country.rb,
lib/twilio-ruby/rest/pricing/v2/voice/country.rb

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of CountryListResponse.

Parameters:

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


265
266
267
268
269
270
271
# File 'lib/twilio-ruby/rest/pricing/v2/voice/country.rb', line 265

def initialize(version, payload, key)
   @country_instance = payload.body[key].map do |data|
    CountryInstance.new(version, data)
   end
   @headers = payload.headers
   @status_code = payload.status_code
end

Instance Method Details

#countryObject



354
355
356
# File 'lib/twilio-ruby/rest/pricing/v2/voice/country.rb', line 354

def country
    @country
end

#country_instanceObject



273
274
275
# File 'lib/twilio-ruby/rest/pricing/v2/voice/country.rb', line 273

def country_instance
    @instance
end

#headersObject



358
359
360
# File 'lib/twilio-ruby/rest/pricing/v2/voice/country.rb', line 358

def headers
  @headers
end

#status_codeObject



362
363
364
# File 'lib/twilio-ruby/rest/pricing/v2/voice/country.rb', line 362

def status_code
  @status_code
end