class Twilio::REST::Pricing

Public Class Methods

new(twilio) click to toggle source

Initialize the Pricing Domain

Calls superclass method Twilio::REST::Domain::new
   # File lib/twilio-ruby/rest/pricing.rb
14 def initialize(twilio)
15   super
16 
17   @base_url = 'https://pricing.twilio.com'
18   @host = 'pricing.twilio.com'
19   @port = 443
20 
21   # Versions
22   @v1 = nil
23   @v2 = nil
24 end

Public Instance Methods

countries(iso_country=:unset) click to toggle source

@param [String] iso_country The {ISO country

code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2].

@return [Twilio::REST::Pricing::V2::CountryInstance] if iso_country was passed. @return [Twilio::REST::Pricing::V2::CountryList]

   # File lib/twilio-ruby/rest/pricing.rb
61 def countries(iso_country=:unset)
62   self.v2.countries(iso_country)
63 end
messaging() click to toggle source

@return [Twilio::REST::Pricing::V1::MessagingInstance]

   # File lib/twilio-ruby/rest/pricing.rb
40 def messaging
41   self.v1.messaging()
42 end
numbers(destination_number=:unset) click to toggle source

@param [String] destination_number The destination phone number in

{E.164}[https://www.twilio.com/docs/glossary/what-e164] format, which consists
of a + followed by the country code and subscriber number.

@return [Twilio::REST::Pricing::V2::NumberInstance] if destination_number was passed. @return [Twilio::REST::Pricing::V2::NumberList]

   # File lib/twilio-ruby/rest/pricing.rb
71 def numbers(destination_number=:unset)
72   self.v2.numbers(destination_number)
73 end
phone_numbers() click to toggle source

@return [Twilio::REST::Pricing::V1::PhoneNumberInstance]

   # File lib/twilio-ruby/rest/pricing.rb
46 def phone_numbers
47   self.v1.phone_numbers()
48 end
to_s() click to toggle source

Provide a user friendly representation

   # File lib/twilio-ruby/rest/pricing.rb
77 def to_s
78   '#<Twilio::REST::Pricing>'
79 end
v1() click to toggle source

Version v1 of pricing

   # File lib/twilio-ruby/rest/pricing.rb
28 def v1
29   @v1 ||= V1.new self
30 end
v2() click to toggle source

Version v2 of pricing

   # File lib/twilio-ruby/rest/pricing.rb
34 def v2
35   @v2 ||= V2.new self
36 end
voice() click to toggle source

@return [Twilio::REST::Pricing::V2::VoiceInstance]

   # File lib/twilio-ruby/rest/pricing.rb
52 def voice
53   self.v2.voice()
54 end