Class: Twilio::REST::Verify::V2::ServiceInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Verify::V2::ServiceInstance
- Defined in:
- lib/twilio-ruby/rest/verify/v2/service.rb
Instance Method Summary collapse
-
#access_tokens ⇒ access_tokens
Access the access_tokens.
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Service resource.
-
#code_length ⇒ String
The length of the verification code to generate.
-
#context ⇒ ServiceContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#custom_code_enabled ⇒ Boolean
Whether to allow sending verifications with a custom code instead of a randomly generated one.
-
#date_created ⇒ Time
The date and time in GMT when the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
- #default_template_sid ⇒ String
-
#delete ⇒ Boolean
Delete the ServiceInstance.
-
#do_not_share_warning_enabled ⇒ Boolean
Whether to add a security warning at the end of an SMS verification body.
-
#dtmf_input_required ⇒ Boolean
Whether to ask the user to press a number before delivering the verify code in a phone call.
-
#entities ⇒ entities
Access the entities.
-
#fetch ⇒ ServiceInstance
Fetch the ServiceInstance.
-
#friendly_name ⇒ String
The name that appears in the body of your verification messages.
-
#initialize(version, payload, sid: nil) ⇒ ServiceInstance
constructor
Initialize the ServiceInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ Hash
The URLs of related resources.
-
#lookup_enabled ⇒ Boolean
Whether to perform a lookup with each verification started and return info about the phone number.
-
#messaging_configurations ⇒ messaging_configurations
Access the messaging_configurations.
-
#new_factors ⇒ new_factors
Access the new_factors.
- #passkeys ⇒ Hash
-
#psd2_enabled ⇒ Boolean
Whether to pass PSD2 transaction parameters when starting a verification.
-
#push ⇒ Hash
Configurations for the Push factors (channel) created under this Service.
-
#rate_limits ⇒ rate_limits
Access the rate_limits.
-
#sid ⇒ String
The unique string that we created to identify the Service resource.
-
#skip_sms_to_landlines ⇒ Boolean
Whether to skip sending SMS verifications to landlines.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#totp ⇒ Hash
Configurations for the TOTP factors (channel) created under this Service.
-
#tts_name ⇒ String
The name of an alternative text-to-speech service to use in phone calls.
-
#update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset, default_template_sid: :unset, whatsapp_msg_service_sid: :unset, whatsapp_from: :unset, passkeys_relying_party_id: :unset, passkeys_relying_party_name: :unset, passkeys_relying_party_origins: :unset, passkeys_authenticator_attachment: :unset, passkeys_discoverable_credentials: :unset, passkeys_user_verification: :unset, verify_event_subscription_enabled: :unset) ⇒ ServiceInstance
Update the ServiceInstance.
-
#url ⇒ String
The absolute URL of the resource.
-
#verification_checks ⇒ verification_checks
Access the verification_checks.
-
#verifications ⇒ verifications
Access the verifications.
-
#verify_event_subscription_enabled ⇒ Boolean
Whether to allow verifications from the service to reach the stream-events sinks if configured.
-
#verify_factor ⇒ verify_factor
Access the verify_factor.
-
#webhooks ⇒ webhooks
Access the webhooks.
- #whatsapp ⇒ Hash
Constructor Details
#initialize(version, payload, sid: nil) ⇒ ServiceInstance
Initialize the ServiceInstance
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 587 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'friendly_name' => payload['friendly_name'], 'code_length' => payload['code_length'] == nil ? payload['code_length'] : payload['code_length'].to_i, 'lookup_enabled' => payload['lookup_enabled'], 'psd2_enabled' => payload['psd2_enabled'], 'skip_sms_to_landlines' => payload['skip_sms_to_landlines'], 'dtmf_input_required' => payload['dtmf_input_required'], 'tts_name' => payload['tts_name'], 'do_not_share_warning_enabled' => payload['do_not_share_warning_enabled'], 'custom_code_enabled' => payload['custom_code_enabled'], 'push' => payload['push'], 'totp' => payload['totp'], 'default_template_sid' => payload['default_template_sid'], 'whatsapp' => payload['whatsapp'], 'passkeys' => payload['passkeys'], 'verify_event_subscription_enabled' => payload['verify_event_subscription_enabled'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#access_tokens ⇒ access_tokens
Access the access_tokens
892 893 894 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 892 def access_tokens context.access_tokens end |
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Service resource.
639 640 641 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 639 def account_sid @properties['account_sid'] end |
#code_length ⇒ String
Returns The length of the verification code to generate.
651 652 653 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 651 def code_length @properties['code_length'] 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
624 625 626 627 628 629 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 624 def context unless @instance_context @instance_context = ServiceContext.new(@version , @params['sid']) end @instance_context end |
#custom_code_enabled ⇒ Boolean
Returns Whether to allow sending verifications with a custom code instead of a randomly generated one.
693 694 695 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 693 def custom_code_enabled @properties['custom_code_enabled'] end |
#date_created ⇒ Time
Returns The date and time in GMT when the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
735 736 737 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 735 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
741 742 743 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 741 def date_updated @properties['date_updated'] end |
#default_template_sid ⇒ String
711 712 713 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 711 def default_template_sid @properties['default_template_sid'] end |
#delete ⇒ Boolean
Delete the ServiceInstance
760 761 762 763 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 760 def delete context.delete end |
#do_not_share_warning_enabled ⇒ Boolean
Returns Whether to add a security warning at the end of an SMS verification body. Disabled by default and applies only to SMS. Example SMS body: ‘Your AppName verification code is: 1234. Don’t share this code with anyone; our employees will never ask for the code`.
687 688 689 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 687 def do_not_share_warning_enabled @properties['do_not_share_warning_enabled'] end |
#dtmf_input_required ⇒ Boolean
Returns Whether to ask the user to press a number before delivering the verify code in a phone call.
675 676 677 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 675 def dtmf_input_required @properties['dtmf_input_required'] end |
#entities ⇒ entities
Access the entities
913 914 915 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 913 def entities context.entities end |
#fetch ⇒ ServiceInstance
Fetch the ServiceInstance
768 769 770 771 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 768 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The name that appears in the body of your verification messages. It can be up to 30 characters long and can include letters, numbers, spaces, dashes, underscores. Phone numbers, special characters or links are NOT allowed. It cannot contain more than 4 (consecutive or non-consecutive) digits. **This value should not contain PII.**.
645 646 647 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 645 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
933 934 935 936 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 933 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.ServiceInstance #{values}>" end |
#links ⇒ Hash
Returns The URLs of related resources.
753 754 755 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 753 def links @properties['links'] end |
#lookup_enabled ⇒ Boolean
Returns Whether to perform a lookup with each verification started and return info about the phone number.
657 658 659 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 657 def lookup_enabled @properties['lookup_enabled'] end |
#messaging_configurations ⇒ messaging_configurations
Access the messaging_configurations
906 907 908 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 906 def messaging_configurations context.messaging_configurations end |
#new_factors ⇒ new_factors
Access the new_factors
871 872 873 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 871 def new_factors context.new_factors end |
#passkeys ⇒ Hash
723 724 725 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 723 def passkeys @properties['passkeys'] end |
#psd2_enabled ⇒ Boolean
Returns Whether to pass PSD2 transaction parameters when starting a verification.
663 664 665 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 663 def psd2_enabled @properties['psd2_enabled'] end |
#push ⇒ Hash
Returns Configurations for the Push factors (channel) created under this Service.
699 700 701 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 699 def push @properties['push'] end |
#rate_limits ⇒ rate_limits
Access the rate_limits
920 921 922 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 920 def rate_limits context.rate_limits end |
#sid ⇒ String
Returns The unique string that we created to identify the Service resource.
633 634 635 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 633 def sid @properties['sid'] end |
#skip_sms_to_landlines ⇒ Boolean
Returns Whether to skip sending SMS verifications to landlines. Requires ‘lookup_enabled`.
669 670 671 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 669 def skip_sms_to_landlines @properties['skip_sms_to_landlines'] end |
#to_s ⇒ Object
Provide a user friendly representation
926 927 928 929 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 926 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.ServiceInstance #{values}>" end |
#totp ⇒ Hash
Returns Configurations for the TOTP factors (channel) created under this Service.
705 706 707 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 705 def totp @properties['totp'] end |
#tts_name ⇒ String
Returns The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.
681 682 683 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 681 def tts_name @properties['tts_name'] end |
#update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset, default_template_sid: :unset, whatsapp_msg_service_sid: :unset, whatsapp_from: :unset, passkeys_relying_party_id: :unset, passkeys_relying_party_name: :unset, passkeys_relying_party_origins: :unset, passkeys_authenticator_attachment: :unset, passkeys_discoverable_credentials: :unset, passkeys_user_verification: :unset, verify_event_subscription_enabled: :unset) ⇒ ServiceInstance
Update the ServiceInstance
802 803 804 805 806 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 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 802 def update( friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset, default_template_sid: :unset, whatsapp_msg_service_sid: :unset, whatsapp_from: :unset, passkeys_relying_party_id: :unset, passkeys_relying_party_name: :unset, passkeys_relying_party_origins: :unset, passkeys_authenticator_attachment: :unset, passkeys_discoverable_credentials: :unset, passkeys_user_verification: :unset, verify_event_subscription_enabled: :unset ) context.update( friendly_name: friendly_name, code_length: code_length, lookup_enabled: lookup_enabled, skip_sms_to_landlines: skip_sms_to_landlines, dtmf_input_required: dtmf_input_required, tts_name: tts_name, psd2_enabled: psd2_enabled, do_not_share_warning_enabled: do_not_share_warning_enabled, custom_code_enabled: custom_code_enabled, push_include_date: push_include_date, push_apn_credential_sid: push_apn_credential_sid, push_fcm_credential_sid: push_fcm_credential_sid, totp_issuer: totp_issuer, totp_time_step: totp_time_step, totp_code_length: totp_code_length, totp_skew: totp_skew, default_template_sid: default_template_sid, whatsapp_msg_service_sid: whatsapp_msg_service_sid, whatsapp_from: whatsapp_from, passkeys_relying_party_id: , passkeys_relying_party_name: , passkeys_relying_party_origins: , passkeys_authenticator_attachment: , passkeys_discoverable_credentials: passkeys_discoverable_credentials, passkeys_user_verification: passkeys_user_verification, verify_event_subscription_enabled: verify_event_subscription_enabled, ) end |
#url ⇒ String
Returns The absolute URL of the resource.
747 748 749 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 747 def url @properties['url'] end |
#verification_checks ⇒ verification_checks
Access the verification_checks
864 865 866 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 864 def verification_checks context.verification_checks end |
#verifications ⇒ verifications
Access the verifications
885 886 887 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 885 def verifications context.verifications end |
#verify_event_subscription_enabled ⇒ Boolean
Returns Whether to allow verifications from the service to reach the stream-events sinks if configured.
729 730 731 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 729 def verify_event_subscription_enabled @properties['verify_event_subscription_enabled'] end |
#verify_factor ⇒ verify_factor
Access the verify_factor
878 879 880 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 878 def verify_factor context.verify_factor end |
#webhooks ⇒ webhooks
Access the webhooks
899 900 901 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 899 def webhooks context.webhooks end |
#whatsapp ⇒ Hash
717 718 719 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 717 def whatsapp @properties['whatsapp'] end |