Class: Twilio::REST::Lookups::PhoneNumbers

Inherits:
NextGenListResource show all
Includes:
Utils, Util
Defined in:
lib/twilio-ruby/rest/lookups/phone_numbers.rb

Instance Method Summary collapse

Methods included from Utils

#detwilify, #twilify

Methods included from Util

#get_string, #url_encode

Methods inherited from NextGenListResource

#list

Methods inherited from Twilio::REST::ListResource

#create, #initialize, #inspect, #list

Constructor Details

This class inherits a constructor from Twilio::REST::ListResource

Instance Method Details

#get(number, query = {}) ⇒ Object



8
9
10
11
12
# File 'lib/twilio-ruby/rest/lookups/phone_numbers.rb', line 8

def get(number, query={})
  full_path = "#{@path}/#{URI.encode(number)}"
  full_path << "?#{url_encode(twilify(query))}" if !query.empty?
  @instance_class.new full_path, @client
end