Sha256: 2996c03c39b126e075c738d46ee597b15835ee348c2693dc1a1b9047500c6427

Contents?: true

Size: 761 Bytes

Versions: 15

Compression:

Stored size: 761 Bytes

Contents

require 'rubygems'
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 = 'AC043dcf9844e04758bc3a36a84c29761'
auth_token = '62ea81de3a5b414154eb263595357c69'

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

calls = client.account.calls.list

begin
  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
  end
  calls = calls.next_page
end while not calls.empty?

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
twilio-ruby-3.12.1 examples/print-call-log.rb
twilio-ruby-3.12.0 examples/print-call-log.rb
twilio-ruby-3.11.6 examples/print-call-log.rb
twilio-ruby-3.11.5 examples/print-call-log.rb
twilio-ruby-3.11.4 examples/print-call-log.rb
twilio-ruby-3.11.3 examples/print-call-log.rb
twilio-ruby-3.11.1 examples/print-call-log.rb
twilio-ruby-3.11.0 examples/print-call-log.rb
twilio-ruby-3.10.1 examples/print-call-log.rb
twilio-ruby-3.10.0 examples/print-call-log.rb
twilio-ruby-3.9.0 examples/print-call-log.rb
twilio-ruby-3.8.0 examples/print-call-log.rb
twilio-ruby-3.7.1 examples/print-call-log.rb
twilio-ruby-3.7.0 examples/print-call-log.rb
twilio-ruby-3.6.0 examples/print-call-log.rb