Class: Twilio::REST::Lookups::V2
- Defined in:
- lib/twilio-ruby/rest/lookups/v2.rb,
lib/twilio-ruby/rest/lookups/v2/phone_number.rb
Defined Under Namespace
Classes: PhoneNumberContext, PhoneNumberInstance, PhoneNumberList, PhoneNumberPage
Instance Attribute Summary
Attributes inherited from Version
Instance Method Summary collapse
-
#initialize(domain) ⇒ V2
constructor
Initialize the V2 version of Lookups.
- #phone_numbers(phone_number = :unset) ⇒ Twilio::REST::Lookups::V2::PhoneNumberContext, Twilio::REST::Lookups::V2::PhoneNumberList
-
#to_s ⇒ Object
Provide a user friendly representation.
Methods inherited from Version
#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update
Constructor Details
#initialize(domain) ⇒ V2
Initialize the V2 version of Lookups
21 22 23 24 25 |
# File 'lib/twilio-ruby/rest/lookups/v2.rb', line 21 def initialize(domain) super @version = 'v2' @phone_numbers = nil end |
Instance Method Details
#phone_numbers(phone_number = :unset) ⇒ Twilio::REST::Lookups::V2::PhoneNumberContext, Twilio::REST::Lookups::V2::PhoneNumberList
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/twilio-ruby/rest/lookups/v2.rb', line 31 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 |
#to_s ⇒ Object
Provide a user friendly representation
43 44 45 |
# File 'lib/twilio-ruby/rest/lookups/v2.rb', line 43 def to_s '<Twilio::REST::Lookups::V2>'; end |