## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 # / / # # frozen_string_literal: true module Twilio module REST class Routes class V2 < Version ## # Initialize the V2 version of Routes def initialize(domain) super @version = 'v2' @phone_numbers = nil @sip_domains = nil @trunks = nil end ## # @param [String] phone_number The phone number in E.164 format # @return [Twilio::REST::Routes::V2::PhoneNumberContext] if phone_number was passed. # @return [Twilio::REST::Routes::V2::PhoneNumberList] def phone_numbers(phone_number=:unset) if phone_number.nil? raise ArgumentError, 'phone_number cannot be nil' end if phone_number == :unset @phone_numbers ||= PhoneNumberList.new self else PhoneNumberContext.new(self, phone_number) end end ## # @param [String] sip_domain The sip_domain # @return [Twilio::REST::Routes::V2::SipDomainContext] if sip_domain was passed. # @return [Twilio::REST::Routes::V2::SipDomainList] def sip_domains(sip_domain=:unset) if sip_domain.nil? raise ArgumentError, 'sip_domain cannot be nil' end if sip_domain == :unset @sip_domains ||= SipDomainList.new self else SipDomainContext.new(self, sip_domain) end end ## # @param [String] sip_trunk_domain The absolute URL of the SIP Trunk # @return [Twilio::REST::Routes::V2::TrunkContext] if sip_trunk_domain was passed. # @return [Twilio::REST::Routes::V2::TrunkList] def trunks(sip_trunk_domain=:unset) if sip_trunk_domain.nil? raise ArgumentError, 'sip_trunk_domain cannot be nil' end if sip_trunk_domain == :unset @trunks ||= TrunkList.new self else TrunkContext.new(self, sip_trunk_domain) end end ## # Provide a user friendly representation def to_s '' end end end end end