Sha256: 9a1191518132e319f4d17288472ac582add4eee5792757803526e69c93faf92e

Contents?: true

Size: 667 Bytes

Versions: 2

Compression:

Stored size: 667 Bytes

Contents

module Restcomm
  module REST
    class Calls < ListResource
      def initialize(path, client)
        super
        resource :feedback_summary
      end

      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, :feedback
      end

      def redirect_to(url)
        update url: url
      end

      def cancel
	
	raise "*********#{params}"

        update status: 'canceled'
      end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
restcomm-ruby-1.2.1 lib/restcomm-ruby/rest/calls.rb
restcomm-ruby-1.2.0 lib/restcomm-ruby/rest/calls.rb