Class: Twilio::REST::Verify::V2::ServiceContext

Inherits:
InstanceContext show all
Defined in:
lib/twilio-ruby/rest/verify/v2/service.rb,
lib/twilio-ruby/rest/verify/v2/service/entity.rb,
lib/twilio-ruby/rest/verify/v2/service/webhook.rb,
lib/twilio-ruby/rest/verify/v2/service/new_factor.rb,
lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb,
lib/twilio-ruby/rest/verify/v2/service/access_token.rb,
lib/twilio-ruby/rest/verify/v2/service/verification.rb,
lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb,
lib/twilio-ruby/rest/verify/v2/service/new_challenge.rb,
lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb,
lib/twilio-ruby/rest/verify/v2/service/approve_challenge.rb,
lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb,
lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb,
lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb,
lib/twilio-ruby/rest/verify/v2/service/verification_check.rb,
lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb,
lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb

Defined Under Namespace

Classes: AccessTokenContext, AccessTokenInstance, AccessTokenInstanceMetadata, AccessTokenList, AccessTokenListResponse, AccessTokenPage, AccessTokenPageMetadata, ApproveChallengeInstance, ApproveChallengeList, ApproveChallengeListResponse, ApproveChallengePage, ApproveChallengePageMetadata, EntityContext, EntityInstance, EntityInstanceMetadata, EntityList, EntityListResponse, EntityPage, EntityPageMetadata, MessagingConfigurationContext, MessagingConfigurationInstance, MessagingConfigurationInstanceMetadata, MessagingConfigurationList, MessagingConfigurationListResponse, MessagingConfigurationPage, MessagingConfigurationPageMetadata, NewChallengeContext, NewChallengeInstance, NewChallengeInstanceMetadata, NewChallengeList, NewChallengeListResponse, NewChallengePage, NewChallengePageMetadata, NewFactorInstance, NewFactorList, NewFactorListResponse, NewFactorPage, NewFactorPageMetadata, NewVerifyFactorInstance, NewVerifyFactorList, NewVerifyFactorListResponse, NewVerifyFactorPage, NewVerifyFactorPageMetadata, RateLimitContext, RateLimitInstance, RateLimitInstanceMetadata, RateLimitList, RateLimitListResponse, RateLimitPage, RateLimitPageMetadata, VerificationCheckInstance, VerificationCheckList, VerificationCheckListResponse, VerificationCheckPage, VerificationCheckPageMetadata, VerificationContext, VerificationInstance, VerificationInstanceMetadata, VerificationList, VerificationListResponse, VerificationPage, VerificationPageMetadata, WebhookContext, WebhookInstance, WebhookInstanceMetadata, WebhookList, WebhookListResponse, WebhookPage, WebhookPageMetadata

Instance Method Summary collapse

Constructor Details

#initialize(version, sid) ⇒ ServiceContext

Initialize the ServiceContext

Parameters:

  • version (Version)

    Version that contains the resource

  • sid (String)

    The Twilio-provided string that uniquely identifies the Service resource to update.



365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 365

def initialize(version, sid)
    super(version)
    

    # Path Solution
    @solution = { sid: sid,  }
    @uri = "/Services/#{@solution[:sid]}"

    # Dependents
    @verification_checks = nil
    @new_verify_factors = nil
    @new_factors = nil
    @approve_challenge = nil
    @verifications = nil
    @access_tokens = nil
    @webhooks = nil
    @messaging_configurations = nil
    @new_challenge = nil
    @entities = nil
    @rate_limits = nil
end

Instance Method Details

#access_tokens(sid = :unset) ⇒ AccessTokenList, AccessTokenContext

Access the access_tokens

Returns:

Raises:

  • (ArgumentError)


737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 737

def access_tokens(sid=:unset)

    raise ArgumentError, 'sid cannot be nil' if sid.nil?

    if sid != :unset
        return AccessTokenContext.new(@version, @solution[:sid],sid )
    end

    unless @access_tokens
        @access_tokens = AccessTokenList.new(
            @version, service_sid: @solution[:sid], )
    end

 @access_tokens
end

#approve_challengeApproveChallengeList, ApproveChallengeContext

Access the approve_challenge

Returns:



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

def approve_challenge
  unless @approve_challenge
    @approve_challenge = ApproveChallengeList.new(
            @version, )
  end
  @approve_challenge
