Class: Twilio::REST::Intelligence::V2::TranscriptContext::OperatorResultContext

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

Overview

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Instance Method Summary collapse

Constructor Details

#initialize(version, transcript_sid, operator_sid) ⇒ OperatorResultContext

Initialize the OperatorResultContext

Parameters:

  • version (Version)

    Version that contains the resource

  • transcript_sid (String)

    A 34 character string that uniquely identifies this Transcript.

  • operator_sid (String)

    A 34 character string that identifies this Language Understanding operator sid.



143
144
145
146
147
148
149
150
151
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb', line 143

def initialize(version, transcript_sid, operator_sid)
    super(version)

    # Path Solution
    @solution = { transcript_sid: transcript_sid, operator_sid: operator_sid,  }
    @uri = "/Transcripts/#{@solution[:transcript_sid]}/OperatorResults/#{@solution[:operator_sid]}"

    
end

Instance Method Details

#fetch(redacted: :unset) ⇒ OperatorResultInstance

Fetch the OperatorResultInstance

Parameters:

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

    Grant access to PII redacted/unredacted Language Understanding operator. The default is True.

Returns:



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb', line 156

def fetch(
    redacted: :unset
)

    params = Twilio::Values.of({
        'Redacted' => redacted,
    })
    payload = @version.fetch('GET', @uri, params: params)
    OperatorResultInstance.new(
        @version,
        payload,
        transcript_sid: @solution[:transcript_sid],
        operator_sid: @solution[:operator_sid],
    )
end

#inspectObject

Provide a detailed, user friendly representation



182
183
184
185
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb', line 182

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Intelligence.V2.OperatorResultContext #{context}>"
end

#to_sObject

Provide a user friendly representation



175
176
177
178
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb', line 175

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Intelligence.V2.OperatorResultContext #{context}>"
end