Sha256: bb26856a6a75277dc1b807a756b82f6e38452736afdb3252d792ed41a7520cec

Contents?: true

Size: 611 Bytes

Versions: 42

Compression:

Stored size: 611 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

42 entries across 42 versions & 1 rubygems

Version Path
twilio-ruby-3.13.1 lib/twilio-ruby/rest/queues/members.rb
twilio-ruby-3.13.0 lib/twilio-ruby/rest/queues/members.rb