class Twilio::REST::Pricing::V1::PhoneNumberList
Public Class Methods
new(version)
click to toggle source
Initialize the PhoneNumberList
@param [Version] version Version
that contains the resource @return [PhoneNumberList] PhoneNumberList
Calls superclass method
Twilio::REST::ListResource::new
# File lib/twilio-ruby/rest/pricing/v1/phone_number.rb 18 def initialize(version) 19 super(version) 20 21 # Path Solution 22 @solution = {} 23 24 # Components 25 @countries = nil 26 end
Public Instance Methods
countries(iso_country=:unset)
click to toggle source
Access the countries @param [String] iso_country The {ISO country
code}[http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] of the pricing information to fetch.
@return [CountryList] @return [CountryContext] if iso_country was passed.
# File lib/twilio-ruby/rest/pricing/v1/phone_number.rb 35 def countries(iso_country=:unset) 36 raise ArgumentError, 'iso_country cannot be nil' if iso_country.nil? 37 38 if iso_country != :unset 39 return CountryContext.new(@version, iso_country, ) 40 end 41 42 @countries ||= CountryList.new(@version, ) 43 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/pricing/v1/phone_number.rb 47 def to_s 48 '#<Twilio.Pricing.V1.PhoneNumberList>' 49 end