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
-
#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
Deletes 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 a 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.
-
#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) ⇒ 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.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ ServiceInstance
Initialize the ServiceInstance
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 388 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'], '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
#account_sid ⇒ String
434 435 436 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 434 def account_sid @properties['account_sid'] end |
#code_length ⇒ String
446 447 448 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 446 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
419 420 421 422 423 424 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 419 def context unless @instance_context @instance_context = ServiceContext.new(@version, @params['sid'], ) end @instance_context end |
#custom_code_enabled ⇒ Boolean
488 489 490 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 488 def custom_code_enabled @properties['custom_code_enabled'] end |
#date_created ⇒ Time
494 495 496 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 494 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
500 501 502 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 500 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the ServiceInstance
526 527 528 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 526 def delete context.delete end |
#do_not_share_warning_enabled ⇒ Boolean
482 483 484 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 482 def do_not_share_warning_enabled @properties['do_not_share_warning_enabled'] end |
#dtmf_input_required ⇒ Boolean
470 471 472 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 470 def dtmf_input_required @properties['dtmf_input_required'] end |
#entities ⇒ entities
Access the entities
598 599 600 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 598 def entities context.entities end |
#fetch ⇒ ServiceInstance
Fetch a ServiceInstance
519 520 521 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 519 def fetch context.fetch end |
#friendly_name ⇒ String
440 441 442 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 440 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
611 612 613 614 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 611 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.ServiceInstance #{values}>" end |
#links ⇒ String
512 513 514 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 512 def links @properties['links'] end |
#lookup_enabled ⇒ Boolean
452 453 454 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 452 def lookup_enabled @properties['lookup_enabled'] end |
#messaging_configurations ⇒ messaging_configurations
Access the messaging_configurations
591 592 593 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 591 def messaging_configurations context.messaging_configurations end |
#psd2_enabled ⇒ Boolean
458 459 460 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 458 def psd2_enabled @properties['psd2_enabled'] end |
#rate_limits ⇒ rate_limits
Access the rate_limits
584 585 586 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 584 def rate_limits context.rate_limits end |
#sid ⇒ String
428 429 430 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 428 def sid @properties['sid'] end |
#skip_sms_to_landlines ⇒ Boolean
464 465 466 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 464 def skip_sms_to_landlines @properties['skip_sms_to_landlines'] end |
#to_s ⇒ Object
Provide a user friendly representation
604 605 606 607 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 604 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.ServiceInstance #{values}>" end |
#tts_name ⇒ String
476 477 478 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 476 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) ⇒ ServiceInstance
Update the ServiceInstance
553 554 555 556 557 558 559 560 561 562 563 564 565 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 553 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) 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, ) end |
#url ⇒ String
506 507 508 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 506 def url @properties['url'] end |
#verification_checks ⇒ verification_checks
Access the verification_checks
577 578 579 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 577 def verification_checks context.verification_checks end |
#verifications ⇒ verifications
Access the verifications
570 571 572 |
# File 'lib/twilio-ruby/rest/verify/v2/service.rb', line 570 def verifications context.verifications end |