Class: VisaAcceptanceMergedSpec::Ivr
- Defined in:
- lib/visa_acceptance_merged_spec/models/ivr.rb
Overview
Ivr Model.
Instance Attribute Summary collapse
-
#enabled_message ⇒ TrueClass | FalseClass
Flag to indicate if a valid IVR transaction was detected.
-
#encryption_key ⇒ String
Encryption key to be used in the event the ACS requires encryption of the credential field.
-
#encryption_mandatory ⇒ TrueClass | FalseClass
Flag to indicate if the ACS requires the credential to be encrypted.
-
#encryption_type ⇒ String
An indicator from the ACS to inform the type of encryption that should be used in the event the ACS requires encryption of the credential field.
-
#label ⇒ String
An ACS Provided label that can be presented to the Consumer.
-
#prompt ⇒ String
An ACS provided string that can be presented to the Consumer.
-
#status_message ⇒ String
An ACS provided message that can provide additional information or details.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(enabled_message: SKIP, encryption_key: SKIP, encryption_mandatory: SKIP, encryption_type: SKIP, label: SKIP, prompt: SKIP, status_message: SKIP, additional_properties: nil) ⇒ Ivr
constructor
A new instance of Ivr.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(enabled_message: SKIP, encryption_key: SKIP, encryption_mandatory: SKIP, encryption_type: SKIP, label: SKIP, prompt: SKIP, status_message: SKIP, additional_properties: nil) ⇒ Ivr
Returns a new instance of Ivr.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/visa_acceptance_merged_spec/models/ivr.rb', line 76 def initialize(enabled_message: SKIP, encryption_key: SKIP, encryption_mandatory: SKIP, encryption_type: SKIP, label: SKIP, prompt: SKIP, status_message: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @enabled_message = unless == SKIP @encryption_key = encryption_key unless encryption_key == SKIP @encryption_mandatory = encryption_mandatory unless encryption_mandatory == SKIP @encryption_type = encryption_type unless encryption_type == SKIP @label = label unless label == SKIP @prompt = prompt unless prompt == SKIP @status_message = unless == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#enabled_message ⇒ TrueClass | FalseClass
Flag to indicate if a valid IVR transaction was detected.
14 15 16 |
# File 'lib/visa_acceptance_merged_spec/models/ivr.rb', line 14 def @enabled_message end |
#encryption_key ⇒ String
Encryption key to be used in the event the ACS requires encryption of the credential field.
19 20 21 |
# File 'lib/visa_acceptance_merged_spec/models/ivr.rb', line 19 def encryption_key @encryption_key end |
#encryption_mandatory ⇒ TrueClass | FalseClass
Flag to indicate if the ACS requires the credential to be encrypted.
23 24 25 |
# File 'lib/visa_acceptance_merged_spec/models/ivr.rb', line 23 def encryption_mandatory @encryption_mandatory end |
#encryption_type ⇒ String
An indicator from the ACS to inform the type of encryption that should be used in the event the ACS requires encryption of the credential field.
28 29 30 |
# File 'lib/visa_acceptance_merged_spec/models/ivr.rb', line 28 def encryption_type @encryption_type end |
#label ⇒ String
An ACS Provided label that can be presented to the Consumer. Recommended use with an application.
33 34 35 |
# File 'lib/visa_acceptance_merged_spec/models/ivr.rb', line 33 def label @label end |
#prompt ⇒ String
An ACS provided string that can be presented to the Consumer. Recommended use with an application.
38 39 40 |
# File 'lib/visa_acceptance_merged_spec/models/ivr.rb', line 38 def prompt @prompt end |
#status_message ⇒ String
An ACS provided message that can provide additional information or details.
43 44 45 |
# File 'lib/visa_acceptance_merged_spec/models/ivr.rb', line 43 def @status_message end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/visa_acceptance_merged_spec/models/ivr.rb', line 94 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. = hash.key?('enabledMessage') ? hash['enabledMessage'] : SKIP encryption_key = hash.key?('encryptionKey') ? hash['encryptionKey'] : SKIP encryption_mandatory = hash.key?('encryptionMandatory') ? hash['encryptionMandatory'] : SKIP encryption_type = hash.key?('encryptionType') ? hash['encryptionType'] : SKIP label = hash.key?('label') ? hash['label'] : SKIP prompt = hash.key?('prompt') ? hash['prompt'] : SKIP = hash.key?('statusMessage') ? hash['statusMessage'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. Ivr.new(enabled_message: , encryption_key: encryption_key, encryption_mandatory: encryption_mandatory, encryption_type: encryption_type, label: label, prompt: prompt, status_message: , additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/visa_acceptance_merged_spec/models/ivr.rb', line 46 def self.names @_hash = {} if @_hash.nil? @_hash['enabled_message'] = 'enabledMessage' @_hash['encryption_key'] = 'encryptionKey' @_hash['encryption_mandatory'] = 'encryptionMandatory' @_hash['encryption_type'] = 'encryptionType' @_hash['label'] = 'label' @_hash['prompt'] = 'prompt' @_hash['status_message'] = 'statusMessage' @_hash end |
.nullables ⇒ Object
An array for nullable fields
72 73 74 |
# File 'lib/visa_acceptance_merged_spec/models/ivr.rb', line 72 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/visa_acceptance_merged_spec/models/ivr.rb', line 59 def self.optionals %w[ enabled_message encryption_key encryption_mandatory encryption_type label prompt status_message ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
137 138 139 140 141 142 143 144 |
# File 'lib/visa_acceptance_merged_spec/models/ivr.rb', line 137 def inspect class_name = self.class.name.split('::').last "<#{class_name} enabled_message: #{@enabled_message.inspect}, encryption_key:"\ " #{@encryption_key.inspect}, encryption_mandatory: #{@encryption_mandatory.inspect},"\ " encryption_type: #{@encryption_type.inspect}, label: #{@label.inspect}, prompt:"\ " #{@prompt.inspect}, status_message: #{@status_message.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
128 129 130 131 132 133 134 |
# File 'lib/visa_acceptance_merged_spec/models/ivr.rb', line 128 def to_s class_name = self.class.name.split('::').last "<#{class_name} enabled_message: #{@enabled_message}, encryption_key: #{@encryption_key},"\ " encryption_mandatory: #{@encryption_mandatory}, encryption_type: #{@encryption_type},"\ " label: #{@label}, prompt: #{@prompt}, status_message: #{@status_message},"\ " additional_properties: #{@additional_properties}>" end |