Class: Twilio::REST::Verify::V2::ServiceInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/verify/v2/service.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, sid: nil) ⇒ ServiceInstance

Initialize the ServiceInstance



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
638
639
640
641
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 610

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_tokensaccess_tokens

Access the access_tokens



922
923
924
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 922

def access_tokens
    context.access_tokens
end

#account_sidString



662
663
664
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 662

def 
    @properties['account_sid']
end

#approve_challengeapprove_challenge

Access the approve_challenge



908
909
910
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 908

def approve_challenge
    context.approve_challenge
end

#code_lengthString



674
675
676
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 674

def code_length
    @properties['code_length']
end

#contextServiceContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context



647
648
649
650
651
652
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 647

def context
    unless @instance_context
        @instance_context = ServiceContext.new(@version , @params['sid'])
    end
    @instance_context
end

#custom_code_enabledBoolean



716
717
718
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 716

def custom_code_enabled
    @properties['custom_code_enabled']
end

#date_createdTime



758
759
760
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 758

def date_created
    @properties['date_created']
end

#date_updatedTime



764
765
766
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 764

def date_updated
    @properties['date_updated']
end

#default_template_sidString



734
735
736
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 734

def default_template_sid
    @properties['default_template_sid']
end

#deleteBoolean

Delete the ServiceInstance



783
784
785
786
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 783

def delete

    context.delete
end

#do_not_share_warning_enabledBoolean



710
711
712
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 710

def do_not_share_warning_enabled
    @properties['do_not_share_warning_enabled']
end

#dtmf_input_requiredBoolean



698
699
700
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 698

def dtmf_input_required
    @properties['dtmf_input_required']
end

#entitiesentities

Access the entities



950
951
952
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 950

def entities
    context.entities
end

#fetchServiceInstance

Fetch the ServiceInstance



791
792
793
794
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 791

def fetch

    context.fetch
end

#friendly_nameString



668
669
670
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 668

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



970
971
972
973
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 970

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Verify.V2.ServiceInstance #{values}>"
end


776
777
778
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 776

def links
    @properties['links']
end

#lookup_enabledBoolean



680
681
682
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 680

def lookup_enabled
    @properties['lookup_enabled']
end

#messaging_configurationsmessaging_configurations

Access the messaging_configurations



936
937
938
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 936

def messaging_configurations
    context.messaging_configurations
end

#new_challengenew_challenge

Access the new_challenge



943
944
945
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 943

def new_challenge
    context.new_challenge
end

#new_factorsnew_factors

Access the new_factors



901
902
903
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 901

def new_factors
    context.new_factors
end

#new_verify_factorsnew_verify_factors

Access the new_verify_factors



894
895
896
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 894

def new_verify_factors
    context.new_verify_factors
end

#passkeysHash



746
747
748
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 746

def passkeys
    @properties['passkeys']
end

#psd2_enabledBoolean



686
687
688
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 686

def psd2_enabled
    @properties['psd2_enabled']
end

#pushHash



722
723
724
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 722

def push
    @properties['push']
end

#rate_limitsrate_limits

Access the rate_limits



957
958
959
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 957

def rate_limits
    context.rate_limits
end

#sidString



656
657
658
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 656

def sid
    @properties['sid']
end

#skip_sms_to_landlinesBoolean



692
693
694
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 692

def skip_sms_to_landlines
    @properties['skip_sms_to_landlines']
end

#to_sObject

Provide a user friendly representation



963
964
965
966
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 963

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Verify.V2.ServiceInstance #{values}>"
end

#totpHash



728
729
730
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 728

def totp
    @properties['totp']
end

#tts_nameString



704
705
706
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 704

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



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
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 825

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_id, 
        passkeys_relying_party_name: passkeys_relying_party_name, 
        passkeys_relying_party_origins: passkeys_relying_party_origins, 
        passkeys_authenticator_attachment: passkeys_authenticator_attachment, 
        passkeys_discoverable_credentials: passkeys_discoverable_credentials, 
        passkeys_user_verification: passkeys_user_verification, 
        verify_event_subscription_enabled: verify_event_subscription_enabled, 
    )
end

#urlString



770
771
772
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 770

def url
    @properties['url']
end

#verification_checksverification_checks

Access the verification_checks



887
888
889
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 887

def verification_checks
    context.verification_checks
end

#verificationsverifications

Access the verifications



915
916
917
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 915

def verifications
    context.verifications
end

#verify_event_subscription_enabledBoolean



752
753
754
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 752

def verify_event_subscription_enabled
    @properties['verify_event_subscription_enabled']
end

#webhookswebhooks

Access the webhooks



929
930
931
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 929

def webhooks
    context.webhooks
end

#whatsappHash



740
741
742
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 740

def whatsapp
    @properties['whatsapp']
end