Class: Twilio::REST::Intelligence::V2::TranscriptContext::OperatorResultContext
- Inherits:
-
Twilio::REST::InstanceContext
- Object
- Twilio::REST::InstanceContext
- Twilio::REST::Intelligence::V2::TranscriptContext::OperatorResultContext
- Defined in:
- lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb
Instance Method Summary collapse
-
#fetch(redacted: :unset) ⇒ OperatorResultInstance
Fetch the OperatorResultInstance.
-
#initialize(version, transcript_sid, operator_sid) ⇒ OperatorResultContext
constructor
Initialize the OperatorResultContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, transcript_sid, operator_sid) ⇒ OperatorResultContext
Initialize the OperatorResultContext
145 146 147 148 149 150 151 152 153 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb', line 145 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
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb', line 158 def fetch( redacted: :unset ) params = Twilio::Values.of({ 'Redacted' => redacted, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, params: params, headers: headers) OperatorResultInstance.new( @version, payload, transcript_sid: @solution[:transcript_sid], operator_sid: @solution[:operator_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
190 191 192 193 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb', line 190 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Intelligence.V2.OperatorResultContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
183 184 185 186 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb', line 183 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Intelligence.V2.OperatorResultContext #{context}>" end |