end

#deleteBoolean

Delete the ServiceInstance

Returns:

  • (Boolean)

    True if delete succeeds, false otherwise



389
390
391
392
393
394
395
396
397
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 389

def delete

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    

    @version.delete('DELETE', @uri, headers: headers)
end

#delete_with_metadataBoolean

Delete the ServiceInstanceMetadata

Returns:

  • (Boolean)

    True if delete succeeds, false otherwise



402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 402

def 

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
      response = @version.('DELETE', @uri, headers: headers)
      service_instance = ServiceInstance.new(
          @version,
          response.body,
          account_sid: @solution[:account_sid],
          sid: @solution[:sid],
      )
      .new(@version, service_instance, response.headers, response.status_code)
end

#entities(identity = :unset) ⇒ EntityList, EntityContext

Access the entities

Returns:

Raises:

  • (ArgumentError)


804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 804

def entities(identity=:unset)

    raise ArgumentError, 'identity cannot be nil' if identity.nil?

    if identity != :unset
        return EntityContext.new(@version, @solution[:sid],identity )
    end

    unless @entities
        @entities = EntityList.new(
            @version, service_sid: @solution[:sid], )
    end

 @entities
end

#fetchServiceInstance

Fetch the ServiceInstance

Returns:



421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 421

def fetch

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.fetch('GET', @uri, headers: headers)
    ServiceInstance.new(
        @version,
        payload,
        sid: @solution[:sid],
    )
end

#fetch_with_metadataServiceInstance

Fetch the ServiceInstanceMetadata

Returns:



440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 440

def 

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    response = @version.('GET', @uri, headers: headers)
    service_instance = ServiceInstance.new(
        @version,
        response.body,
        sid: @solution[:sid],
    )
    .new(
        @version,
        service_instance,
        response.headers,
        response.status_code
    )
end

#inspectObject

Provide a detailed, user friendly representation



848
849
850
851
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 848

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Verify.V2.ServiceContext #{context}>"
end

#messaging_configurations(country = :unset) ⇒ MessagingConfigurationList, MessagingConfigurationContext

Access the messaging_configurations

Returns:

Raises:

  • (ArgumentError)


775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 775

def messaging_configurations(country=:unset)

    raise ArgumentError, 'country cannot be nil' if country.nil?

    if country != :unset
        return MessagingConfigurationContext.new(@version, @solution[:sid],country )
    end

    unless @messaging_configurations
        @messaging_configurations = MessagingConfigurationList.new(
            @version, service_sid: @solution[:sid], )
    end

 @messaging_configurations
end

#new_challengeNewChallengeList, NewChallengeContext

Access the new_challenge



794
795
796
797
798
799
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 794

def new_challenge
    NewChallengeContext.new(
            @version,
            @solution[:sid]
            )
end

#new_factorsNewFactorList, NewFactorContext

Access the new_factors

Returns:



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

def new_factors
  unless @new_factors
    @new_factors = NewFactorList.new(
            @version, )
  end
  @new_factors
end

#new_verify_factorsNewVerifyFactorList, NewVerifyFactorContext

Access the new_verify_factors

Returns:



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

def new_verify_factors
  unless @new_verify_factors
    @new_verify_factors = NewVerifyFactorList.new(
            @version, )
  end
  @new_verify_factors
end

#rate_limits(sid = :unset) ⇒ RateLimitList, RateLimitContext

Access the rate_limits

Returns:

Raises:

  • (ArgumentError)


823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 823

def rate_limits(sid=:unset)

    raise ArgumentError, 'sid cannot be nil' if sid.nil?

    if sid != :unset
        return RateLimitContext.new(@version, @solution[:sid],sid )
    end

    unless @rate_limits
        @rate_limits = RateLimitList.new(
            @version, service_sid: @solution[:sid], )
    end

 @rate_limits
end

#to_sObject

Provide a user friendly representation



841
842
843
844
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 841

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Verify.V2.ServiceContext #{context}>"
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

