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)

    The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user’s UUID, GUID, or SID. This value must be between 8 and 64 characters long.



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 153

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'],
      'url' => payload['url'],
  }
end

Instance Method Details

#account_sidString

Returns Account Sid.

Returns:

  • (String)

    Account Sid.



182
183
184
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 182

def 
  @properties['account_sid']
end

#bindingHash

Returns Unique external identifier of the Entity.

Returns:

  • (Hash)

    Unique external identifier of the Entity



206
207
208
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 206

def binding
  @properties['binding']
end

#configHash

Returns Binding for a ‘factor_type`.

Returns:

  • (Hash)

    Binding for a ‘factor_type`.



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

def config
  @properties['config']
end

#date_createdTime

Returns The date this Factor was created.

Returns:

  • (Time)

    The date this Factor was created



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

def date_created
  @properties['date_created']
end

#date_updatedTime

Returns The date this Factor was updated.

Returns:

  • (Time)

    The date this Factor was updated



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

def date_updated
  @properties['date_updated']
end

#entity_sidString

Returns Entity Sid.

Returns:

  • (String)

    Entity Sid.



194
195
196
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 194

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



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

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.



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

def friendly_name
  @properties['friendly_name']
end

#identityString

Returns Unique external identifier of the Entity.

Returns:

  • (String)

    Unique external identifier of the Entity



200
201
202
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 200

def identity
  @properties['identity']
end

#inspectObject

Provide a detailed, user friendly representation



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

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

#service_sidString

Returns Service Sid.

Returns:

  • (String)

    Service Sid.



188
189
190
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 188

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.



176
177
178
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 176

def sid
  @properties['sid']
end

#statusnew_factor.FactorStatuses

Returns The Status of this Factor.

Returns:

  • (new_factor.FactorStatuses)

    The Status of this Factor



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

def status
  @properties['status']
end

#to_sObject

Provide a user friendly representation



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

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

#urlString

Returns The URL of this resource.

Returns:

  • (String)

    The URL of this resource.



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

def url
  @properties['url']
end