docs/usage/phone-calls.rst in twilio-ruby-3.12.1 vs docs/usage/phone-calls.rst in twilio-ruby-3.12.2

- old
+ new

@@ -23,11 +23,11 @@ # To find these visit https://www.twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXX" auth_token = "YYYYYYYYYYYYYYYYYY" @client = Twilio::REST::Client.new account_sid, auth_token - @call = @client.account.calls.create({:to => "9991231234", + @call = @client.calls.create({:to => "9991231234", :from => "9991231234", :url => "http://foo.com/call.xml"}) puts @call.length puts @call.sid @@ -46,11 +46,11 @@ account_sid = "ACXXXXXXXXXXXXXXXXX" auth_token = "YYYYYYYYYYYYYYYYYY" @client = Twilio::REST::Client.new account_sid, auth_token sid = "CA12341234" - @call = @client.account.calls.get(sid) + @call = @client.calls.get(sid) Accessing Specific Call Resources ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -67,11 +67,11 @@ account_sid = "ACXXXXXXXXXXXXXXXXX" auth_token = "YYYYYYYYYYYYYYYYYY" @client = Twilio::REST::Client.new account_sid, auth_token sid = "CA12341234" - @call = @client.account.calls.get(sid) + @call = @client.calls.get(sid) puts @call.notifications.list() puts @call.recordings.list() puts @call.transcriptions.list() @@ -107,11 +107,11 @@ # To find these visit https://www.twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXX" auth_token = "YYYYYYYYYYYYYYYYYY" @client = Twilio::REST::Client.new account_sid, auth_token - @calls = @client.account.calls.list({:status => "in-progress"}) + @calls = @client.calls.list({:status => "in-progress"}) @calls.each do |call| call.redirect_to("http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient") end @@ -125,11 +125,11 @@ # To find these visit https://www.twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXX" auth_token = "YYYYYYYYYYYYYYYYYY" @client = Twilio::REST::Client.new account_sid, auth_token - @calls = @client.account.calls.list({:status => "in-progress"}) + @calls = @client.calls.list({:status => "in-progress"}) @calls.each do |call| call.hangup() end @@ -146,11 +146,11 @@ account_sid = "ACXXXXXXXXXXXXXXXXX" auth_token = "YYYYYYYYYYYYYYYYYY" @client = Twilio::REST::Client.new account_sid, auth_token sid = "CA12341234" - @client.account.calls.get(sid).redirect_to("http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient") + @client.calls.get(sid).redirect_to("http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient") Hanging up the call also works. .. code-block:: ruby @@ -160,7 +160,7 @@ account_sid = "ACXXXXXXXXXXXXXXXXX" auth_token = "YYYYYYYYYYYYYYYYYY" @client = Twilio::REST::Client.new account_sid, auth_token sid = "CA12341234" - @client.account.calls.get(sid).hangup() + @client.calls.get(sid).hangup()