Class: Twilio::REST::Intelligence::V2::ServiceInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Intelligence::V2::ServiceInstance
- Defined in:
- lib/twilio-ruby/rest/intelligence/v2/service.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID identifier of the Account the Service belongs to.
-
#auto_redaction ⇒ Boolean
Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service.
-
#auto_transcribe ⇒ Boolean
Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.
-
#context ⇒ ServiceContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#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 Service was created, given in ISO 8601 format.
-
#date_updated ⇒ Time
The date that this Service was updated, given in ISO 8601 format.
-
#delete ⇒ Boolean
Delete the ServiceInstance.
-
#encryption_credential_sid ⇒ String
The unique SID identifier of the Public Key resource used to encrypt the sentences and operator results.
-
#fetch ⇒ ServiceInstance
Fetch the ServiceInstance.
-
#friendly_name ⇒ String
A human readable description of this resource, up to 64 characters.
-
#initialize(version, payload, sid: nil) ⇒ ServiceInstance
constructor
Initialize the ServiceInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#language_code ⇒ String
The language code set during Service creation determines the Transcription language for all call recordings processed by that Service.
-
#media_redaction ⇒ Boolean
Instructs the Speech Recognition service to automatically redact PII from all transcripts media made on this service.
-
#read_only_attached_operator_sids ⇒ Array<String>
Operator sids attached to this service, read only.
-
#sid ⇒ String
A 34 character string that uniquely identifies this Service.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID.
-
#update(auto_transcribe: :unset, data_logging: :unset, friendly_name: :unset, unique_name: :unset, auto_redaction: :unset, media_redaction: :unset, webhook_url: :unset, webhook_http_method: :unset, encryption_credential_sid: :unset, if_match: :unset) ⇒ ServiceInstance
Update the ServiceInstance.
-
#url ⇒ String
The URL of this resource.
-
#version ⇒ String
The version number of this Service.
- #webhook_http_method ⇒ HttpMethod
-
#webhook_url ⇒ String
The URL Twilio will request when executing the Webhook.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ ServiceInstance
Initialize the ServiceInstance
635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 635 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'auto_redaction' => payload['auto_redaction'], 'media_redaction' => payload['media_redaction'], 'auto_transcribe' => payload['auto_transcribe'], 'data_logging' => payload['data_logging'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'friendly_name' => payload['friendly_name'], 'language_code' => payload['language_code'], 'sid' => payload['sid'], 'unique_name' => payload['unique_name'], 'url' => payload['url'], 'webhook_url' => payload['webhook_url'], 'webhook_http_method' => payload['webhook_http_method'], 'read_only_attached_operator_sids' => payload['read_only_attached_operator_sids'], 'version' => payload['version'] == nil ? payload['version'] : payload['version'].to_i, 'encryption_credential_sid' => payload['encryption_credential_sid'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique SID identifier of the Account the Service belongs to.
678 679 680 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 678 def account_sid @properties['account_sid'] end |
#auto_redaction ⇒ Boolean
Returns Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service.
684 685 686 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 684 def auto_redaction @properties['auto_redaction'] end |
#auto_transcribe ⇒ Boolean
Returns Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.
696 697 698 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 696 def auto_transcribe @properties['auto_transcribe'] end |
#context ⇒ ServiceContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
669 670 671 672 673 674 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 669 def context unless @instance_context @instance_context = ServiceContext.new(@version , @params['sid']) end @instance_context 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.
702 703 704 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 702 def data_logging @properties['data_logging'] end |
#date_created ⇒ Time
Returns The date that this Service was created, given in ISO 8601 format.
708 709 710 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 708 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this Service was updated, given in ISO 8601 format.
714 715 716 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 714 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the ServiceInstance
781 782 783 784 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 781 def delete context.delete end |
#encryption_credential_sid ⇒ String
Returns The unique SID identifier of the Public Key resource used to encrypt the sentences and operator results.
774 775 776 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 774 def encryption_credential_sid @properties['encryption_credential_sid'] end |
#fetch ⇒ ServiceInstance
Fetch the ServiceInstance
789 790 791 792 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 789 def fetch context.fetch end |
#friendly_name ⇒ String
Returns A human readable description of this resource, up to 64 characters.
720 721 722 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 720 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
843 844 845 846 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 843 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V2.ServiceInstance #{values}>" end |
#language_code ⇒ String
Returns The language code set during Service creation determines the Transcription language for all call recordings processed by that Service. The default is en-US if no language code is set. A Service can only support one language code, and it cannot be updated once it’s set.
726 727 728 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 726 def language_code @properties['language_code'] end |
#media_redaction ⇒ Boolean
Returns Instructs the Speech Recognition service to automatically redact PII from all transcripts media made on this service. The auto_redaction flag must be enabled, results in error otherwise.
690 691 692 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 690 def media_redaction @properties['media_redaction'] end |
#read_only_attached_operator_sids ⇒ Array<String>
Returns Operator sids attached to this service, read only.
762 763 764 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 762 def read_only_attached_operator_sids @properties['read_only_attached_operator_sids'] end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this Service.
732 733 734 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 732 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
836 837 838 839 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 836 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V2.ServiceInstance #{values}>" end |
#unique_name ⇒ String
Returns Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID.
738 739 740 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 738 def unique_name @properties['unique_name'] end |
#update(auto_transcribe: :unset, data_logging: :unset, friendly_name: :unset, unique_name: :unset, auto_redaction: :unset, media_redaction: :unset, webhook_url: :unset, webhook_http_method: :unset, encryption_credential_sid: :unset, if_match: :unset) ⇒ ServiceInstance
Update the ServiceInstance
807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 807 def update( auto_transcribe: :unset, data_logging: :unset, friendly_name: :unset, unique_name: :unset, auto_redaction: :unset, media_redaction: :unset, webhook_url: :unset, webhook_http_method: :unset, encryption_credential_sid: :unset, if_match: :unset ) context.update( auto_transcribe: auto_transcribe, data_logging: data_logging, friendly_name: friendly_name, unique_name: unique_name, auto_redaction: auto_redaction, media_redaction: media_redaction, webhook_url: webhook_url, webhook_http_method: webhook_http_method, encryption_credential_sid: encryption_credential_sid, if_match: if_match, ) end |
#url ⇒ String
Returns The URL of this resource.
744 745 746 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 744 def url @properties['url'] end |
#version ⇒ String
Returns The version number of this Service.
768 769 770 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 768 def version @properties['version'] end |
#webhook_http_method ⇒ HttpMethod
756 757 758 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 756 def webhook_http_method @properties['webhook_http_method'] end |
#webhook_url ⇒ String
Returns The URL Twilio will request when executing the Webhook.
750 751 752 |
# File 'lib/twilio-ruby/rest/intelligence/v2/service.rb', line 750 def webhook_url @properties['webhook_url'] end |