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.



139
140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 139

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:



158
159
160
161
162
163
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 158

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:



187
188
189
190
191
192
193
194
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 187

def fetch(
    redacted: :unset
)

    context.fetch(
        redacted: redacted, 
    )
end

#inspectObject

Provide a detailed, user friendly representation



205
206
207
208
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 205

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.



167
168
169
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 167

def locations
    @properties['locations']
end

#to_sObject

Provide a user friendly representation



198
199
200
201
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 198

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

#transcript_sidString

Returns:

  • (String)


173
174
175
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 173

def transcript_sid
    @properties['transcript_sid']
end

#urlString

Returns:

  • (String)


179
180
181
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb', line 179

def url
    @properties['url']
end