Class: Twilio::REST::Api::V2010::AccountContext::RecordingContext::TranscriptionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::RecordingContext::TranscriptionInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Transcription resource.
-
#api_version ⇒ String
The API version used to create the transcription.
-
#context ⇒ TranscriptionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#date_updated ⇒ Time
The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#delete ⇒ Boolean
Delete the TranscriptionInstance.
-
#duration ⇒ String
The duration of the transcribed audio in seconds.
-
#fetch ⇒ TranscriptionInstance
Fetch the TranscriptionInstance.
-
#initialize(version, payload, account_sid: nil, recording_sid: nil, sid: nil) ⇒ TranscriptionInstance
constructor
Initialize the TranscriptionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#price ⇒ Float
The charge for the transcript in the currency associated with the account.
-
#price_unit ⇒ String
The currency in which
priceis measured, in [ISO 4127](www.iso.org/iso/home/standards/currency_codes.htm) format (e.g.usd,eur,jpy). -
#recording_sid ⇒ String
The SID of the [Recording](www.twilio.com/docs/voice/api/recording) from which the transcription was created.
-
#sid ⇒ String
The unique string that that we created to identify the Transcription resource.
- #status ⇒ Status
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#transcription_text ⇒ String
The text content of the transcription.
-
#type ⇒ String
The transcription type.
-
#uri ⇒ String
The URI of the resource, relative to
https://api.twilio.com.
Constructor Details
#initialize(version, payload, account_sid: nil, recording_sid: nil, sid: nil) ⇒ TranscriptionInstance
Initialize the TranscriptionInstance
416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 416 def initialize(version, payload , account_sid: nil, recording_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'api_version' => payload['api_version'], 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']), 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 'duration' => payload['duration'], 'price' => payload['price'], 'price_unit' => payload['price_unit'], 'recording_sid' => payload['recording_sid'], 'sid' => payload['sid'], 'status' => payload['status'], 'transcription_text' => payload['transcription_text'], 'type' => payload['type'], 'uri' => payload['uri'], } # Context @instance_context = nil @params = { 'account_sid' => account_sid ,'recording_sid' => recording_sid || @properties['recording_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 the Transcription resource.
455 456 457 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 455 def account_sid @properties['account_sid'] end |
#api_version ⇒ String
Returns The API version used to create the transcription.
461 462 463 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 461 def api_version @properties['api_version'] 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
446 447 448 449 450 451 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 446 def context unless @instance_context @instance_context = TranscriptionContext.new(@version , @params['account_sid'], @params['recording_sid'], @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
467 468 469 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 467 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
473 474 475 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 473 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the TranscriptionInstance
534 535 536 537 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 534 def delete context.delete end |
#duration ⇒ String
Returns The duration of the transcribed audio in seconds.
479 480 481 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 479 def duration @properties['duration'] end |
#fetch ⇒ TranscriptionInstance
Fetch the TranscriptionInstance
542 543 544 545 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 542 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
556 557 558 559 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 556 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.TranscriptionInstance #{values}>" end |
#price ⇒ Float
Returns The charge for the transcript in the currency associated with the account. This value is populated after the transcript is complete so it may not be available immediately.
485 486 487 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 485 def price @properties['price'] end |
#price_unit ⇒ String
Returns The currency in which price is measured, in [ISO 4127](www.iso.org/iso/home/standards/currency_codes.htm) format (e.g. usd, eur, jpy).
491 492 493 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 491 def price_unit @properties['price_unit'] end |
#recording_sid ⇒ String
Returns The SID of the [Recording](www.twilio.com/docs/voice/api/recording) from which the transcription was created.
497 498 499 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 497 def recording_sid @properties['recording_sid'] end |
#sid ⇒ String
Returns The unique string that that we created to identify the Transcription resource.
503 504 505 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 503 def sid @properties['sid'] end |
#status ⇒ Status
509 510 511 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 509 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
549 550 551 552 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 549 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.TranscriptionInstance #{values}>" end |
#transcription_text ⇒ String
Returns The text content of the transcription.
515 516 517 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 515 def transcription_text @properties['transcription_text'] end |
#type ⇒ String
Returns The transcription type.
521 522 523 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 521 def type @properties['type'] end |
#uri ⇒ String
Returns The URI of the resource, relative to https://api.twilio.com.
527 528 529 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb', line 527 def uri @properties['uri'] end |