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

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

Instance Method Summary collapse

Constructor Details

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

Initialize the NewFactorInstance

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 NewFactor resource.

  • sid (String)

    The SID of the Call resource to fetch.



164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/twilio-ruby/rest/verify/v2/service/new_factor.rb', line 164

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

Returns The unique SID identifier of the Account.

Returns:

  • (String)

    The unique SID identifier of the Account.



196
197
198
# File 'lib/twilio-ruby/rest/verify/v2/service/new_factor.rb', line 196

def 
    @properties['account_sid']
end

#bindingHash

Returns Contains the ‘factor_type` specific secret and metadata. The Binding property is ONLY returned upon Factor creation.

Returns:

  • (Hash)

    Contains the ‘factor_type` specific secret and metadata. The Binding property is ONLY returned upon Factor creation.



220
221
222
# File 'lib/twilio-ruby/rest/verify/v2/service/new_factor.rb', line 220

def binding
    @properties['binding']
end

#configHash

Returns An object that contains configurations specific to a ‘factor_type`.

Returns:

  • (Hash)

    An object that contains configurations specific to a ‘factor_type`.



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

def config
    @properties['config']
end

#date_createdTime

Returns The date that this Factor was created, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



232
233
234
# File 'lib/twilio-ruby/rest/verify/v2/service/new_factor.rb', line 232

def date_created
    @properties['date_created']
end

#date_updatedTime

Returns The date that this Factor was updated, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



238
239
240
# File 'lib/twilio-ruby/rest/verify/v2/service/new_factor.rb', line 238

def date_updated
    @properties['date_updated']
end

#entity_sidString

Returns The unique SID identifier of the Entity.

Returns:

  • (String)

    The unique SID identifier of the Entity.



208
209
210
# File 'lib/twilio-ruby/rest/verify/v2/service/new_factor.rb', line 208

def entity_sid
    @properties['entity_sid']
end

#factor_typeString

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.



256
257
258
# File 'lib/twilio-ruby/rest/verify/v2/service/new_factor.rb', line 256

def factor_type
    @properties['factor_type']
end

#friendly_nameString

Returns The friendly name of this Factor. This can be any string up to 64 characters, meant for humans to distinguish between Factors.

Returns:

  • (String)

    The friendly name of this Factor. This can be any string up to 64 characters, meant for humans to distinguish between Factors.



244
245
246
# File 'lib/twilio-ruby/rest/verify/v2/service/new_factor.rb', line 244

def friendly_name
    @properties['friendly_name']
end

#identityString

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

Returns:

  • (String)

    Customer unique identity for the Entity owner of the Factor.



214
215
216
# File 'lib/twilio-ruby/rest/verify/v2/service/new_factor.rb', line 214

def identity
    @properties['identity']
end

#inspectObject

Provide a detailed, user friendly representation



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

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

#metadataHash

Returns Custom metadata associated with the factor.

Returns:

  • (Hash)

    Custom metadata associated with the factor.



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

def 
    @properties['metadata']
end

#optionsHash

Returns:

  • (Hash)


226
227
228
# File 'lib/twilio-ruby/rest/verify/v2/service/new_factor.rb', line 226

def options
    @properties['options']
end

#service_sidString

Returns The unique SID identifier of the Service.

Returns:

  • (String)

    The unique SID identifier of the Service.



202
203
204
# File 'lib/twilio-ruby/rest/verify/v2/service/new_factor.rb', line 202

def service_sid
    @properties['service_sid']
end

#sidString

Returns A 34 character string that uniquely identifies this Factor.

Returns:

  • (String)

    A 34 character string that uniquely identifies this Factor.



190
191
192
# File 'lib/twilio-ruby/rest/verify/v2/service/new_factor.rb', line 190

def sid
    @properties['sid']
end

#statusString

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

Returns:

  • (String)

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



250
251
252
# File 'lib/twilio-ruby/rest/verify/v2/service/new_factor.rb', line 250

def status
    @properties['status']
end

#to_sObject

Provide a user friendly representation



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

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

#urlString

Returns The URL of this resource.

Returns:

  • (String)

    The URL of this resource.



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

def url
    @properties['url']
end