Sha256: 6f0968c2dae4c70d83abd71b3732dcb9f0b5ba89da2c1a31ad19412e75410343

Contents?: true

Size: 740 Bytes

Versions: 194

Compression:

Stored size: 740 Bytes

Contents

require 'twilio-ruby'

# print a list of all phone calls, what phone number each was to/from, and how
# much each one cost.

# put your Twilio credentials here. you can find your AccountSid and AuthToken
# at the top of your account dashboard page located at:
#   https://www.twilio.com/user/account
account_sid = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
auth_token = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'

# set up a client
client = Twilio::REST::Client.new(account_sid, auth_token)

calls = client.calls.list

loop do
  calls.each do |call|
    price = call.price || '0.00' # since apparently prices can be nil...
    puts call.sid + "\t" + call.from + "\t" + call.to + "\t" + price.to_s
  end
  calls = calls.next_page
  break if calls.nil?
end

Version data entries

194 entries across 194 versions & 1 rubygems

Version Path
twilio-ruby-7.4.3 examples/print_call_log.rb
twilio-ruby-7.4.2 examples/print_call_log.rb
twilio-ruby-7.4.1 examples/print_call_log.rb
twilio-ruby-7.4.0 examples/print_call_log.rb
twilio-ruby-7.3.7 examples/print_call_log.rb
twilio-ruby-7.3.6 examples/print_call_log.rb
twilio-ruby-7.3.5 examples/print_call_log.rb
twilio-ruby-7.3.4 examples/print_call_log.rb
twilio-ruby-7.3.3 examples/print_call_log.rb
twilio-ruby-7.3.2 examples/print_call_log.rb
twilio-ruby-7.3.1 examples/print_call_log.rb
twilio-ruby-7.3.0 examples/print_call_log.rb
twilio-ruby-7.2.4 examples/print_call_log.rb
twilio-ruby-7.2.3 examples/print_call_log.rb
twilio-ruby-7.2.2 examples/print_call_log.rb
twilio-ruby-7.2.1 examples/print_call_log.rb
twilio-ruby-7.2.0 examples/print_call_log.rb
twilio-ruby-7.1.1 examples/print_call_log.rb
twilio-ruby-7.0.2 examples/print_call_log.rb
twilio-ruby-7.0.1 examples/print_call_log.rb