Sha256: 0e16d570c4dde374aa58a011f64b04956129b53e7183bc4bd822b7baaa601dcf

Contents?: true

Size: 543 Bytes

Versions: 8

Compression:

Stored size: 543 Bytes

Contents

module Twilio
  module REST
    class Calls < ListResource
      def make(from, to, url)
        create :from => from, :to => to, :url => url
      end
    end

    class Call < InstanceResource
      def initialize(uri, client, params={})
        super uri, client, params
        resource :recordings, :notifications
      end

      def redirect_to(url)
        update :url => url
      end

      def cancel
        update :status => 'canceled'
      end

      def hangup
        update :status => 'completed'
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
twilio-ruby-3.9.0 lib/twilio-ruby/rest/calls.rb
twilio-ruby-3.8.0 lib/twilio-ruby/rest/calls.rb
twilio-ruby-3.7.1 lib/twilio-ruby/rest/calls.rb
twilio-ruby-3.7.0 lib/twilio-ruby/rest/calls.rb
twilio-ruby-3.6.0 lib/twilio-ruby/rest/calls.rb
twilio-ruby-3.5.1 lib/twilio-ruby/rest/calls.rb
twilio-ruby-3.5.0 lib/twilio-ruby/rest/calls.rb
twilio-ruby-3.4.2 lib/twilio-ruby/rest/calls.rb