Class: Twilio::REST::Verify::V2::ServiceContext::EntityContext::FactorInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Verify::V2::ServiceContext::EntityContext::FactorInstance
- Defined in:
- lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
Account Sid.
-
#config ⇒ Hash
Configurations for a ‘factor_type`.
-
#context ⇒ FactorContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date this Factor was created.
-
#date_updated ⇒ Time
The date this Factor was updated.
-
#delete ⇒ Boolean
Delete the FactorInstance.
-
#entity_sid ⇒ String
Entity Sid.
-
#factor_type ⇒ factor.FactorTypes
The Type of this Factor.
-
#fetch ⇒ FactorInstance
Fetch the FactorInstance.
-
#friendly_name ⇒ String
A human readable description of this resource.
-
#identity ⇒ String
Unique external identifier of the Entity.
-
#initialize(version, payload, service_sid: nil, identity: nil, sid: nil) ⇒ FactorInstance
constructor
Initialize the FactorInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#service_sid ⇒ String
Service Sid.
-
#sid ⇒ String
A string that uniquely identifies this Factor.
-
#status ⇒ factor.FactorStatuses
The Status of this Factor.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset) ⇒ FactorInstance
Update the FactorInstance.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, service_sid: nil, identity: nil, sid: nil) ⇒ FactorInstance
Initialize the FactorInstance
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 335 def initialize(version, payload, service_sid: nil, identity: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'service_sid' => payload['service_sid'], 'entity_sid' => payload['entity_sid'], 'identity' => payload['identity'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'friendly_name' => payload['friendly_name'], 'status' => payload['status'], 'factor_type' => payload['factor_type'], 'config' => payload['config'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'service_sid' => service_sid, 'identity' => identity, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
383 384 385 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 383 def account_sid @properties['account_sid'] end |
#config ⇒ Hash
437 438 439 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 437 def config @properties['config'] end |
#context ⇒ FactorContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
363 364 365 366 367 368 369 370 371 372 373 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 363 def context unless @instance_context @instance_context = FactorContext.new( @version, @params['service_sid'], @params['identity'], @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
407 408 409 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 407 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
413 414 415 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 413 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the FactorInstance
450 451 452 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 450 def delete context.delete end |
#entity_sid ⇒ String
395 396 397 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 395 def entity_sid @properties['entity_sid'] end |
#factor_type ⇒ factor.FactorTypes
431 432 433 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 431 def factor_type @properties['factor_type'] end |
#fetch ⇒ FactorInstance
Fetch the FactorInstance
457 458 459 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 457 def fetch context.fetch end |
#friendly_name ⇒ String
419 420 421 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 419 def friendly_name @properties['friendly_name'] end |
#identity ⇒ String
401 402 403 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 401 def identity @properties['identity'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
505 506 507 508 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 505 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.FactorInstance #{values}>" end |
#service_sid ⇒ String
389 390 391 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 389 def service_sid @properties['service_sid'] end |
#sid ⇒ String
377 378 379 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 377 def sid @properties['sid'] end |
#status ⇒ factor.FactorStatuses
425 426 427 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 425 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
498 499 500 501 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 498 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.FactorInstance #{values}>" end |
#update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset) ⇒ FactorInstance
Update the FactorInstance
483 484 485 486 487 488 489 490 491 492 493 494 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 483 def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset) context.update( auth_payload: auth_payload, friendly_name: friendly_name, config_notification_token: config_notification_token, config_sdk_version: config_sdk_version, config_time_step: config_time_step, config_skew: config_skew, config_code_length: config_code_length, config_alg: config_alg, ) end |
#url ⇒ String
443 444 445 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb', line 443 def url @properties['url'] end |