Class: Twilio::REST::Pricing::V1::VoiceList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Pricing::V1::VoiceList
- Defined in:
- lib/twilio-ruby/rest/pricing/v1/voice.rb,
lib/twilio-ruby/rest/pricing/v1/voice/number.rb,
lib/twilio-ruby/rest/pricing/v1/voice/country.rb
Defined Under Namespace
Classes: CountryContext, CountryInstance, CountryList, CountryPage, NumberContext, NumberInstance, NumberList, NumberPage
Instance Method Summary collapse
-
#countries(iso_country = :unset) ⇒ CountryList, CountryContext
Access the countries.
-
#initialize(version) ⇒ VoiceList
constructor
Initialize the VoiceList.
-
#numbers(number = :unset) ⇒ NumberList, NumberContext
Access the numbers.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version) ⇒ VoiceList
Initialize the VoiceList
26 27 28 29 30 31 32 33 34 |
# File 'lib/twilio-ruby/rest/pricing/v1/voice.rb', line 26 def initialize(version) super(version) # Path Solution @solution = { } @uri = "/Voice" # Components @countries = nil @numbers = nil end |
Instance Method Details
#countries(iso_country = :unset) ⇒ CountryList, CountryContext
Access the countries
41 42 43 44 45 46 47 48 49 |
# File 'lib/twilio-ruby/rest/pricing/v1/voice.rb', line 41 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 |
#numbers(number = :unset) ⇒ NumberList, NumberContext
Access the numbers
54 55 56 57 58 59 60 61 62 |
# File 'lib/twilio-ruby/rest/pricing/v1/voice.rb', line 54 def numbers(number=:unset) raise ArgumentError, 'number cannot be nil' if number.nil? if number != :unset return NumberContext.new(@version,number ) end @numbers ||= NumberList.new(@version ) end |
#to_s ⇒ Object
Provide a user friendly representation
65 66 67 |
# File 'lib/twilio-ruby/rest/pricing/v1/voice.rb', line 65 def to_s '#<Twilio.Pricing.V1.VoiceList>' end |