Class: Reach::REST::Api::Authentix::ConfigurationItemContext::AuthenticationItemInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Reach::REST::Api::Authentix::ConfigurationItemContext::AuthenticationItemInstance
- Defined in:
- lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb
Instance Method Summary collapse
-
#apiVersion ⇒ String
The API version.
-
#appletId ⇒ String
The identifier of the applet.
-
#authenticationId ⇒ String
The identifier of the authentication.
-
#channel ⇒ String
The channel used.
-
#configurationId ⇒ String
The identifier of the configuration.
-
#context ⇒ AuthenticationItemContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#dateCreated ⇒ Time
The date and time in GMT that the authentication was created.
-
#dateUpdated ⇒ Time
The date and time in GMT that the authentication was last updated.
-
#dest ⇒ String
The destination of the authentication code.
-
#expiryTime ⇒ String
An expiry time in minutes.
-
#fetch ⇒ AuthenticationItemInstance
Fetch the AuthenticationItemInstance.
-
#initialize(version, payload, configuration_id: nil, authentication_id: nil) ⇒ AuthenticationItemInstance
constructor
Initialize the AuthenticationItemInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#maxControls ⇒ String
The maximum number of code controls.
-
#maxTrials ⇒ String
The maximum number of trials.
- #paymentInfo ⇒ PaymentInfo
-
#status ⇒ String
The status of the authentication.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#trials ⇒ Array<TrialQuickInfo>
An array of authentication trials containing channel-specific information about each trial.
-
#update(status: nil) ⇒ AuthenticationItemInstance
Update the AuthenticationItemInstance.
Constructor Details
#initialize(version, payload, configuration_id: nil, authentication_id: nil) ⇒ AuthenticationItemInstance
Initialize the AuthenticationItemInstance
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 286 def initialize(version, payload , configuration_id: nil, authentication_id: nil) super(version) # Marshaled Properties @properties = { 'appletId' => payload['appletId'], 'apiVersion' => payload['apiVersion'], 'configurationId' => payload['configurationId'], 'authenticationId' => payload['authenticationId'], 'status' => payload['status'], 'dest' => payload['dest'], 'channel' => payload['channel'], 'expiryTime' => payload['expiryTime'] == nil ? payload['expiryTime'] : payload['expiryTime'].to_i, 'maxTrials' => payload['maxTrials'] == nil ? payload['maxTrials'] : payload['maxTrials'].to_i, 'maxControls' => payload['maxControls'] == nil ? payload['maxControls'] : payload['maxControls'].to_i, 'paymentInfo' => payload['paymentInfo'], 'trials' => payload['trials'], 'dateCreated' => Reach.deserialize_iso8601_datetime(payload['dateCreated']), 'dateUpdated' => Reach.deserialize_iso8601_datetime(payload['dateUpdated']), } # Context @instance_context = nil @params = { 'configuration_id' => configuration_id || @properties['configurationId'] ,'authentication_id' => authentication_id || @properties['authenticationId'] , } end |
Instance Method Details
#apiVersion ⇒ String
Returns The API version.
331 332 333 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 331 def apiVersion @properties['apiVersion'] end |
#appletId ⇒ String
Returns The identifier of the applet.
325 326 327 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 325 def appletId @properties['appletId'] end |
#authenticationId ⇒ String
Returns The identifier of the authentication.
343 344 345 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 343 def authenticationId @properties['authenticationId'] end |
#channel ⇒ String
Returns The channel used.
361 362 363 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 361 def channel @properties['channel'] end |
#configurationId ⇒ String
Returns The identifier of the configuration.
337 338 339 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 337 def configurationId @properties['configurationId'] end |
#context ⇒ AuthenticationItemContext
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/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 316 def context unless @instance_context @instance_context = AuthenticationItemContext.new(@version , @params['configuration_id'], @params['authentication_id']) end @instance_context end |
#dateCreated ⇒ Time
Returns The date and time in GMT that the authentication was created.
397 398 399 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 397 def dateCreated @properties['dateCreated'] end |
#dateUpdated ⇒ Time
Returns The date and time in GMT that the authentication was last updated.
403 404 405 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 403 def dateUpdated @properties['dateUpdated'] end |
#dest ⇒ String
Returns The destination of the authentication code. Phone numbers must be in E.164 format.
355 356 357 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 355 def dest @properties['dest'] end |
#expiryTime ⇒ String
Returns An expiry time in minutes.
367 368 369 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 367 def expiryTime @properties['expiryTime'] end |
#fetch ⇒ AuthenticationItemInstance
Fetch the AuthenticationItemInstance
410 411 412 413 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 410 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
437 438 439 440 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 437 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Reach.Api.Authentix.AuthenticationItemInstance #{values}>" end |
#maxControls ⇒ String
Returns The maximum number of code controls.
379 380 381 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 379 def maxControls @properties['maxControls'] end |
#maxTrials ⇒ String
Returns The maximum number of trials.
373 374 375 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 373 def maxTrials @properties['maxTrials'] end |
#paymentInfo ⇒ PaymentInfo
385 386 387 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 385 def paymentInfo @properties['paymentInfo'] end |
#status ⇒ String
Returns The status of the authentication.
349 350 351 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 349 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
430 431 432 433 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 430 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Reach.Api.Authentix.AuthenticationItemInstance #{values}>" end |
#trials ⇒ Array<TrialQuickInfo>
Returns An array of authentication trials containing channel-specific information about each trial.
391 392 393 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 391 def trials @properties['trials'] end |
#update(status: nil) ⇒ AuthenticationItemInstance
Update the AuthenticationItemInstance
419 420 421 422 423 424 425 426 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb', line 419 def update( status: nil ) context.update( status: status, ) end |