Sha256: dc2fd766418b76457e51b85ab2f43e60dd943831d27b4274ee3e55e5cadb2a07

Contents?: true

Size: 550 Bytes

Versions: 1

Compression:

Stored size: 550 Bytes

Contents

module SuperReceptionist
  class Number
  	def initialize(super_receptionist)
  	  @super_receptionis = super_receptionist
  	end

  	def available(options = {})
  	  SuperReceptionist.submit(:get, url('AvailablePhoneNumbers'), options)
  	end

  	def buy(options = {})
  	  SuperReceptionist.submit(:post, url, options)
  	end

    def list(options = {})
      SuperReceptionist.submit(:get, url, options)
    end

  	private

  	def  url(path='')
  	  "#{@super_receptionis.base_url}account/numbers/#{path}"
  	end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
super_receptionist-0.1.0 lib/super_receptionist/number.rb