Parameters:

  • friendly_name (String) (defaults to: :unset)

    A descriptive string that you create to describe the verification service. It can be up to 32 characters long. **This value should not contain PII.**

  • code_length (String) (defaults to: :unset)

    The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive.

  • lookup_enabled (Boolean) (defaults to: :unset)

    Whether to perform a lookup with each verification started and return info about the phone number.

  • skip_sms_to_landlines (Boolean) (defaults to: :unset)

    Whether to skip sending SMS verifications to landlines. Requires lookup_enabled.

  • dtmf_input_required (Boolean) (defaults to: :unset)

    Whether to ask the user to press a number before delivering the verify code in a phone call.

  • tts_name (String) (defaults to: :unset)

    The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.

  • psd2_enabled (Boolean) (defaults to: :unset)

    Whether to pass PSD2 transaction parameters when starting a verification.

  • do_not_share_warning_enabled (Boolean) (defaults to: :unset)

    Whether to add a privacy warning at the end of an SMS. **Disabled by default and applies only for SMS.**

  • custom_code_enabled (Boolean) (defaults to: :unset)

    Whether to allow sending verifications with a custom code instead of a randomly generated one.

  • push_include_date (Boolean) (defaults to: :unset)

    Optional configuration for the Push factors. If true, include the date in the Challenge’s response. Otherwise, the date is omitted from the response. See [Challenge](www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: false. Deprecated do not use this parameter.

  • push_apn_credential_sid (String) (defaults to: :unset)

    Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](www.twilio.com/docs/notify/api/credential-resource)

  • push_fcm_credential_sid (String) (defaults to: :unset)

    Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](www.twilio.com/docs/notify/api/credential-resource)

  • totp_issuer (String) (defaults to: :unset)

    Optional configuration for the TOTP factors. Set TOTP Issuer for this service. This will allow to configure the issuer of the TOTP URI.

  • totp_time_step (String) (defaults to: :unset)

    Optional configuration for the TOTP factors. Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive. Defaults to 30 seconds

  • totp_code_length (String) (defaults to: :unset)

    Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6

  • totp_skew (String) (defaults to: :unset)

    Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1

  • default_template_sid (String) (defaults to: :unset)

    The default message [template](www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only.

  • whatsapp_msg_service_sid (String) (defaults to: :unset)

    The SID of the [Messaging Service](www.twilio.com/docs/messaging/services) to associate with the Verification Service.

  • whatsapp_from (String) (defaults to: :unset)

    The WhatsApp number to use as the sender of the verification messages. This number must be associated with the WhatsApp Message Service.

  • passkeys_relying_party_id (String) (defaults to: :unset)

    The Relying Party ID for Passkeys. This is the domain of your application, e.g. example.com. It is used to identify your application when creating Passkeys.

  • passkeys_relying_party_name (String) (defaults to: :unset)

    The Relying Party Name for Passkeys. This is the name of your application, e.g. ‘Example App`. It is used to identify your application when creating Passkeys.

  • passkeys_relying_party_origins (String) (defaults to: :unset)

    The Relying Party Origins for Passkeys. This is the origin of your application, e.g. ‘login.example.com,www.example.com`. It is used to identify your application when creating Passkeys, it can have multiple origins split by `,`.

  • passkeys_authenticator_attachment (String) (defaults to: :unset)

    The Authenticator Attachment for Passkeys. This is the type of authenticator that will be used to create Passkeys. It can be empty or it can have the values platform, cross-platform or any.

  • passkeys_discoverable_credentials (String) (defaults to: :unset)

    Indicates whether credentials must be discoverable by the authenticator. It can be empty or it can have the values required, preferred or discouraged.

  • passkeys_user_verification (String) (defaults to: :unset)

    The User Verification for Passkeys. This is the type of user verification that will be used to create Passkeys. It can be empty or it can have the values required, preferred or discouraged.

  • verify_event_subscription_enabled (Boolean) (defaults to: :unset)

    Whether to allow verifications from the service to reach the stream-events sinks if configured

Returns:



491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 491

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
)

    data = Twilio::Values.of({
        'FriendlyName' => friendly_name,
        'CodeLength' => code_length,
        'LookupEnabled' => lookup_enabled,
        'SkipSmsToLandlines' => skip_sms_to_landlines,
        'DtmfInputRequired' => dtmf_input_required,
        'TtsName' => tts_name,
        'Psd2Enabled' => psd2_enabled,
        'DoNotShareWarningEnabled' => do_not_share_warning_enabled,
        'CustomCodeEnabled' => custom_code_enabled,
        'Push.IncludeDate' => push_include_date,
        'Push.ApnCredentialSid' => push_apn_credential_sid,
        'Push.FcmCredentialSid' => push_fcm_credential_sid,
        'Totp.Issuer' => totp_issuer,
        'Totp.TimeStep' => totp_time_step,
        'Totp.CodeLength' => totp_code_length,
        'Totp.Skew' => totp_skew,
        'DefaultTemplateSid' => default_template_sid,
        'Whatsapp.MsgServiceSid' => whatsapp_msg_service_sid,
        'Whatsapp.From' => whatsapp_from,
        'Passkeys.RelyingParty.Id' => passkeys_relying_party_id,
        'Passkeys.RelyingParty.Name' => passkeys_relying_party_name,
        'Passkeys.RelyingParty.Origins' => passkeys_relying_party_origins,
        'Passkeys.AuthenticatorAttachment' => passkeys_authenticator_attachment,
        'Passkeys.DiscoverableCredentials' => passkeys_discoverable_credentials,
        'Passkeys.UserVerification' => passkeys_user_verification,
        'VerifyEventSubscriptionEnabled' => verify_event_subscription_enabled,
    })

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.update('POST', @uri, data: data, headers: headers)
    ServiceInstance.new(
        @version,
        payload,
        sid: @solution[:sid],
    )
