lib/twilio-ruby/rest/pricing/v2.rb in twilio-ruby-5.77.0 vs lib/twilio-ruby/rest/pricing/v2.rb in twilio-ruby-6.0.0.pre.rc.1

- old
+ new

@@ -1,72 +1,70 @@ ## -# This code was generated by -# \ / _ _ _| _ _ -# | (_)\/(_)(_|\/| |(/_ v1.0.0 -# / / +# This code was generated by +# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ +# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ +# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ # -# frozen_string_literal: true +# Twilio - Pricing +# This is the public Twilio REST API. +# +# NOTE: This class is auto generated by OpenAPI Generator. +# https://openapi-generator.tech +# Do not edit the class manually. +# module Twilio - module REST - class Pricing - class V2 < Version - ## - # Initialize the V2 version of Pricing - def initialize(domain) - super - @version = 'v2' - @countries = nil - @numbers = nil - @voice = nil - end + module REST + class Pricing + class V2 < Version + ## + # Initialize the V2 version of Pricing + def initialize(domain) + super + @version = 'v2' + @countries = nil + @numbers = nil + @voice = nil + end - ## - # @param [String] iso_country The {ISO country - # code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] of the origin-based - # voice pricing information to fetch. - # @return [Twilio::REST::Pricing::V2::CountryContext] if iso_country was passed. - # @return [Twilio::REST::Pricing::V2::CountryList] - def countries(iso_country=:unset) - if iso_country.nil? - raise ArgumentError, 'iso_country cannot be nil' - end - if iso_country == :unset - @countries ||= CountryList.new self - else - CountryContext.new(self, iso_country) - end + ## + # @param [String] iso_country The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the origin-based voice pricing information to fetch. + # @return [Twilio::REST::Pricing::V2::CountryContext] if isoCountry was passed. + # @return [Twilio::REST::Pricing::V2::CountryList] + def countries(iso_country=:unset) + if iso_country.nil? + raise ArgumentError, 'iso_country cannot be nil' + end + if iso_country == :unset + @countries ||= CountryList.new self + else + CountryContext.new(self, iso_country) + end + end + ## + # @param [String] destination_number The destination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number. + # @return [Twilio::REST::Pricing::V2::NumberContext] if destinationNumber was passed. + # @return [Twilio::REST::Pricing::V2::NumberList] + def numbers(destination_number=:unset) + if destination_number.nil? + raise ArgumentError, 'destination_number cannot be nil' + end + if destination_number == :unset + @numbers ||= NumberList.new self + else + NumberContext.new(self, destination_number) + end + end + ## + # @return [Twilio::REST::Pricing::V2::VoiceList] + def voice + @voice ||= VoiceList.new self + end + ## + # Provide a user friendly representation + def to_s + '<Twilio::REST::Pricing::V2>'; + end + end end - - ## - # @param [String] destination_number The destination phone number, in - # {E.164}[https://www.twilio.com/docs/glossary/what-e164] format, for which to - # fetch the origin-based voice pricing information. E.164 format consists of a + - # followed by the country code and subscriber number. - # @return [Twilio::REST::Pricing::V2::NumberContext] if destination_number was passed. - # @return [Twilio::REST::Pricing::V2::NumberList] - def numbers(destination_number=:unset) - if destination_number.nil? - raise ArgumentError, 'destination_number cannot be nil' - end - if destination_number == :unset - @numbers ||= NumberList.new self - else - NumberContext.new(self, destination_number) - end - end - - ## - # @return [Twilio::REST::Pricing::V2::VoiceContext] - def voice - @voice ||= VoiceList.new self - end - - ## - # Provide a user friendly representation - def to_s - '<Twilio::REST::Pricing::V2>' - end - end end - end -end \ No newline at end of file +end