Sha256: ad2038f4a00bde8d3ff882abc57a33ed34b11e3ba9172cbf41f18403a6349f49
Contents?: true
Size: 501 Bytes
Versions: 1
Compression:
Stored size: 501 Bytes
Contents
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__),"..", "lib"))) require 'ctm' access_token = CTM::Auth.authenticate(ENV['CTM_TOKEN'], ENV['CTM_SECRET']) account = access_token.accounts.first availble_numbers = account.numbers.search("US", :area_code => "410") availble_numbers.each do|num| puts "#{num.friendly_name} -> #{num.phone_number}" end number_to_buy = availble_numbers.first number = account.numbers.buy("+15005550006") puts "purchased: #{number.formatted} #{number.number}"
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ctm-0.0.1 | examples/buy_numbers.rb |