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.



221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 221

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

#context ⇒ EncryptedOperatorResultsContext

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

Returns:



241
242
243
244
245
246
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 241

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:



270
271
272
273
274
275
276
277
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 270

def fetch(
  redacted: :unset
)

    context.fetch(
        redacted: redacted, 
    )
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



288
289
290
291
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 288

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

#locations ⇒ Array<String>

Returns The locations of the encrypted operator results.

Returns:

  • (Array<String>) —

    The locations of the encrypted operator results.



250
251
252
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 250

def locations
    @properties['locations']
end

#to_s ⇒ Object

Provide a user friendly representation



281
282
283
284
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 281

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

#transcript_sid ⇒ String

Returns:

  • (String)


256
257
258
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 256

def transcript_sid
    @properties['transcript_sid']
end

#url ⇒ String

Returns:

  • (String)


262
263
264
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 262

def url
    @properties['url']
end