Class: Reach::REST::Api::Authentix::ConfigurationItemInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Reach::REST::Api::Authentix::ConfigurationItemInstance
- Defined in:
- lib/reach-ruby/rest/api/authentix/configuration_item.rb
Instance Method Summary collapse
-
#allowCustomCode ⇒ Boolean
A flag indicating if the configuration allows sending custom and non-generated code.
-
#apiVersion ⇒ String
The API version used to create the configuration.
-
#appletId ⇒ String
The identifier of the applet creating the configuration.
-
#authentication_control_items ⇒ authentication_control_items
Access the authentication_control_items.
-
#authentication_items ⇒ authentication_items
Access the authentication_items.
-
#codeLength ⇒ String
The length of the code to be generated.
-
#configurationId ⇒ String
The identifier of the configuration.
-
#context ⇒ ConfigurationItemContext
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 configuration was created.
-
#dateUpdated ⇒ Time
The date and time in GMT that the configuration was last updated.
-
#defaultExpiryTime ⇒ String
The default expiry time of the authentication code.
-
#defaultMaxControls ⇒ String
The default maximum number of code controls per authentication.
-
#defaultMaxTrials ⇒ String
The default maximum number of trials per authentication.
-
#delete ⇒ Boolean
Delete the ConfigurationItemInstance.
-
#emailTemplateId ⇒ String
The default email template ID used by this configuration.
-
#fetch ⇒ ConfigurationItemInstance
Fetch the ConfigurationItemInstance.
-
#initialize(version, payload, configuration_id: nil) ⇒ ConfigurationItemInstance
constructor
Initialize the ConfigurationItemInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#serviceName ⇒ String
The name of the authentication service.
-
#smsTemplateId ⇒ String
The default sms template ID used by this configuration.
-
#smtpSettingId ⇒ String
The ID of the SMTP settings used by the configuration.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(service_name: :unset, code_length: :unset, allow_custom_code: :unset, used_for_digital_payment: :unset, default_expiry_time: :unset, default_max_trials: :unset, default_max_controls: :unset, smtp_setting_id: :unset, email_template_id: :unset, sms_template_id: :unset) ⇒ ConfigurationItemInstance
Update the ConfigurationItemInstance.
-
#usedForDigitalPayment ⇒ Boolean
A flag indicating if the configuration is used to authenticate digital payments.
Constructor Details
#initialize(version, payload, configuration_id: nil) ⇒ ConfigurationItemInstance
Initialize the ConfigurationItemInstance
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 367 def initialize(version, payload , configuration_id: nil) super(version) # Marshaled Properties @properties = { 'appletId' => payload['appletId'], 'apiVersion' => payload['apiVersion'], 'configurationId' => payload['configurationId'], 'serviceName' => payload['serviceName'], 'codeLength' => payload['codeLength'] == nil ? payload['codeLength'] : payload['codeLength'].to_i, 'allowCustomCode' => payload['allowCustomCode'], 'usedForDigitalPayment' => payload['usedForDigitalPayment'], 'defaultExpiryTime' => payload['defaultExpiryTime'] == nil ? payload['defaultExpiryTime'] : payload['defaultExpiryTime'].to_i, 'defaultMaxTrials' => payload['defaultMaxTrials'] == nil ? payload['defaultMaxTrials'] : payload['defaultMaxTrials'].to_i, 'defaultMaxControls' => payload['defaultMaxControls'] == nil ? payload['defaultMaxControls'] : payload['defaultMaxControls'].to_i, 'smtpSettingId' => payload['smtpSettingId'], 'emailTemplateId' => payload['emailTemplateId'], 'smsTemplateId' => payload['smsTemplateId'], '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'] , } end |
Instance Method Details
#allowCustomCode ⇒ Boolean
Returns A flag indicating if the configuration allows sending custom and non-generated code.
437 438 439 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 437 def allowCustomCode @properties['allowCustomCode'] end |
#apiVersion ⇒ String
Returns The API version used to create the configuration.
413 414 415 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 413 def apiVersion @properties['apiVersion'] end |
#appletId ⇒ String
Returns The identifier of the applet creating the configuration.
407 408 409 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 407 def appletId @properties['appletId'] end |
#authentication_control_items ⇒ authentication_control_items
Access the authentication_control_items
554 555 556 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 554 def authentication_control_items context.authentication_control_items end |
#authentication_items ⇒ authentication_items
Access the authentication_items
561 562 563 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 561 def authentication_items context.authentication_items end |
#codeLength ⇒ String
Returns The length of the code to be generated.
431 432 433 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 431 def codeLength @properties['codeLength'] end |
#configurationId ⇒ String
Returns The identifier of the configuration.
419 420 421 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 419 def configurationId @properties['configurationId'] end |
#context ⇒ ConfigurationItemContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
398 399 400 401 402 403 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 398 def context unless @instance_context @instance_context = ConfigurationItemContext.new(@version , @params['configuration_id']) end @instance_context end |
#dateCreated ⇒ Time
Returns The date and time in GMT that the configuration was created.
485 486 487 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 485 def dateCreated @properties['dateCreated'] end |
#dateUpdated ⇒ Time
Returns The date and time in GMT that the configuration was last updated.
491 492 493 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 491 def dateUpdated @properties['dateUpdated'] end |
#defaultExpiryTime ⇒ String
Returns the default expiry time of the authentication code.
449 450 451 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 449 def defaultExpiryTime @properties['defaultExpiryTime'] end |
#defaultMaxControls ⇒ String
Returns the default maximum number of code controls per authentication.
461 462 463 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 461 def defaultMaxControls @properties['defaultMaxControls'] end |
#defaultMaxTrials ⇒ String
Returns the default maximum number of trials per authentication.
455 456 457 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 455 def defaultMaxTrials @properties['defaultMaxTrials'] end |
#delete ⇒ Boolean
Delete the ConfigurationItemInstance
498 499 500 501 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 498 def delete context.delete end |
#emailTemplateId ⇒ String
Returns The default email template ID used by this configuration.
473 474 475 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 473 def emailTemplateId @properties['emailTemplateId'] end |
#fetch ⇒ ConfigurationItemInstance
Fetch the ConfigurationItemInstance
506 507 508 509 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 506 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
574 575 576 577 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 574 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Reach.Api.Authentix.ConfigurationItemInstance #{values}>" end |
#serviceName ⇒ String
Returns The name of the authentication service.
425 426 427 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 425 def serviceName @properties['serviceName'] end |
#smsTemplateId ⇒ String
Returns The default sms template ID used by this configuration.
479 480 481 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 479 def smsTemplateId @properties['smsTemplateId'] end |
#smtpSettingId ⇒ String
Returns The ID of the SMTP settings used by the configuration.
467 468 469 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 467 def smtpSettingId @properties['smtpSettingId'] end |
#to_s ⇒ Object
Provide a user friendly representation
567 568 569 570 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 567 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Reach.Api.Authentix.ConfigurationItemInstance #{values}>" end |
#update(service_name: :unset, code_length: :unset, allow_custom_code: :unset, used_for_digital_payment: :unset, default_expiry_time: :unset, default_max_trials: :unset, default_max_controls: :unset, smtp_setting_id: :unset, email_template_id: :unset, sms_template_id: :unset) ⇒ ConfigurationItemInstance
Update the ConfigurationItemInstance
524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 524 def update( service_name: :unset, code_length: :unset, allow_custom_code: :unset, used_for_digital_payment: :unset, default_expiry_time: :unset, default_max_trials: :unset, default_max_controls: :unset, smtp_setting_id: :unset, email_template_id: :unset, sms_template_id: :unset ) context.update( service_name: service_name, code_length: code_length, allow_custom_code: allow_custom_code, used_for_digital_payment: used_for_digital_payment, default_expiry_time: default_expiry_time, default_max_trials: default_max_trials, default_max_controls: default_max_controls, smtp_setting_id: smtp_setting_id, email_template_id: email_template_id, sms_template_id: sms_template_id, ) end |
#usedForDigitalPayment ⇒ Boolean
Returns A flag indicating if the configuration is used to authenticate digital payments.
443 444 445 |
# File 'lib/reach-ruby/rest/api/authentix/configuration_item.rb', line 443 def usedForDigitalPayment @properties['usedForDigitalPayment'] end |