Class: Twilio::REST::Verify::V2::ServiceContext::EntityContext::NewFactorInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Verify::V2::ServiceContext::EntityContext::NewFactorInstance
- Defined in:
- lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID identifier of the Account.
-
#binding ⇒ Hash
Contains the
factor_typespecific secret and metadata. -
#config ⇒ Hash
An object that contains configurations specific to a
factor_type. -
#date_created ⇒ Time
The date that this Factor was created, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date that this Factor was updated, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#entity_sid ⇒ String
The unique SID identifier of the Entity.
- #factor_type ⇒ FactorTypes
-
#friendly_name ⇒ String
The friendly name of this Factor.
-
#identity ⇒ String
Customer unique identity for the Entity owner of the Factor.
-
#initialize(version, payload, service_sid: nil, identity: nil) ⇒ NewFactorInstance
constructor
Initialize the NewFactorInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#metadata ⇒ Hash
Custom metadata associated with the factor.
- #options ⇒ Hash
-
#service_sid ⇒ String
The unique SID identifier of the Service.
-
#sid ⇒ String
A 34 character string that uniquely identifies this Factor.
- #status ⇒ FactorStatuses
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, service_sid: nil, identity: nil) ⇒ NewFactorInstance
Initialize the NewFactorInstance
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 283 def initialize(version, payload , service_sid: nil, identity: 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'], 'binding' => payload['binding'], 'options' => payload['options'], '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'], 'metadata' => payload['metadata'], 'url' => payload['url'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique SID identifier of the Account.
316 317 318 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 316 def account_sid @properties['account_sid'] end |
#binding ⇒ Hash
Returns Contains the factor_type specific secret and metadata. For push, this is binding.public_key and binding.alg. For totp, this is binding.secret and binding.uri. The binding.uri property is generated following the [google authenticator key URI format](github.com/google/google-authenticator/wiki/Key-Uri-Format), and Factor.friendly_name is used for the “accountname” value and Service.friendly_name or Service.totp.issuer is used for the issuer value. The Binding property is ONLY returned upon Factor creation.
340 341 342 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 340 def binding @properties['binding'] end |
#config ⇒ Hash
Returns An object that contains configurations specific to a factor_type.
382 383 384 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 382 def config @properties['config'] end |
#date_created ⇒ Time
Returns The date that this Factor was created, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
352 353 354 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 352 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this Factor was updated, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
358 359 360 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 358 def date_updated @properties['date_updated'] end |
#entity_sid ⇒ String
Returns The unique SID identifier of the Entity.
328 329 330 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 328 def entity_sid @properties['entity_sid'] end |
#factor_type ⇒ FactorTypes
376 377 378 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 376 def factor_type @properties['factor_type'] end |
#friendly_name ⇒ String
Returns The friendly name of this Factor. This can be any string up to 64 characters, meant for humans to distinguish between Factors. For factor_type push, this could be a device name. For factor_type totp, this value is used as the “account name” in constructing the binding.uri property. At the same time, we recommend avoiding providing PII.
364 365 366 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 364 def friendly_name @properties['friendly_name'] end |
#identity ⇒ String
Returns Customer unique identity for the Entity owner of the Factor. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user’s UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
334 335 336 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 334 def identity @properties['identity'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
406 407 408 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 406 def inspect "<Twilio.Verify.V2.NewFactorInstance>" end |
#metadata ⇒ Hash
Returns Custom metadata associated with the factor. This is added by the Device/SDK directly to allow for the inclusion of device information. It must be a stringified JSON with only strings values eg. ‘"Android"`. Can be up to 1024 characters in length.
388 389 390 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 388 def @properties['metadata'] end |
#options ⇒ Hash
346 347 348 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 346 def @properties['options'] end |
#service_sid ⇒ String
Returns The unique SID identifier of the Service.
322 323 324 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 322 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this Factor.
310 311 312 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 310 def sid @properties['sid'] end |
#status ⇒ FactorStatuses
370 371 372 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 370 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
400 401 402 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 400 def to_s "<Twilio.Verify.V2.NewFactorInstance>" end |
#url ⇒ String
Returns The URL of this resource.
394 395 396 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 394 def url @properties['url'] end |