Class: Twilio::REST::Verify::V2::ServiceContext::NewVerifyFactorInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, service_sid: nil) ⇒ NewVerifyFactorInstance

Initialize the NewVerifyFactorInstance

Parameters:

  • version (Version) —

    Version that contains the resource

  • payload (Hash) —

    payload that contains response from Twilio

  • account_sid (String) —

    The SID of the Account that created this NewVerifyFactor resource.

  • sid (String) —

    The SID of the Call resource to fetch.



237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 237

def initialize(version, payload , service_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'],
        'metadata' => payload['metadata'],
        'url' => payload['url'],
    }
end

Instance Method Details

#account_sid ⇒ String

Returns The unique SID identifier of the Account.

Returns:

  • (String) —

    The unique SID identifier of the Account.



268
269
270
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 268

def 
    @properties['account_sid']
end

#config ⇒ Hash

Returns An object that contains configurations specific to a factor_type.

Returns:

  • (Hash) —

    An object that contains configurations specific to a factor_type.



322
323
324
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 322

def config
    @properties['config']
end

#date_created ⇒ Time

Returns The date that this Factor was created, given in ISO 8601 format.

Returns:

  • (Time) —

    The date that this Factor was created, given in ISO 8601 format.



292
293
294
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 292

def date_created
    @properties['date_created']
end

#date_updated ⇒ Time

Returns The date that this Factor was updated, given in ISO 8601 format.

Returns:

  • (Time) —

    The date that this Factor was updated, given in ISO 8601 format.



298
299
300
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 298

def date_updated
    @properties['date_updated']
end

#entity_sid ⇒ String

Returns The unique SID identifier of the Entity.

Returns:

  • (String) —

    The unique SID identifier of the Entity.



280
281
282
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 280

def entity_sid
    @properties['entity_sid']
end

#factor_type ⇒ String

Returns The Type of this Factor. Currently push and totp are supported.

Returns:

  • (String) —

    The Type of this Factor. Currently push and totp are supported.



316
317
318
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 316

def factor_type
    @properties['factor_type']
end

#friendly_name ⇒ String

Returns A human readable description of this resource, up to 64 characters.

Returns:

  • (String) —

    A human readable description of this resource, up to 64 characters.



304
305
306
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 304

def friendly_name
    @properties['friendly_name']
end

#identity ⇒ String

Returns Customer unique identity for the Entity owner of the Factor.

Returns:

  • (String) —

    Customer unique identity for the Entity owner of the Factor.



286
287
288
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 286

def identity
    @properties['identity']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



346
347
348
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 346

def inspect
    "<Twilio.Verify.V2.NewVerifyFactorInstance>"
end

#metadata ⇒ Hash

Returns Custom metadata associated with the factor.

Returns:

  • (Hash) —

    Custom metadata associated with the factor.



328
329
330
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 328

def 
    @properties['metadata']
end

#service_sid ⇒ String

Returns The unique SID identifier of the Service.

Returns:

  • (String) —

    The unique SID identifier of the Service.



274
275
276
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 274

def service_sid
    @properties['service_sid']
end

#sid ⇒ String

Returns A 34 character string that uniquely identifies this Factor.

Returns:

  • (String) —

    A 34 character string that uniquely identifies this Factor.



262
263
264
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 262

def sid
    @properties['sid']
end

#status ⇒ String

Returns The Status of this Factor. One of unverified or verified.

Returns:

  • (String) —

    The Status of this Factor. One of unverified or verified.



310
311
312
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 310

def status
    @properties['status']
end

#to_s ⇒ Object

Provide a user friendly representation



340
341
342
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 340

def to_s
    "<Twilio.Verify.V2.NewVerifyFactorInstance>"
end

#url ⇒ String

Returns The URL of this resource.

Returns:

  • (String) —

    The URL of this resource.



334
335
336
# File 'lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb', line 334

def url
    @properties['url']
end