Class: CyberSourceMergedSpec::BankAccountValidation
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::BankAccountValidation
- Defined in:
- lib/cyber_source_merged_spec/models/bank_account_validation.rb
Overview
BankAccountValidation Model.
Instance Attribute Summary collapse
-
#raw_validation_code ⇒ Integer
Raw Validation Codes for routing number and account number Possible values: • -1: Unable to perform validation/Unknown error • -2: Service Unavailable • 12 to 16: Validation results.
-
#result_code ⇒ Integer
Result codes for account number and routing number Possible values: 00, 04, 98, 99.
-
#result_message ⇒ String
Result codes for account number and routing number Possible values: 00, 04, 98, 99.
Class Method Summary collapse
- .from_element(root) ⇒ Object
-
.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(raw_validation_code: SKIP, result_code: SKIP, result_message: SKIP, additional_properties: nil) ⇒ BankAccountValidation
constructor
A new instance of BankAccountValidation.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ 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(raw_validation_code: SKIP, result_code: SKIP, result_message: SKIP, additional_properties: nil) ⇒ BankAccountValidation
Returns a new instance of BankAccountValidation.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/cyber_source_merged_spec/models/bank_account_validation.rb', line 53 def initialize(raw_validation_code: SKIP, result_code: SKIP, result_message: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @raw_validation_code = raw_validation_code unless raw_validation_code == SKIP @result_code = result_code unless result_code == SKIP @result_message = unless == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#raw_validation_code ⇒ Integer
Raw Validation Codes for routing number and account number Possible values: • -1: Unable to perform validation/Unknown error • -2: Service Unavailable • 12 to 16: Validation results
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/bank_account_validation.rb', line 18 def raw_validation_code @raw_validation_code end |
#result_code ⇒ Integer
Result codes for account number and routing number Possible values: 00, 04, 98, 99
23 24 25 |
# File 'lib/cyber_source_merged_spec/models/bank_account_validation.rb', line 23 def result_code @result_code end |
#result_message ⇒ String
Result codes for account number and routing number Possible values: 00, 04, 98, 99
28 29 30 |
# File 'lib/cyber_source_merged_spec/models/bank_account_validation.rb', line 28 def @result_message end |
Class Method Details
.from_element(root) ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/cyber_source_merged_spec/models/bank_account_validation.rb', line 88 def self.from_element(root) raw_validation_code = XmlUtilities.from_element(root, 'rawValidationCode', Integer) result_code = XmlUtilities.from_element(root, 'resultCode', Integer) = XmlUtilities.from_element(root, 'resultMessage', String) new(raw_validation_code: raw_validation_code, result_code: result_code, result_message: , additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/cyber_source_merged_spec/models/bank_account_validation.rb', line 65 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. raw_validation_code = hash.key?('rawValidationCode') ? hash['rawValidationCode'] : SKIP result_code = hash.key?('resultCode') ? hash['resultCode'] : SKIP = hash.key?('resultMessage') ? hash['resultMessage'] : 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. BankAccountValidation.new(raw_validation_code: raw_validation_code, result_code: result_code, result_message: , additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
31 32 33 34 35 36 37 |
# File 'lib/cyber_source_merged_spec/models/bank_account_validation.rb', line 31 def self.names @_hash = {} if @_hash.nil? @_hash['raw_validation_code'] = 'rawValidationCode' @_hash['result_code'] = 'resultCode' @_hash['result_message'] = 'resultMessage' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/cyber_source_merged_spec/models/bank_account_validation.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 46 |
# File 'lib/cyber_source_merged_spec/models/bank_account_validation.rb', line 40 def self.optionals %w[ raw_validation_code result_code result_message ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
121 122 123 124 125 126 |
# File 'lib/cyber_source_merged_spec/models/bank_account_validation.rb', line 121 def inspect class_name = self.class.name.split('::').last "<#{class_name} raw_validation_code: #{@raw_validation_code.inspect}, result_code:"\ " #{@result_code.inspect}, result_message: #{@result_message.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
114 115 116 117 118 |
# File 'lib/cyber_source_merged_spec/models/bank_account_validation.rb', line 114 def to_s class_name = self.class.name.split('::').last "<#{class_name} raw_validation_code: #{@raw_validation_code}, result_code: #{@result_code},"\ " result_message: #{@result_message}, additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/cyber_source_merged_spec/models/bank_account_validation.rb', line 100 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'rawValidationCode', raw_validation_code) XmlUtilities.add_as_subelement(doc, root, 'resultCode', result_code) XmlUtilities.add_as_subelement(doc, root, 'resultMessage', ) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |