Class: Twilio::REST::Api::V2010::AccountContext::CallContext::TranscriptionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::CallContext::TranscriptionInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created this Transcription resource.
-
#call_sid ⇒ String
The SID of the [Call](www.twilio.com/docs/voice/api/call-resource) the Transcription resource is associated with.
-
#context ⇒ TranscriptionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_updated ⇒ Time
The date and time in GMT that this resource was last updated, specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil) ⇒ TranscriptionInstance
constructor
Initialize the TranscriptionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#name ⇒ String
The user-specified name of this Transcription, if one was given when the Transcription was created.
-
#sid ⇒ String
The SID of the Transcription resource.
- #status ⇒ Status
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(status: nil) ⇒ TranscriptionInstance
Update the TranscriptionInstance.
- #uri ⇒ String
Constructor Details
#initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil) ⇒ TranscriptionInstance
Initialize the TranscriptionInstance
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 211 def initialize(version, payload , account_sid: nil, call_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'call_sid' => payload['call_sid'], 'name' => payload['name'], 'status' => payload['status'], 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 'uri' => payload['uri'], } # Context @instance_context = nil @params = { 'account_sid' => account_sid ,'call_sid' => call_sid || @properties['call_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created this Transcription resource.
249 250 251 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 249 def account_sid @properties['account_sid'] end |
#call_sid ⇒ String
Returns The SID of the [Call](www.twilio.com/docs/voice/api/call-resource) the Transcription resource is associated with.
255 256 257 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 255 def call_sid @properties['call_sid'] end |
#context ⇒ TranscriptionContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
234 235 236 237 238 239 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 234 def context unless @instance_context @instance_context = TranscriptionContext.new(@version , @params['account_sid'], @params['call_sid'], @params['sid']) end @instance_context end |
#date_updated ⇒ Time
Returns The date and time in GMT that this resource was last updated, specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
273 274 275 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 273 def date_updated @properties['date_updated'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
305 306 307 308 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 305 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.TranscriptionInstance #{values}>" end |
#name ⇒ String
Returns The user-specified name of this Transcription, if one was given when the Transcription was created. This may be used to stop the Transcription.
261 262 263 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 261 def name @properties['name'] end |
#sid ⇒ String
Returns The SID of the Transcription resource.
243 244 245 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 243 def sid @properties['sid'] end |
#status ⇒ Status
267 268 269 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 267 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
298 299 300 301 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 298 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.TranscriptionInstance #{values}>" end |
#update(status: nil) ⇒ TranscriptionInstance
Update the TranscriptionInstance
287 288 289 290 291 292 293 294 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 287 def update( status: nil ) context.update( status: status, ) end |
#uri ⇒ String
279 280 281 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb', line 279 def uri @properties['uri'] end |