Class: Twilio::REST::Pricing

Inherits:
Domain
  • Object
show all
Defined in:
lib/twilio-ruby/rest/pricing.rb,
lib/twilio-ruby/rest/pricing/v1.rb,
lib/twilio-ruby/rest/pricing/v2.rb,
lib/twilio-ruby/rest/pricing/v1/voice.rb,
lib/twilio-ruby/rest/pricing/v2/voice.rb,
lib/twilio-ruby/rest/pricing/v1/messaging.rb,
lib/twilio-ruby/rest/pricing/v1/phone_number.rb,
lib/twilio-ruby/rest/pricing/v1/voice/number.rb,
lib/twilio-ruby/rest/pricing/v2/voice/number.rb,
lib/twilio-ruby/rest/pricing/v1/voice/country.rb,
lib/twilio-ruby/rest/pricing/v2/voice/country.rb,
lib/twilio-ruby/rest/pricing/v1/messaging/country.rb,
lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb

Defined Under Namespace

Classes: V1, V2

Instance Attribute Summary

Attributes inherited from Domain

#client

Instance Method Summary collapse

Methods inherited from Domain

#absolute_url, #request

Constructor Details

#initialize(twilio) ⇒ Pricing

Initialize the Pricing Domain


14
15
16
17
18
19
20
21
22
23
24
# File 'lib/twilio-ruby/rest/pricing.rb', line 14

def initialize(twilio)
  super

  @base_url = 'https://pricing.twilio.com'
  @host = 'pricing.twilio.com'
  @port = 443

  # Versions
  @v1 = nil
  @v2 = nil
end

Instance Method Details

#messagingTwilio::REST::Pricing::V1::MessagingInstance


40
41
42
# File 'lib/twilio-ruby/rest/pricing.rb', line 40

def messaging
  self.v1.messaging()
end

#phone_numbersTwilio::REST::Pricing::V1::PhoneNumberInstance


46
47
48
# File 'lib/twilio-ruby/rest/pricing.rb', line 46

def phone_numbers
  self.v1.phone_numbers()
end

#to_sObject

Provide a user friendly representation


58
59
60
# File 'lib/twilio-ruby/rest/pricing.rb', line 58

def to_s
  '#<Twilio::REST::Pricing>'
end

#v1Object

Version v1 of pricing


28
29
30
# File 'lib/twilio-ruby/rest/pricing.rb', line 28

def v1
  @v1 ||= V1.new self
end

#v2Object

Version v2 of pricing


34
35
36
# File 'lib/twilio-ruby/rest/pricing.rb', line 34

def v2
  @v2 ||= V2.new self
end

#voiceTwilio::REST::Pricing::V2::VoiceInstance


52
53
54
# File 'lib/twilio-ruby/rest/pricing.rb', line 52

def voice
  self.v2.voice()
end