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 that created the resource.
-
#code_length ⇒ String
The length of the verification code.
-
#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.
-
#date_created ⇒ Time
The RFC 2822 date and time in GMT when the resource was created.
-
#date_updated ⇒ Time
The RFC 2822 date and time in GMT when the resource was last updated.
-
#delete ⇒ Boolean
Delete the ServiceInstance.
-
#do_not_share_warning_enabled ⇒ Boolean
Whether to add a security warning at the end of an SMS.
-
#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 string that you assigned to describe the verification service.
-
#initialize(version, payload, sid: nil) ⇒ ServiceInstance
constructor
Initialize the ServiceInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
The URLs of related resources.
-
#lookup_enabled ⇒ Boolean
Whether to perform a lookup with each verification.
-
#messaging_configurations ⇒ messaging_configurations
Access the messaging_configurations.
-
#psd2_enabled ⇒ Boolean
Whether to pass PSD2 transaction parameters when starting a verification.
-
#push ⇒ Hash
The service level configuration of factor push type.
-
#rate_limits ⇒ rate_limits
Access the rate_limits.
-
#sid ⇒ String
The unique string that identifies the resource.
-
#skip_sms_to_landlines ⇒ Boolean
Whether to skip sending SMS verifications to landlines.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#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) ⇒ 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.
-
#webhooks ⇒ webhooks
Access the webhooks.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ ServiceInstance
Initialize the ServiceInstance
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 435 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'].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'], '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
682 683 684 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 682 def access_tokens context.access_tokens end |
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
482 483 484 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 482 def account_sid @properties['account_sid'] end |
#code_length ⇒ String
Returns The length of the verification code.
494 495 496 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 494 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
467 468 469 470 471 472 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 467 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.
536 537 538 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 536 def custom_code_enabled @properties['custom_code_enabled'] end |
#date_created ⇒ Time
Returns The RFC 2822 date and time in GMT when the resource was created.
548 549 550 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 548 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The RFC 2822 date and time in GMT when the resource was last updated.
554 555 556 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 554 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the ServiceInstance
580 581 582 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 580 def delete context.delete end |
#do_not_share_warning_enabled ⇒ Boolean
Returns Whether to add a security warning at the end of an SMS.
530 531 532 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 530 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.
518 519 520 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 518 def dtmf_input_required @properties['dtmf_input_required'] end |
#entities ⇒ entities
Access the entities
668 669 670 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 668 def entities context.entities end |
#fetch ⇒ ServiceInstance
Fetch the ServiceInstance
573 574 575 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 573 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the verification service.
488 489 490 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 488 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
695 696 697 698 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 695 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.ServiceInstance #{values}>" end |
#links ⇒ String
Returns The URLs of related resources.
566 567 568 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 566 def links @properties['links'] end |
#lookup_enabled ⇒ Boolean
Returns Whether to perform a lookup with each verification.
500 501 502 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 500 def lookup_enabled @properties['lookup_enabled'] end |
#messaging_configurations ⇒ messaging_configurations
Access the messaging_configurations
661 662 663 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 661 def messaging_configurations context.messaging_configurations end |
#psd2_enabled ⇒ Boolean
Returns Whether to pass PSD2 transaction parameters when starting a verification.
506 507 508 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 506 def psd2_enabled @properties['psd2_enabled'] end |
#push ⇒ Hash
Returns The service level configuration of factor push type.
542 543 544 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 542 def push @properties['push'] end |
#rate_limits ⇒ rate_limits
Access the rate_limits
654 655 656 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 654 def rate_limits context.rate_limits end |
#sid ⇒ String
Returns The unique string that identifies the resource.
476 477 478 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 476 def sid @properties['sid'] end |
#skip_sms_to_landlines ⇒ Boolean
Returns Whether to skip sending SMS verifications to landlines.
512 513 514 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 512 def skip_sms_to_landlines @properties['skip_sms_to_landlines'] end |
#to_s ⇒ Object
Provide a user friendly representation
688 689 690 691 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 688 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.ServiceInstance #{values}>" end |
#tts_name ⇒ String
Returns The name of an alternative text-to-speech service to use in phone calls.
524 525 526 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 524 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) ⇒ ServiceInstance
Update the ServiceInstance
620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 620 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) 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, ) end |
#url ⇒ String
Returns The absolute URL of the resource.
560 561 562 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 560 def url @properties['url'] end |
#verification_checks ⇒ verification_checks
Access the verification_checks
647 648 649 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 647 def verification_checks context.verification_checks end |
#verifications ⇒ verifications
Access the verifications
640 641 642 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 640 def verifications context.verifications end |
#webhooks ⇒ webhooks
Access the webhooks
675 676 677 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 675 def webhooks context.webhooks end |