Class: Twilio::REST::Lookups

Inherits:
Domain
  • Object
show all
Defined in:
lib/twilio-ruby/rest/lookups.rb,
lib/twilio-ruby/rest/lookups/v1.rb,
lib/twilio-ruby/rest/lookups/v1/phone_number.rb

Defined Under Namespace

Classes: V1

Instance Attribute Summary

Attributes inherited from Domain

#client

Instance Method Summary collapse

Methods inherited from Domain

#absolute_url, #request

Constructor Details

#initialize(twilio) ⇒ Lookups

Initialize the Lookups Domain


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

def initialize(twilio)
  super

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

  # Versions
  @v1 = nil
end

Instance Method Details

#phone_numbers(phone_number = :unset) ⇒ Twilio::REST::Lookups::V1::PhoneNumberInstance, Twilio::REST::Lookups::V1::PhoneNumberList

Parameters:

  • phone_number (String) (defaults to: :unset)

    The phone number in E.164 format, which consists of a + followed by the country code and subscriber number.

Returns:


37
38
39
# File 'lib/twilio-ruby/rest/lookups.rb', line 37

def phone_numbers(phone_number=:unset)
  self.v1.phone_numbers(phone_number)
end

#to_sObject

Provide a user friendly representation


43
44
45
# File 'lib/twilio-ruby/rest/lookups.rb', line 43

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

#v1Object

Version v1 of lookups


27
28
29
# File 'lib/twilio-ruby/rest/lookups.rb', line 27

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