class Twilio::REST::Api::V2010::AccountContext::RecordingContext::AddOnResultContext::PayloadContext

Public Class Methods

new(version, account_sid, reference_sid, add_on_result_sid, sid) click to toggle source

Initialize the PayloadContext @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
Recording AddOnResult Payload resource to fetch.

@param [String] reference_sid The SID of the recording to which the AddOnResult

resource that contains the payload to fetch belongs.

@param [String] add_on_result_sid The SID of the AddOnResult to which the

payload to fetch belongs.

@param [String] sid The Twilio-provided string that uniquely identifies the

Recording AddOnResult Payload resource to fetch.

@return [PayloadContext] PayloadContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
176 def initialize(version, account_sid, reference_sid, add_on_result_sid, sid)
177   super(version)
178 
179   # Path Solution
180   @solution = {
181       account_sid: account_sid,
182       reference_sid: reference_sid,
183       add_on_result_sid: add_on_result_sid,
184       sid: sid,
185   }
186   @uri = "/Accounts/#{@solution[:account_sid]}/Recordings/#{@solution[:reference_sid]}/AddOnResults/#{@solution[:add_on_result_sid]}/Payloads/#{@solution[:sid]}.json"
187 end

Public Instance Methods

delete() click to toggle source

Delete the PayloadInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
208 def delete
209    @version.delete('DELETE', @uri)
210 end
fetch() click to toggle source

Fetch the PayloadInstance @return [PayloadInstance] Fetched PayloadInstance

    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
192 def fetch
193   payload = @version.fetch('GET', @uri)
194 
195   PayloadInstance.new(
196       @version,
197       payload,
198       account_sid: @solution[:account_sid],
199       reference_sid: @solution[:reference_sid],
200       add_on_result_sid: @solution[:add_on_result_sid],
201       sid: @solution[:sid],
202   )
203 end
inspect() click to toggle source

Provide a detailed, user friendly representation

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

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
214 def to_s
215   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
216   "#<Twilio.Api.V2010.PayloadContext #{context}>"
217 end