Class: Twilio::REST::Api::V2010::AccountContext::CallContext::TranscriptionContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Api::V2010::AccountContext::CallContext::TranscriptionContext
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb
Instance Method Summary collapse
-
#initialize(version, account_sid, call_sid, sid) ⇒ TranscriptionContext
constructor
Initialize the TranscriptionContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(status: nil) ⇒ TranscriptionInstance
Update the TranscriptionInstance.
Constructor Details
#initialize(version, account_sid, call_sid, sid) ⇒ TranscriptionContext
Initialize the TranscriptionContext
120 121 122 123 124 125 126 127 128 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 120 def initialize(version, account_sid, call_sid, sid) super(version) # Path Solution @solution = { account_sid: account_sid, call_sid: call_sid, sid: sid, } @uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/Transcriptions/#{@solution[:sid]}.json" end |
Instance Method Details
#inspect ⇒ Object
Provide a detailed, user friendly representation
167 168 169 170 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 167 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.TranscriptionContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
160 161 162 163 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 160 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.TranscriptionContext #{context}>" end |
#update(status: nil) ⇒ TranscriptionInstance
Update the TranscriptionInstance
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 133 def update( status: nil ) data = Twilio::Values.of({ 'Status' => status, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, data: data, headers: headers) TranscriptionInstance.new( @version, payload, account_sid: @solution[:account_sid], call_sid: @solution[:call_sid], sid: @solution[:sid], ) end |