Class: Twilio::LocalPhoneNumber
Overview
This sub-resource represents only Local phone numbers, or in other words, not toll-free numbers. Also allows you to request a new local phone number be added to your account. Example:
Twilio.connect('my_twilio_sid', 'my_auth_token')
Twilio::LocalPhoneNumber.list
Instance Attribute Summary
Attributes inherited from TwilioObject
#connection
Instance Method Summary
collapse
#initialize, method_missing
Instance Method Details
#create(url, area_code = nil, method = 'POST', friendly_name = nil) ⇒ Object
8
9
10
11
12
13
14
15
|
# File 'lib/twilio/local_phone_number.rb', line 8
def create(url, area_code = nil, method = 'POST', friendly_name = nil)
Twilio.post("/IncomingPhoneNumbers/Local", :body => {
:Url => url,
:AreaCode => area_code,
:Method => method,
:FriendlyName => friendly_name
})
end
|
#list ⇒ Object
17
18
19
|
# File 'lib/twilio/local_phone_number.rb', line 17
def list
Twilio.get("/IncomingPhoneNumbers/Local")
end
|