Sha256: eaf297d50689f4045e03142652fa4ff6335c556cd70cdffdca6b0af645507f39

Contents?: true

Size: 832 Bytes

Versions: 1

Compression:

Stored size: 832 Bytes

Contents

module Twilio
  # This sub-resource represents only Toll Free phone numbers, or in other words, not local numbers. 
  # Also allows you to request a new toll free phone number be added to your account. 
  # Example:
  #   Twilio.connect('my_twilio_sid', 'my_auth_token')
  #   Twilio::TollFreePhoneNumber.list
  class TollFreePhoneNumber < TwilioObject
    def create(url, area_code = nil, method = 'POST', friendly_name = nil)
      Twilio.post("/IncomingPhoneNumbers/TollFree", :body => {
        :Url => url, 
        :AreaCode => area_code, 
        :Method => method,
        :FriendlyName => friendly_name 
      })
    end
    
    def list
      Twilio.get("/IncomingPhoneNumbers/TollFree")
    end
    
    def delete(phone_number_sid)
      Twilio.delete("/IncomingPhoneNumbers/#{phone_number_sid}")
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
twilio-2.8.0 lib/twilio/toll_free_phone_number.rb