Class: Twilio::REST::Pricing::V1
- Defined in:
- lib/twilio-ruby/rest/pricing/v1.rb,
lib/twilio-ruby/rest/pricing/v1/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/v1/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: MessagingInstance, MessagingList, MessagingListResponse, MessagingPage, MessagingPageMetadata, PhoneNumberInstance, PhoneNumberList, PhoneNumberListResponse, PhoneNumberPage, PhoneNumberPageMetadata, VoiceInstance, VoiceList, VoiceListResponse, VoicePage, VoicePageMetadata
Instance Attribute Summary
Attributes inherited from Version
Instance Method Summary collapse
-
#initialize(domain) ⇒ V1
constructor
Initialize the V1 version of Pricing.
- #messaging ⇒ Twilio::REST::Pricing::V1::MessagingList
- #phone_numbers(iso_country = :unset) ⇒ Twilio::REST::Pricing::V1::PhoneNumberList
-
#to_s ⇒ Object
Provide a user friendly representation.
- #voice(iso_country = :unset) ⇒ Twilio::REST::Pricing::V1::VoiceList
Methods inherited from Version
#absolute_url, #create, #create_with_metadata, #delete, #delete_with_metadata, #exception, #fetch, #fetch_with_metadata, #page, #patch, #read_limits, #relative_uri, #request, #stream, #stream_with_metadata, #update, #update_with_metadata
Constructor Details
#initialize(domain) ⇒ V1
Initialize the V1 version of Pricing
21 22 23 24 25 26 27 |
# File 'lib/twilio-ruby/rest/pricing/v1.rb', line 21 def initialize(domain) super @version = 'v1' @messaging = nil @phone_numbers = nil @voice = nil end |
Instance Method Details
#messaging ⇒ Twilio::REST::Pricing::V1::MessagingList
31 32 33 |
# File 'lib/twilio-ruby/rest/pricing/v1.rb', line 31 def messaging @messaging ||= MessagingList.new self end |
#phone_numbers(iso_country = :unset) ⇒ Twilio::REST::Pricing::V1::PhoneNumberList
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/twilio-ruby/rest/pricing/v1.rb', line 37 def phone_numbers(iso_country=:unset) if iso_country.nil? raise ArgumentError, 'iso_country cannot be nil' end if iso_country == :unset @phone_numbers ||= PhoneNumberList.new self else PhoneNumberList.new(self, iso_country: iso_country) end end |
#to_s ⇒ Object
Provide a user friendly representation
64 65 66 |
# File 'lib/twilio-ruby/rest/pricing/v1.rb', line 64 def to_s '<Twilio::REST::Pricing::V1>'; end |
#voice(iso_country = :unset) ⇒ Twilio::REST::Pricing::V1::VoiceList
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/twilio-ruby/rest/pricing/v1.rb', line 51 def voice(iso_country=:unset) if iso_country.nil? raise ArgumentError, 'iso_country cannot be nil' end if iso_country == :unset @voice ||= VoiceList.new self else VoiceList.new(self, iso_country: iso_country) end end |