Class: Twilio::REST::Verify::V2::ServiceContext::EntityInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Verify::V2::ServiceContext::EntityInstance
- Defined in:
- lib/twilio-ruby/rest/verify/v2/service/entity.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID identifier of the Account.
-
#challenges ⇒ challenges
Access the challenges.
-
#context ⇒ EntityContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date that this Entity was created, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date that this Entity was updated, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#delete ⇒ Boolean
Delete the EntityInstance.
-
#factors ⇒ factors
Access the factors.
-
#fetch ⇒ EntityInstance
Fetch the EntityInstance.
-
#identity ⇒ String
The unique external identifier for the Entity of the Service.
-
#initialize(version, payload, service_sid: nil, identity: nil) ⇒ EntityInstance
constructor
Initialize the EntityInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ Hash
Contains a dictionary of URL links to nested resources of this Entity.
-
#new_factors ⇒ new_factors
Access the new_factors.
-
#service_sid ⇒ String
The unique SID identifier of the Service.
-
#sid ⇒ String
A 34 character string that uniquely identifies this Entity.
-
#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) ⇒ EntityInstance
Initialize the EntityInstance
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 292 def initialize(version, payload , service_sid: nil, identity: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'identity' => payload['identity'], 'account_sid' => payload['account_sid'], 'service_sid' => payload['service_sid'], '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 = { 'service_sid' => service_sid || @properties['service_sid'] ,'identity' => identity || @properties['identity'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique SID identifier of the Account.
337 338 339 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 337 def account_sid @properties['account_sid'] end |
#challenges ⇒ challenges
Access the challenges
404 405 406 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 404 def challenges context.challenges end |
#context ⇒ EntityContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
316 317 318 319 320 321 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 316 def context unless @instance_context @instance_context = EntityContext.new(@version , @params['service_sid'], @params['identity']) end @instance_context end |
#date_created ⇒ Time
Returns The date that this Entity was created, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
349 350 351 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 349 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this Entity was updated, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
355 356 357 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 355 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the EntityInstance
374 375 376 377 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 374 def delete context.delete end |
#factors ⇒ factors
Access the factors
397 398 399 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 397 def factors context.factors end |
#fetch ⇒ EntityInstance
Fetch the EntityInstance
382 383 384 385 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 382 def fetch context.fetch end |
#identity ⇒ String
Returns The unique external identifier for the Entity of the Service. 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.
331 332 333 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 331 def identity @properties['identity'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
417 418 419 420 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 417 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.EntityInstance #{values}>" end |
#links ⇒ Hash
Returns Contains a dictionary of URL links to nested resources of this Entity.
367 368 369 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 367 def links @properties['links'] end |
#new_factors ⇒ new_factors
Access the new_factors
390 391 392 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 390 def new_factors context.new_factors end |
#service_sid ⇒ String
Returns The unique SID identifier of the Service.
343 344 345 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 343 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this Entity.
325 326 327 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 325 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
410 411 412 413 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 410 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.EntityInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
361 362 363 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity.rb', line 361 def url @properties['url'] end |