Sha256: 2e0f98f2c2e206687e5c19516e4a6d13e3ca759abb9c1411dac2f6676a298518

Contents?: true

Size: 617 Bytes

Versions: 12

Compression:

Stored size: 617 Bytes

Contents

module Twilio
  module REST
    class Members < ListResource
      def initialize(path, client)
        super
        # hard-code the json keys since members are special
        @list_key, @instance_id_key = 'queue_members', 'call_sid'
      end

      def front
        @instance_class.new "#{@path}/Front", @client
      end

      def front!
        front.refresh
      end

      def dequeue(url, method='POST')
        front.dequeue url, method
      end
    end

    class Member < InstanceResource
      def dequeue(url, method='POST')
        update :url => url, :method => method
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
twilio-ruby-3.12.3 lib/twilio-ruby/rest/queues/members.rb
twilio-ruby-3.12.2 lib/twilio-ruby/rest/queues/members.rb
twilio-ruby-3.12.1 lib/twilio-ruby/rest/queues/members.rb
twilio-ruby-3.12.0 lib/twilio-ruby/rest/queues/members.rb
twilio-ruby-3.11.6 lib/twilio-ruby/rest/queues/members.rb
twilio-ruby-3.11.5 lib/twilio-ruby/rest/queues/members.rb
twilio-ruby-3.11.4 lib/twilio-ruby/rest/queues/members.rb
twilio-ruby-3.11.3 lib/twilio-ruby/rest/queues/members.rb
twilio-ruby-3.11.1 lib/twilio-ruby/rest/queues/members.rb
twilio-ruby-3.11.0 lib/twilio-ruby/rest/queues/members.rb
twilio-ruby-3.10.1 lib/twilio-ruby/rest/queues/members.rb
twilio-ruby-3.10.0 lib/twilio-ruby/rest/queues/members.rb