Class: Twilio::REST::Intelligence::V2::TranscriptInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Intelligence::V2::TranscriptInstance
- Defined in:
- lib/twilio-ruby/rest/intelligence/v2/transcript.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID identifier of the Account.
-
#channel ⇒ Hash
Media Channel describing Transcript Source and Participant Mapping.
-
#context ⇒ TranscriptContext
Generate an instance context for the instance, the context is capable of performing various actions.
- #customer_key ⇒ String
-
#data_logging ⇒ Boolean
Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models.
-
#date_created ⇒ Time
The date that this Transcript was created, given in ISO 8601 format.
-
#date_updated ⇒ Time
The date that this Transcript was updated, given in ISO 8601 format.
-
#delete ⇒ Boolean
Delete the TranscriptInstance.
-
#duration ⇒ String
The duration of this Transcript’s source.
-
#encrypted_operator_results ⇒ encrypted_operator_results
Access the encrypted_operator_results.
-
#encrypted_sentences ⇒ encrypted_sentences
Access the encrypted_sentences.
-
#encryption_credential_sid ⇒ String
The unique SID identifier of the Public Key resource used to encrypt the sentences and operator results.
-
#fetch ⇒ TranscriptInstance
Fetch the TranscriptInstance.
-
#initialize(version, payload, sid: nil) ⇒ TranscriptInstance
constructor
Initialize the TranscriptInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#language_code ⇒ String
The default language code of the audio.
- #links ⇒ Hash
-
#media ⇒ media
Access the media.
-
#media_start_time ⇒ Time
The date that this Transcript’s media was started, given in ISO 8601 format.
-
#operator_results ⇒ operator_results
Access the operator_results.
-
#redaction ⇒ Boolean
If the transcript has been redacted, a redacted alternative of the transcript will be available.
-
#sentences ⇒ sentences
Access the sentences.
-
#service_sid ⇒ String
The unique SID identifier of the Service.
-
#sid ⇒ String
A 34 character string that uniquely identifies this Transcript.
- #status ⇒ Status
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ TranscriptInstance
Initialize the TranscriptInstance
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 610 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'service_sid' => payload['service_sid'], 'sid' => payload['sid'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'status' => payload['status'], 'channel' => payload['channel'], 'data_logging' => payload['data_logging'], 'language_code' => payload['language_code'], 'customer_key' => payload['customer_key'], 'media_start_time' => Twilio.deserialize_iso8601_datetime(payload['media_start_time']), 'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i, 'url' => payload['url'], 'redaction' => payload['redaction'], 'encryption_credential_sid' => payload['encryption_credential_sid'], 'links' => payload['links'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique SID identifier of the Account.
652 653 654 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 652 def account_sid @properties['account_sid'] end |
#channel ⇒ Hash
Returns Media Channel describing Transcript Source and Participant Mapping.
688 689 690 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 688 def channel @properties['channel'] end |
#context ⇒ TranscriptContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
643 644 645 646 647 648 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 643 def context unless @instance_context @instance_context = TranscriptContext.new(@version , @params['sid']) end @instance_context end |
#customer_key ⇒ String
706 707 708 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 706 def customer_key @properties['customer_key'] end |
#data_logging ⇒ Boolean
Returns Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.
694 695 696 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 694 def data_logging @properties['data_logging'] end |
#date_created ⇒ Time
Returns The date that this Transcript was created, given in ISO 8601 format.
670 671 672 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 670 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this Transcript was updated, given in ISO 8601 format.
676 677 678 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 676 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the TranscriptInstance
749 750 751 752 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 749 def delete context.delete end |
#duration ⇒ String
Returns The duration of this Transcript’s source.
718 719 720 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 718 def duration @properties['duration'] end |
#encrypted_operator_results ⇒ encrypted_operator_results
Access the encrypted_operator_results
786 787 788 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 786 def encrypted_operator_results context.encrypted_operator_results end |
#encrypted_sentences ⇒ encrypted_sentences
Access the encrypted_sentences
772 773 774 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 772 def encrypted_sentences context.encrypted_sentences end |
#encryption_credential_sid ⇒ String
Returns The unique SID identifier of the Public Key resource used to encrypt the sentences and operator results.
736 737 738 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 736 def encryption_credential_sid @properties['encryption_credential_sid'] end |
#fetch ⇒ TranscriptInstance
Fetch the TranscriptInstance
757 758 759 760 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 757 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
806 807 808 809 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 806 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V2.TranscriptInstance #{values}>" end |
#language_code ⇒ String
Returns The default language code of the audio.
700 701 702 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 700 def language_code @properties['language_code'] end |
#links ⇒ Hash
742 743 744 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 742 def links @properties['links'] end |
#media ⇒ media
Access the media
779 780 781 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 779 def media context.media end |
#media_start_time ⇒ Time
Returns The date that this Transcript’s media was started, given in ISO 8601 format.
712 713 714 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 712 def media_start_time @properties['media_start_time'] end |
#operator_results ⇒ operator_results
Access the operator_results
793 794 795 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 793 def operator_results context.operator_results end |
#redaction ⇒ Boolean
Returns If the transcript has been redacted, a redacted alternative of the transcript will be available.
730 731 732 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 730 def redaction @properties['redaction'] end |
#sentences ⇒ sentences
Access the sentences
765 766 767 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 765 def sentences context.sentences end |
#service_sid ⇒ String
Returns The unique SID identifier of the Service.
658 659 660 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 658 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this Transcript.
664 665 666 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 664 def sid @properties['sid'] end |
#status ⇒ Status
682 683 684 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 682 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
799 800 801 802 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 799 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V2.TranscriptInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
724 725 726 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 724 def url @properties['url'] end |