Class: Twilio::REST::Intelligence::V2::TranscriptContext::EncryptedOperatorResultsInstance

Inherits:
Twilio::REST::InstanceResource show all
Defined in:
lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, transcript_sid: nil) ⇒ EncryptedOperatorResultsInstance

Initialize the EncryptedOperatorResultsInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this EncryptedOperatorResults resource.

  • sid (String)

    The SID of the Call resource to fetch.



280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 280

def initialize(version, payload , transcript_sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'locations' => payload['locations'],
        'transcript_sid' => payload['transcript_sid'],
        'url' => payload['url'],
    }

    # Context
    @instance_context = nil
    @params = { 'transcript_sid' => transcript_sid  || @properties['transcript_sid']  , }
end

Instance Method Details

#contextEncryptedOperatorResultsContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



300
301
302
303
304
305
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 300

def context
    unless @instance_context
        @instance_context = EncryptedOperatorResultsContext.new(@version , @params['transcript_sid'])
    end
    @instance_context
end

#fetch(redacted: :unset) ⇒ EncryptedOperatorResultsInstance

Fetch the EncryptedOperatorResultsInstance

Parameters:

  • redacted (Boolean) (defaults to: :unset)

    Grant access to PII Redacted/Unredacted Operator Results. If redaction is enabled, the default is true to access redacted operator results.

Returns:



329
330
331
332
333
334
335
336
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 329

def fetch(
    redacted: :unset
)

    context.fetch(
        redacted: redacted, 
    )
end

#inspectObject

Provide a detailed, user friendly representation



347
348
349
350
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 347

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Intelligence.V2.EncryptedOperatorResultsInstance #{values}>"
end

#locationsArray<String>

Returns The locations of the encrypted operator results.

Returns:

  • (Array<String>)

    The locations of the encrypted operator results.



309
310
311
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 309

def locations
    @properties['locations']
end

#to_sObject

Provide a user friendly representation



340
341
342
343
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 340

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Intelligence.V2.EncryptedOperatorResultsInstance #{values}>"
end

#transcript_sidString

Returns:

  • (String)


315
316
317
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 315

def transcript_sid
    @properties['transcript_sid']
end

#urlString

Returns:

  • (String)


321
322
323
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 321

def url
    @properties['url']
end