Class: Twilio::REST::Pricing::V1::PhoneNumberList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Pricing::V1::PhoneNumberList
- Defined in:
- lib/twilio-ruby/rest/pricing/v1/phone_number.rb,
lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb
Defined Under Namespace
Classes: CountryContext, CountryInstance, CountryList, CountryPage
Instance Method Summary collapse
-
#countries(iso_country = :unset) ⇒ CountryList, CountryContext
Access the countries.
-
#initialize(version) ⇒ PhoneNumberList
constructor
Initialize the PhoneNumberList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version) ⇒ PhoneNumberList
Initialize the PhoneNumberList
26 27 28 29 30 31 32 33 |
# File 'lib/twilio-ruby/rest/pricing/v1/phone_number.rb', line 26 def initialize(version) super(version) # Path Solution @solution = { } @uri = "/PhoneNumbers" # Components @countries = nil end |
Instance Method Details
#countries(iso_country = :unset) ⇒ CountryList, CountryContext
Access the countries
40 41 42 43 44 45 46 47 48 |
# File 'lib/twilio-ruby/rest/pricing/v1/phone_number.rb', line 40 def countries(iso_country=:unset) raise ArgumentError, 'iso_country cannot be nil' if iso_country.nil? if iso_country != :unset return CountryContext.new(@version,iso_country ) end @countries ||= CountryList.new(@version ) end |
#to_s ⇒ Object
Provide a user friendly representation
51 52 53 |
# File 'lib/twilio-ruby/rest/pricing/v1/phone_number.rb', line 51 def to_s '#<Twilio.Pricing.V1.PhoneNumberList>' end |