Permalink
Browse files

add some methods to the members list for handling the front of a queue

  • Loading branch information...
1 parent cc81aa5 commit 8cd9096fbd1b8ada344ac484fd9551c41e33b1c0 @andrewmbenton andrewmbenton committed Aug 10, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 lib/twilio-ruby/rest/queues/members.rb
@@ -6,6 +6,18 @@ def initialize(uri, client)
# hard-code the json keys since members are special
@list_key, @instance_id_key = 'queue_members', 'call_sid'
end
+
+ def front
+ @instance_class.new "#{@uri}/Front", @client
+ end
+
+ def front!
+ front.refresh
+ end
+
+ def dequeue(url, method='POST')
+ front.dequeue url, method
+ end
end
class Member < InstanceResource

0 comments on commit 8cd9096

Please sign in to comment.