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

Public Class Methods

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

Initialize the PayloadInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] account_sid The SID of the

{Account}[https://www.twilio.com/docs/iam/api/account] that created the
Recording AddOnResult Payload resource.

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

resource that contains the payload belongs.

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

payload belongs.

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

Recording AddOnResult Payload resource to fetch.

@return [PayloadInstance] PayloadInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
242 def initialize(version, payload, account_sid: nil, reference_sid: nil, add_on_result_sid: nil, sid: nil)
243   super(version)
244 
245   # Marshaled Properties
246   @properties = {
247       'sid' => payload['sid'],
248       'add_on_result_sid' => payload['add_on_result_sid'],
249       'account_sid' => payload['account_sid'],
250       'label' => payload['label'],
251       'add_on_sid' => payload['add_on_sid'],
252       'add_on_configuration_sid' => payload['add_on_configuration_sid'],
253       'content_type' => payload['content_type'],
254       'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
255       'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
256       'reference_sid' => payload['reference_sid'],
257       'subresource_uris' => payload['subresource_uris'],
258   }
259 
260   # Context
261   @instance_context = nil
262   @params = {
263       'account_sid' => account_sid,
264       'reference_sid' => reference_sid,
265       'add_on_result_sid' => add_on_result_sid,
266       'sid' => sid || @properties['sid'],
267   }
268 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
301 def account_sid
302   @properties['account_sid']
303 end
add_on_configuration_sid() click to toggle source

@return [String] The SID of the Add-on configuration

    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
319 def add_on_configuration_sid
320   @properties['add_on_configuration_sid']
321 end
add_on_result_sid() click to toggle source

@return [String] The SID of the AddOnResult to which the payload belongs

    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
295 def add_on_result_sid
296   @properties['add_on_result_sid']
297 end
add_on_sid() click to toggle source

@return [String] The SID of the Add-on to which the result belongs

    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
313 def add_on_sid
314   @properties['add_on_sid']
315 end
content_type() click to toggle source

@return [String] The MIME type of the payload

    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
325 def content_type
326   @properties['content_type']
327 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [PayloadContext] PayloadContext for this PayloadInstance

    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
274 def context
275   unless @instance_context
276     @instance_context = PayloadContext.new(
277         @version,
278         @params['account_sid'],
279         @params['reference_sid'],
280         @params['add_on_result_sid'],
281         @params['sid'],
282     )
283   end
284   @instance_context
285 end
date_created() click to toggle source

@return [Time] The RFC 2822 date and time in GMT that the resource was created

    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
331 def date_created
332   @properties['date_created']
333 end
date_updated() click to toggle source

@return [Time] The RFC 2822 date and time in GMT that the resource was last updated

    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
337 def date_updated
338   @properties['date_updated']
339 end
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
363 def delete
364   context.delete
365 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
356 def fetch
357   context.fetch
358 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
376 def inspect
377   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
378   "<Twilio.Api.V2010.PayloadInstance #{values}>"
379 end
label() click to toggle source

@return [String] The string that describes the payload

    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
307 def label
308   @properties['label']
309 end
reference_sid() click to toggle source

@return [String] The SID of the recording to which the AddOnResult resource that contains the payload belongs

    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
343 def reference_sid
344   @properties['reference_sid']
345 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
289 def sid
290   @properties['sid']
291 end
subresource_uris() click to toggle source

@return [String] A list of related resources identified by their relative URIs

    # File lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
349 def subresource_uris
350   @properties['subresource_uris']
351 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
369 def to_s
370   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
371   "<Twilio.Api.V2010.PayloadInstance #{values}>"
372 end