Class: Twilio::REST::Api::V2010::AccountContext::QueueContext::MemberContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Api::V2010::AccountContext::QueueContext::MemberContext
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/queue/member.rb
Instance Method Summary collapse
-
#fetch ⇒ MemberInstance
Fetch the MemberInstance.
-
#initialize(version, account_sid, queue_sid, call_sid) ⇒ MemberContext
constructor
Initialize the MemberContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(url: nil, method: :unset) ⇒ MemberInstance
Update the MemberInstance.
Constructor Details
#initialize(version, account_sid, queue_sid, call_sid) ⇒ MemberContext
Initialize the MemberContext
141 142 143 144 145 146 147 148 149 |
# File 'lib/twilio-ruby/rest/api/v2010/account/queue/member.rb', line 141 def initialize(version, account_sid, queue_sid, call_sid) super(version) # Path Solution @solution = { account_sid: account_sid, queue_sid: queue_sid, call_sid: call_sid, } @uri = "/Accounts/#{@solution[:account_sid]}/Queues/#{@solution[:queue_sid]}/Members/#{@solution[:call_sid]}.json" end |
Instance Method Details
#fetch ⇒ MemberInstance
Fetch the MemberInstance
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/twilio-ruby/rest/api/v2010/account/queue/member.rb', line 153 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) MemberInstance.new( @version, payload, account_sid: @solution[:account_sid], queue_sid: @solution[:queue_sid], call_sid: @solution[:call_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
212 213 214 215 |
# File 'lib/twilio-ruby/rest/api/v2010/account/queue/member.rb', line 212 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.MemberContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
205 206 207 208 |
# File 'lib/twilio-ruby/rest/api/v2010/account/queue/member.rb', line 205 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.MemberContext #{context}>" end |
#update(url: nil, method: :unset) ⇒ MemberInstance
Update the MemberInstance
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/twilio-ruby/rest/api/v2010/account/queue/member.rb', line 176 def update( url: nil, method: :unset ) data = Twilio::Values.of({ 'Url' => url, 'Method' => method, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, data: data, headers: headers) MemberInstance.new( @version, payload, account_sid: @solution[:account_sid], queue_sid: @solution[:queue_sid], call_sid: @solution[:call_sid], ) end |