Class: Twilio::REST::Verify::V2::ServiceContext::EntityContext::NewFactorInstance

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

Overview

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, service_sid: nil, identity: nil) ⇒ NewFactorInstance

Initialize the NewFactorInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • service_sid (String) (defaults to: nil)

    The unique SID identifier of the Service.

  • identity (String) (defaults to: nil)

    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.


186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 186

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'],
      '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_sidString

Returns Account Sid.

Returns:

  • (String)

    Account Sid.


216
217
218
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 216

def 
  @properties['account_sid']
end

#bindingHash

Returns Binding of the factor.

Returns:

  • (Hash)

    Binding of the factor


240
241
242
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 240

def binding
  @properties['binding']
end

#configHash

Returns Configurations for a `factor_type`.

Returns:

  • (Hash)

    Configurations for a `factor_type`.


276
277
278
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 276

def config
  @properties['config']
end

#date_createdTime

Returns The date this Factor was created.

Returns:

  • (Time)

    The date this Factor was created


246
247
248
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 246

def date_created
  @properties['date_created']
end

#date_updatedTime

Returns The date this Factor was updated.

Returns:

  • (Time)

    The date this Factor was updated


252
253
254
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 252

def date_updated
  @properties['date_updated']
end

#entity_sidString

Returns Entity Sid.

Returns:

  • (String)

    Entity Sid.


228
229
230
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 228

def entity_sid
  @properties['entity_sid']
end

#factor_typenew_factor.FactorTypes

Returns The Type of this Factor.

Returns:

  • (new_factor.FactorTypes)

    The Type of this Factor


270
271
272
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 270

def factor_type
  @properties['factor_type']
end

#friendly_nameString

Returns A human readable description of this resource.

Returns:

  • (String)

    A human readable description of this resource.


258
259
260
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 258

def friendly_name
  @properties['friendly_name']
end

#identityString

Returns Unique external identifier of the Entity.

Returns:

  • (String)

    Unique external identifier of the Entity


234
235
236
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 234

def identity
  @properties['identity']
end

#inspectObject

Provide a detailed, user friendly representation


300
301
302
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 300

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

#metadataHash

Returns Metadata of the factor.

Returns:

  • (Hash)

    Metadata of the factor.


282
283
284
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 282

def 
  @properties['metadata']
end

#service_sidString

Returns Service Sid.

Returns:

  • (String)

    Service Sid.


222
223
224
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 222

def service_sid
  @properties['service_sid']
end

#sidString

Returns A string that uniquely identifies this Factor.

Returns:

  • (String)

    A string that uniquely identifies this Factor.


210
211
212
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 210

def sid
  @properties['sid']
end

#statusnew_factor.FactorStatuses

Returns The Status of this Factor.

Returns:

  • (new_factor.FactorStatuses)

    The Status of this Factor


264
265
266
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 264

def status
  @properties['status']
end

#to_sObject

Provide a user friendly representation


294
295
296
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 294

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

#urlString

Returns The URL of this resource.

Returns:

  • (String)

    The URL of this resource.


288
289
290
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 288

def url
  @properties['url']
end