Class: VisaAcceptanceMergedSpec::Account3
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::Account3
- Defined in:
- lib/visa_acceptance_merged_spec/models/account3.rb
Overview
Account3 Model.
Instance Attribute Summary collapse
-
#check_image_reference_number ⇒ String
Image reference number associated with the check.
-
#check_number ⇒ String
Check number.
-
#encoder_id ⇒ String
Identifier for the bank that provided the customer’s encoded account number.
-
#number ⇒ String
Account number.
-
#type ⇒ String
Account type.
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(type: SKIP, number: SKIP, encoder_id: SKIP, check_number: SKIP, check_image_reference_number: SKIP, additional_properties: nil) ⇒ Account3
constructor
A new instance of Account3.
-
#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(type: SKIP, number: SKIP, encoder_id: SKIP, check_number: SKIP, check_image_reference_number: SKIP, additional_properties: nil) ⇒ Account3
Returns a new instance of Account3.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/visa_acceptance_merged_spec/models/account3.rb', line 73 def initialize(type: SKIP, number: SKIP, encoder_id: SKIP, check_number: SKIP, check_image_reference_number: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @type = type unless type == SKIP @number = number unless number == SKIP @encoder_id = encoder_id unless encoder_id == SKIP @check_number = check_number unless check_number == SKIP unless check_image_reference_number == SKIP @check_image_reference_number = check_image_reference_number end @additional_properties = additional_properties end |
Instance Attribute Details
#check_image_reference_number ⇒ String
Image reference number associated with the check. You cannot include any special characters.
44 45 46 |
# File 'lib/visa_acceptance_merged_spec/models/account3.rb', line 44 def check_image_reference_number @check_image_reference_number end |
#check_number ⇒ String
Check number. Chase Paymentech Solutions - Optional. Visa Acceptance ACH Service - Not used. RBS WorldPay Atlanta - Optional on debits. Required on credits. TeleCheck - Strongly recommended on debit requests. Optional on credits.
39 40 41 |
# File 'lib/visa_acceptance_merged_spec/models/account3.rb', line 39 def check_number @check_number end |
#encoder_id ⇒ String
Identifier for the bank that provided the customer’s encoded account number. To obtain the bank identifier, contact your processor.
31 32 33 |
# File 'lib/visa_acceptance_merged_spec/models/account3.rb', line 31 def encoder_id @encoder_id end |
#number ⇒ String
Account number. When processing encoded account numbers, use this field for the encoded account number.
25 26 27 |
# File 'lib/visa_acceptance_merged_spec/models/account3.rb', line 25 def number @number end |
#type ⇒ String
Account type. Possible values:
- C: Checking.
- G: General ledger. This value is supported only on Wells Fargo ACH.
- S: Savings (U.S. dollars only).
- X: Corporate checking (U.S. dollars only).
19 20 21 |
# File 'lib/visa_acceptance_merged_spec/models/account3.rb', line 19 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/visa_acceptance_merged_spec/models/account3.rb', line 91 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. type = hash.key?('type') ? hash['type'] : SKIP number = hash.key?('number') ? hash['number'] : SKIP encoder_id = hash.key?('encoderId') ? hash['encoderId'] : SKIP check_number = hash.key?('checkNumber') ? hash['checkNumber'] : SKIP check_image_reference_number = hash.key?('checkImageReferenceNumber') ? hash['checkImageReferenceNumber'] : 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. Account3.new(type: type, number: number, encoder_id: encoder_id, check_number: check_number, check_image_reference_number: check_image_reference_number, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
47 48 49 50 51 52 53 54 55 |
# File 'lib/visa_acceptance_merged_spec/models/account3.rb', line 47 def self.names @_hash = {} if @_hash.nil? @_hash['type'] = 'type' @_hash['number'] = 'number' @_hash['encoder_id'] = 'encoderId' @_hash['check_number'] = 'checkNumber' @_hash['check_image_reference_number'] = 'checkImageReferenceNumber' @_hash end |
.nullables ⇒ Object
An array for nullable fields
69 70 71 |
# File 'lib/visa_acceptance_merged_spec/models/account3.rb', line 69 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
58 59 60 61 62 63 64 65 66 |
# File 'lib/visa_acceptance_merged_spec/models/account3.rb', line 58 def self.optionals %w[ type number encoder_id check_number check_image_reference_number ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
127 128 129 130 131 132 133 |
# File 'lib/visa_acceptance_merged_spec/models/account3.rb', line 127 def inspect class_name = self.class.name.split('::').last "<#{class_name} type: #{@type.inspect}, number: #{@number.inspect}, encoder_id:"\ " #{@encoder_id.inspect}, check_number: #{@check_number.inspect},"\ " check_image_reference_number: #{@check_image_reference_number.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
119 120 121 122 123 124 |
# File 'lib/visa_acceptance_merged_spec/models/account3.rb', line 119 def to_s class_name = self.class.name.split('::').last "<#{class_name} type: #{@type}, number: #{@number}, encoder_id: #{@encoder_id},"\ " check_number: #{@check_number}, check_image_reference_number:"\ " #{@check_image_reference_number}, additional_properties: #{@additional_properties}>" end |