Class: Twilio::REST::Authy::V1::ServiceContext::EntityContext::FactorInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Authy::V1::ServiceContext::EntityContext::FactorInstance
- Defined in:
- lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
Instance Method Summary collapse
-
#account_sid ⇒ String
Account Sid.
-
#challenges ⇒ challenges
Access the challenges.
-
#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
Deletes the FactorInstance.
-
#entity_sid ⇒ String
Entity Sid.
-
#factor_strength ⇒ factor.FactorStrengths
The Strength of this Factor.
-
#factor_type ⇒ factor.FactorTypes
The Type of this Factor.
-
#fetch ⇒ FactorInstance
Fetch a FactorInstance.
-
#friendly_name ⇒ String
A human readable description of this resource.
-
#identity ⇒ String
Unique identity 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.
-
#links ⇒ String
Nested resource URLs.
-
#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) ⇒ 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
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 318 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'], 'factor_strength' => payload['factor_strength'], 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = {'service_sid' => service_sid, 'identity' => identity, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns Account Sid.
367 368 369 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 367 def account_sid @properties['account_sid'] end |
#challenges ⇒ challenges
Access the challenges
463 464 465 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 463 def challenges context.challenges 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
347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 347 def context unless @instance_context @instance_context = FactorContext.new( @version, @params['service_sid'], @params['identity'], @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The date this Factor was created.
391 392 393 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 391 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date this Factor was updated.
397 398 399 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 397 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the FactorInstance
440 441 442 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 440 def delete context.delete end |
#entity_sid ⇒ String
Returns Entity Sid.
379 380 381 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 379 def entity_sid @properties['entity_sid'] end |
#factor_strength ⇒ factor.FactorStrengths
Returns The Strength of this Factor.
421 422 423 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 421 def factor_strength @properties['factor_strength'] end |
#factor_type ⇒ factor.FactorTypes
Returns The Type of this Factor.
415 416 417 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 415 def factor_type @properties['factor_type'] end |
#fetch ⇒ FactorInstance
Fetch a FactorInstance
447 448 449 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 447 def fetch context.fetch end |
#friendly_name ⇒ String
Returns A human readable description of this resource.
403 404 405 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 403 def friendly_name @properties['friendly_name'] end |
#identity ⇒ String
Returns Unique identity of the Entity.
385 386 387 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 385 def identity @properties['identity'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
476 477 478 479 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 476 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Authy.V1.FactorInstance #{values}>" end |
#links ⇒ String
Returns Nested resource URLs.
433 434 435 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 433 def links @properties['links'] end |
#service_sid ⇒ String
Returns Service Sid.
373 374 375 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 373 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns A string that uniquely identifies this Factor.
361 362 363 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 361 def sid @properties['sid'] end |
#status ⇒ factor.FactorStatuses
Returns The Status of this Factor.
409 410 411 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 409 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
469 470 471 472 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 469 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Authy.V1.FactorInstance #{values}>" end |
#update(auth_payload: :unset) ⇒ FactorInstance
Update the FactorInstance
456 457 458 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 456 def update(auth_payload: :unset) context.update(auth_payload: auth_payload, ) end |
#url ⇒ String
Returns The URL of this resource.
427 428 429 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb', line 427 def url @properties['url'] end |