class Twilio::REST::Api::V2010::AccountContext::QueueContext::MemberContext

Public Class Methods

new(version, account_sid, queue_sid, call_sid) click to toggle source

Initialize the MemberContext @param [Version] version Version that contains the resource @param [String] account_sid The SID of the

{Account}[https://www.twilio.com/docs/iam/api/account] that created the Member
resource(s) to fetch.

@param [String] queue_sid The SID of the Queue in which to find the members to

fetch.

@param [String] call_sid The

{Call}[https://www.twilio.com/docs/voice/api/call-resource] SID of the
resource(s) to fetch.

@return [MemberContext] MemberContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/api/v2010/account/queue/member.rb
166 def initialize(version, account_sid, queue_sid, call_sid)
167   super(version)
168 
169   # Path Solution
170   @solution = {account_sid: account_sid, queue_sid: queue_sid, call_sid: call_sid, }
171   @uri = "/Accounts/#{@solution[:account_sid]}/Queues/#{@solution[:queue_sid]}/Members/#{@solution[:call_sid]}.json"
172 end

Public Instance Methods

fetch() click to toggle source

Fetch the MemberInstance @return [MemberInstance] Fetched MemberInstance

    # File lib/twilio-ruby/rest/api/v2010/account/queue/member.rb
177 def fetch
178   payload = @version.fetch('GET', @uri)
179 
180   MemberInstance.new(
181       @version,
182       payload,
183       account_sid: @solution[:account_sid],
184       queue_sid: @solution[:queue_sid],
185       call_sid: @solution[:call_sid],
186   )
187 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/queue/member.rb
219 def inspect
220   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
221   "#<Twilio.Api.V2010.MemberContext #{context}>"
222 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/queue/member.rb
212 def to_s
213   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
214   "#<Twilio.Api.V2010.MemberContext #{context}>"
215 end
update(url: nil, method: :unset) click to toggle source

Update the MemberInstance @param [String] url The absolute URL of the Queue resource. @param [String] method How to pass the update request data. Can be `GET` or

`POST` and the default is `POST`. `POST` sends the data as encoded form data and
`GET` sends the data as query parameters.

@return [MemberInstance] Updated MemberInstance

    # File lib/twilio-ruby/rest/api/v2010/account/queue/member.rb
196 def update(url: nil, method: :unset)
197   data = Twilio::Values.of({'Url' => url, 'Method' => method, })
198 
199   payload = @version.update('POST', @uri, data: data)
200 
201   MemberInstance.new(
202       @version,
203       payload,
204       account_sid: @solution[:account_sid],
205       queue_sid: @solution[:queue_sid],
206       call_sid: @solution[:call_sid],
207   )
208 end