end

#update_with_metadata(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 ServiceInstanceMetadata

Parameters:

  • friendly_name (String) (defaults to: :unset)

    A descriptive string that you create to describe the verification service. It can be up to 32 characters long. **This value should not contain PII.**

  • code_length (String) (defaults to: :unset)

    The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive.

  • lookup_enabled (Boolean) (defaults to: :unset)

    Whether to perform a lookup with each verification started and return info about the phone number.

  • skip_sms_to_landlines (Boolean) (defaults to: :unset)

    Whether to skip sending SMS verifications to landlines. Requires lookup_enabled.

  • dtmf_input_required (Boolean) (defaults to: :unset)

    Whether to ask the user to press a number before delivering the verify code in a phone call.

  • tts_name (String) (defaults to: :unset)

    The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.

  • psd2_enabled (Boolean) (defaults to: :unset)

    Whether to pass PSD2 transaction parameters when starting a verification.

  • do_not_share_warning_enabled (Boolean) (defaults to: :unset)

    Whether to add a privacy warning at the end of an SMS. **Disabled by default and applies only for SMS.**

  • custom_code_enabled (Boolean) (defaults to: :unset)

    Whether to allow sending verifications with a custom code instead of a randomly generated one.

  • push_include_date (Boolean) (defaults to: :unset)

    Optional configuration for the Push factors. If true, include the date in the Challenge’s response. Otherwise, the date is omitted from the response. See [Challenge](www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: false. Deprecated do not use this parameter.

  • push_apn_credential_sid (String) (defaults to: :unset)

    Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](www.twilio.com/docs/notify/api/credential-resource)

  • push_fcm_credential_sid (String) (defaults to: :unset)

    Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](www.twilio.com/docs/notify/api/credential-resource)

  • totp_issuer (String) (defaults to: :unset)

    Optional configuration for the TOTP factors. Set TOTP Issuer for this service. This will allow to configure the issuer of the TOTP URI.

  • totp_time_step (String) (defaults to: :unset)

    Optional configuration for the TOTP factors. Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive. Defaults to 30 seconds

  • totp_code_length (String) (defaults to: :unset)

    Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6

  • totp_skew (String) (defaults to: :unset)

    Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1

  • default_template_sid (String) (defaults to: :unset)

    The default message [template](www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only.

  • whatsapp_msg_service_sid (String) (defaults to: :unset)

    The SID of the [Messaging Service](www.twilio.com/docs/messaging/services) to associate with the Verification Service.

  • whatsapp_from (String) (defaults to: :unset)

    The WhatsApp number to use as the sender of the verification messages. This number must be associated with the WhatsApp Message Service.

  • passkeys_relying_party_id (String) (defaults to: :unset)

    The Relying Party ID for Passkeys. This is the domain of your application, e.g. example.com. It is used to identify your application when creating Passkeys.

  • passkeys_relying_party_name (String) (defaults to: :unset)

    The Relying Party Name for Passkeys. This is the name of your application, e.g. ‘Example App`. It is used to identify your application when creating Passkeys.

  • passkeys_relying_party_origins (String) (defaults to: :unset)

    The Relying Party Origins for Passkeys. This is the origin of your application, e.g. ‘login.example.com,www.example.com`. It is used to identify your application when creating Passkeys, it can have multiple origins split by `,`.

  • passkeys_authenticator_attachment (String) (defaults to: :unset)

    The Authenticator Attachment for Passkeys. This is the type of authenticator that will be used to create Passkeys. It can be empty or it can have the values platform, cross-platform or any.

  • passkeys_discoverable_credentials (String) (defaults to: :unset)

    Indicates whether credentials must be discoverable by the authenticator. It can be empty or it can have the values required, preferred or discouraged.

  • passkeys_user_verification (String) (defaults to: :unset)

    The User Verification for Passkeys. This is the type of user verification that will be used to create Passkeys. It can be empty or it can have the values required, preferred or discouraged.

  • verify_event_subscription_enabled (Boolean) (defaults to: :unset)

    Whether to allow verifications from the service to reach the stream-events sinks if configured

Returns:



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
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
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
664
665
666
667
668
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 592

def (
  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
)

    data = Twilio::Values.of({
        'FriendlyName' => friendly_name,
        'CodeLength' => code_length,
        'LookupEnabled' => lookup_enabled,
        'SkipSmsToLandlines' => skip_sms_to_landlines,
        'DtmfInputRequired' => dtmf_input_required,
        'TtsName' => tts_name,
        'Psd2Enabled' => psd2_enabled,
        'DoNotShareWarningEnabled' => do_not_share_warning_enabled,
        'CustomCodeEnabled' => custom_code_enabled,
        'Push.IncludeDate' => push_include_date,
        'Push.ApnCredentialSid' => push_apn_credential_sid,
        'Push.FcmCredentialSid' => push_fcm_credential_sid,
        'Totp.Issuer' => totp_issuer,
        'Totp.TimeStep' => totp_time_step,
        'Totp.CodeLength' => totp_code_length,
        'Totp.Skew' => totp_skew,
        'DefaultTemplateSid' => default_template_sid,
        'Whatsapp.MsgServiceSid' => whatsapp_msg_service_sid,
        'Whatsapp.From' => whatsapp_from,
        'Passkeys.RelyingParty.Id' => passkeys_relying_party_id,
        'Passkeys.RelyingParty.Name' => passkeys_relying_party_name,
        'Passkeys.RelyingParty.Origins' => passkeys_relying_party_origins,
        'Passkeys.AuthenticatorAttachment' => passkeys_authenticator_attachment,
        'Passkeys.DiscoverableCredentials' => passkeys_discoverable_credentials,
        'Passkeys.UserVerification' => passkeys_user_verification,
        'VerifyEventSubscriptionEnabled' => verify_event_subscription_enabled,
    })

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    response = @version.('POST', @uri, data: data, headers: headers)
    service_instance = ServiceInstance.new(
        @version,
        response.body,
        sid: @solution[:sid],
    )
    .new(
        @version,
        service_instance,
        response.headers,
        response.status_code
    )
end

#verification_checksVerificationCheckList, VerificationCheckContext

Access the verification_checks

Returns:



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

def verification_checks
  unless @verification_checks
    @verification_checks = VerificationCheckList.new(
            @version, service_sid: @solution[:sid], )
  end
  @verification_checks
end

#verifications(sid = :unset) ⇒ VerificationList, VerificationContext

Access the verifications

Returns:

Raises:

  • (ArgumentError)


718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 718

def verifications(sid=:unset)

    raise ArgumentError, 'sid cannot be nil' if sid.nil?

    if sid != :unset
        return VerificationContext.new(@version, @solution[:sid],sid )
    end

    unless @verifications
        @verifications = VerificationList.new(
            @version, service_sid: @solution[:sid], )
    end

 @verifications
end

#webhooks(sid = :unset) ⇒ WebhookList, WebhookContext

Access the webhooks

Returns:

Raises:

  • (ArgumentError)


756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 756

def webhooks(sid=:unset)

    raise ArgumentError, 'sid cannot be nil' if sid.nil?

    if sid != :unset
        return WebhookContext.new(@version, @solution[:sid],sid )
    end

    unless @webhooks
        @webhooks = WebhookList.new(
            @version, service_sid: @solution[:sid], )
    end

 @webhooks
end