Class: Twilio::REST::IncomingPhoneNumbers

Inherits:
ListResource show all
Defined in:
lib/twilio-ruby/rest/incoming_phone_numbers.rb

Instance Method Summary collapse

Methods inherited from ListResource

#create, #get, #inspect, #list

Methods included from Utils

#detwilify, #twilify

Constructor Details

#initialize(path, client) ⇒ IncomingPhoneNumbers

Returns a new instance of IncomingPhoneNumbers.



4
5
6
7
8
# File 'lib/twilio-ruby/rest/incoming_phone_numbers.rb', line 4

def initialize(path, client)
  super
  @submodule = :NumberType
  resource :mobile, :local, :toll_free
end

Instance Method Details

#buy(phone_number) ⇒ Object



10
11
12
# File 'lib/twilio-ruby/rest/incoming_phone_numbers.rb', line 10

def buy(phone_number)
  create phone_number: phone_number
end