class Twilio::REST::Pricing::V1::VoiceList

Public Class Methods

new(version) click to toggle source

Initialize the VoiceList @param [Version] version Version that contains the resource @return [VoiceList] VoiceList

Calls superclass method Twilio::REST::ListResource::new
   # File lib/twilio-ruby/rest/pricing/v1/voice.rb
18 def initialize(version)
19   super(version)
20 
21   # Path Solution
22   @solution = {}
23 
24   # Components
25   @numbers = nil
26   @countries = nil
27 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/voice.rb
51 def countries(iso_country=:unset)
52   raise ArgumentError, 'iso_country cannot be nil' if iso_country.nil?
53 
54   if iso_country != :unset
55     return CountryContext.new(@version, iso_country, )
56   end
57 
58     @countries ||= CountryList.new(@version, )
59 end
numbers(number=:unset) click to toggle source

Access the numbers @param [String] number The phone number to fetch. @return [NumberList] @return [NumberContext] if number was passed.

   # File lib/twilio-ruby/rest/pricing/v1/voice.rb
34 def numbers(number=:unset)
35   raise ArgumentError, 'number cannot be nil' if number.nil?
36 
37   if number != :unset
38     return NumberContext.new(@version, number, )
39   end
40 
41     @numbers ||= NumberList.new(@version, )
42 end
to_s() click to toggle source

Provide a user friendly representation

   # File lib/twilio-ruby/rest/pricing/v1/voice.rb
63 def to_s
64   '#<Twilio.Pricing.V1.VoiceList>'
65 end