Sha256: 17794bcc97ac321eaf7e27e4388a811f389c2da4b83f041a4d578282de91f0bc

Contents?: true

Size: 716 Bytes

Versions: 9

Compression:

Stored size: 716 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
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
dancroak-twilio-2.3.1 lib/twilio/toll_free_phone_number.rb
webficient-twilio-2.3.0 lib/twilio/toll_free_phone_number.rb
webficient-twilio-2.4.0 lib/twilio/toll_free_phone_number.rb
twilio-2.7.0 lib/twilio/toll_free_phone_number.rb
twilio-2.6.0 lib/twilio/toll_free_phone_number.rb
twilio-2.5.0 lib/twilio/toll_free_phone_number.rb
twilio-2.4.1 lib/twilio/toll_free_phone_number.rb
twilio-2.4.0 lib/twilio/toll_free_phone_number.rb
twilio-2.3.0 lib/twilio/toll_free_phone_number.rb