Sha256: 84761e34b52c42ebd61ef71a0b96f2817bed97be6f1359f1bf8a9051f0920a21

Contents?: true

Size: 626 Bytes

Versions: 6

Compression:

Stored size: 626 Bytes

Contents

module Twilio
  # 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. 
  class LocalPhoneNumber < TwilioObject
    def create(url, area_code = nil, method = 'POST', friendly_name = nil)
      self.connection.class.post("/IncomingPhoneNumbers/Local", :body => {
        :Url => url, 
        :AreaCode => area_code, 
        :Method => method,
        :FriendlyName => friendly_name 
      })
    end
    
    def list
      self.connection.class.get("/IncomingPhoneNumbers/Local")
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
webficient-twilio-1.3.0 lib/twilio/local_phone_number.rb
webficient-twilio-1.4.0 lib/twilio/local_phone_number.rb
webficient-twilio-2.0.0 lib/twilio/local_phone_number.rb
webficient-twilio-2.1.0 lib/twilio/local_phone_number.rb
webficient-twilio-2.2.0 lib/twilio/local_phone_number.rb
twilio-1.4.0 lib/twilio/local_phone_number.rb