Sha256: 526afd58b6f1f4132d57e35f13b5fb0cad29154518df4de3fb777b455e8030f7

Contents?: true

Size: 545 Bytes

Versions: 9

Compression:

Stored size: 545 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(path, client, params={})
        super path, 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

9 entries across 9 versions & 1 rubygems

Version Path
twilio-ruby-3.12.0 lib/twilio-ruby/rest/calls.rb
twilio-ruby-3.11.6 lib/twilio-ruby/rest/calls.rb
twilio-ruby-3.11.5 lib/twilio-ruby/rest/calls.rb
twilio-ruby-3.11.4 lib/twilio-ruby/rest/calls.rb
twilio-ruby-3.11.3 lib/twilio-ruby/rest/calls.rb
twilio-ruby-3.11.1 lib/twilio-ruby/rest/calls.rb
twilio-ruby-3.11.0 lib/twilio-ruby/rest/calls.rb
twilio-ruby-3.10.1 lib/twilio-ruby/rest/calls.rb
twilio-ruby-3.10.0 lib/twilio-ruby/rest/calls.rb