Class: CyberSource::UnifiedriskPaymentBatch
- Inherits:
-
Object
- Object
- CyberSource::UnifiedriskPaymentBatch
- Defined in:
- lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb
Overview
Container for ACH/BACS batch payment metadata including file control fields, batch counts, and integrity checksums
Instance Attribute Summary collapse
-
#batch_number ⇒ Object
Unique sequential identifier for this batch within the batch file, used for tracking and reconciliation of ACH or BACS batch submissions.
-
#category_purpose_description ⇒ Object
Human-readable description of the business purpose for the batch (e.g., "Payroll", "Vendor Payments").
-
#end_of_batch_indicator ⇒ Object
Indicates this entry is the last record in the current batch.
-
#end_of_file_indicator ⇒ Object
Indicates this entry is the last record in the entire batch file.
-
#entry_detail_rec_num ⇒ Object
Sequential record number of the entry detail record within the batch, used for file integrity checks and record-level reconciliation.
-
#file_id_modifier ⇒ Object
Single character modifier (A-Z) used to distinguish multiple batch files submitted on the same day for the same originator.
-
#number_of_addenda_records ⇒ Object
Count of addenda records associated with this batch entry, used for validating batch completeness during file processing.
-
#service_class_code ⇒ Object
ACH service class code indicating the type of entries in the batch.
-
#total_batch_count_in_file ⇒ Object
Total number of batches contained in this file, used for file-level control validation and balancing.
-
#total_batch_entries ⇒ Object
Total count of entry detail records within this batch, used for batch-level balancing and reconciliation.
-
#total_entry_count_in_file ⇒ Object
Total count of all entry detail records across all batches in the file, used for file-level reconciliation.
-
#total_entry_hash ⇒ Object
Arithmetic sum of all routing transit numbers within the batch/file, used as a checksum for routing number validation.
-
#total_transit_count_in_file ⇒ Object
Total count of distinct routing transit numbers in the file, used for clearing house validation and routing verification.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UnifiedriskPaymentBatch
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ UnifiedriskPaymentBatch
Initializes the object
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 115 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'batchNumber') self.batch_number = attributes[:'batchNumber'] end if attributes.has_key?(:'categoryPurposeDescription') self.category_purpose_description = attributes[:'categoryPurposeDescription'] end if attributes.has_key?(:'endOfBatchIndicator') self.end_of_batch_indicator = attributes[:'endOfBatchIndicator'] end if attributes.has_key?(:'endOfFileIndicator') self.end_of_file_indicator = attributes[:'endOfFileIndicator'] end if attributes.has_key?(:'entryDetailRecNum') self.entry_detail_rec_num = attributes[:'entryDetailRecNum'] end if attributes.has_key?(:'fileIdModifier') self.file_id_modifier = attributes[:'fileIdModifier'] end if attributes.has_key?(:'numberOfAddendaRecords') self.number_of_addenda_records = attributes[:'numberOfAddendaRecords'] end if attributes.has_key?(:'serviceClassCode') self.service_class_code = attributes[:'serviceClassCode'] end if attributes.has_key?(:'totalBatchCountInFile') self.total_batch_count_in_file = attributes[:'totalBatchCountInFile'] end if attributes.has_key?(:'totalBatchEntries') self.total_batch_entries = attributes[:'totalBatchEntries'] end if attributes.has_key?(:'totalEntryCountInFile') self.total_entry_count_in_file = attributes[:'totalEntryCountInFile'] end if attributes.has_key?(:'totalEntryHash') self.total_entry_hash = attributes[:'totalEntryHash'] end if attributes.has_key?(:'totalTransitCountInFile') self.total_transit_count_in_file = attributes[:'totalTransitCountInFile'] end end |
Instance Attribute Details
#batch_number ⇒ Object
Unique sequential identifier for this batch within the batch file, used for tracking and reconciliation of ACH or BACS batch submissions
18 19 20 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 18 def batch_number @batch_number end |
#category_purpose_description ⇒ Object
Human-readable description of the business purpose for the batch (e.g., "Payroll", "Vendor Payments"). Corresponds to the ISO 20022 CategoryPurpose code
21 22 23 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 21 def category_purpose_description @category_purpose_description end |
#end_of_batch_indicator ⇒ Object
Indicates this entry is the last record in the current batch. Used to signal batch boundary during file processing
24 25 26 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 24 def end_of_batch_indicator @end_of_batch_indicator end |
#end_of_file_indicator ⇒ Object
Indicates this entry is the last record in the entire batch file. Used to trigger final file validation and processing
27 28 29 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 27 def end_of_file_indicator @end_of_file_indicator end |
#entry_detail_rec_num ⇒ Object
Sequential record number of the entry detail record within the batch, used for file integrity checks and record-level reconciliation
30 31 32 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 30 def entry_detail_rec_num @entry_detail_rec_num end |
#file_id_modifier ⇒ Object
Single character modifier (A-Z) used to distinguish multiple batch files submitted on the same day for the same originator
33 34 35 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 33 def file_id_modifier @file_id_modifier end |
#number_of_addenda_records ⇒ Object
Count of addenda records associated with this batch entry, used for validating batch completeness during file processing
36 37 38 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 36 def number_of_addenda_records @number_of_addenda_records end |
#service_class_code ⇒ Object
ACH service class code indicating the type of entries in the batch. Values - "200" (mixed), "220" (credits only), "225" (debits only), "280" (automated accounting)
39 40 41 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 39 def service_class_code @service_class_code end |
#total_batch_count_in_file ⇒ Object
Total number of batches contained in this file, used for file-level control validation and balancing
42 43 44 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 42 def total_batch_count_in_file @total_batch_count_in_file end |
#total_batch_entries ⇒ Object
Total count of entry detail records within this batch, used for batch-level balancing and reconciliation
45 46 47 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 45 def total_batch_entries @total_batch_entries end |
#total_entry_count_in_file ⇒ Object
Total count of all entry detail records across all batches in the file, used for file-level reconciliation
48 49 50 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 48 def total_entry_count_in_file @total_entry_count_in_file end |
#total_entry_hash ⇒ Object
Arithmetic sum of all routing transit numbers within the batch/file, used as a checksum for routing number validation
51 52 53 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 51 def total_entry_hash @total_entry_hash end |
#total_transit_count_in_file ⇒ Object
Total count of distinct routing transit numbers in the file, used for clearing house validation and routing verification
54 55 56 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 54 def total_transit_count_in_file @total_transit_count_in_file end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 57 def self.attribute_map { :'batch_number' => :'batchNumber', :'category_purpose_description' => :'categoryPurposeDescription', :'end_of_batch_indicator' => :'endOfBatchIndicator', :'end_of_file_indicator' => :'endOfFileIndicator', :'entry_detail_rec_num' => :'entryDetailRecNum', :'file_id_modifier' => :'fileIdModifier', :'number_of_addenda_records' => :'numberOfAddendaRecords', :'service_class_code' => :'serviceClassCode', :'total_batch_count_in_file' => :'totalBatchCountInFile', :'total_batch_entries' => :'totalBatchEntries', :'total_entry_count_in_file' => :'totalEntryCountInFile', :'total_entry_hash' => :'totalEntryHash', :'total_transit_count_in_file' => :'totalTransitCountInFile' } end |
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 76 def self.json_map { :'batch_number' => :'batch_number', :'category_purpose_description' => :'category_purpose_description', :'end_of_batch_indicator' => :'end_of_batch_indicator', :'end_of_file_indicator' => :'end_of_file_indicator', :'entry_detail_rec_num' => :'entry_detail_rec_num', :'file_id_modifier' => :'file_id_modifier', :'number_of_addenda_records' => :'number_of_addenda_records', :'service_class_code' => :'service_class_code', :'total_batch_count_in_file' => :'total_batch_count_in_file', :'total_batch_entries' => :'total_batch_entries', :'total_entry_count_in_file' => :'total_entry_count_in_file', :'total_entry_hash' => :'total_entry_hash', :'total_transit_count_in_file' => :'total_transit_count_in_file' } end |
.swagger_types ⇒ Object
Attribute type mapping.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 95 def self.swagger_types { :'batch_number' => :'String', :'category_purpose_description' => :'String', :'end_of_batch_indicator' => :'BOOLEAN', :'end_of_file_indicator' => :'BOOLEAN', :'entry_detail_rec_num' => :'Float', :'file_id_modifier' => :'String', :'number_of_addenda_records' => :'Float', :'service_class_code' => :'String', :'total_batch_count_in_file' => :'Float', :'total_batch_entries' => :'Float', :'total_entry_count_in_file' => :'Float', :'total_entry_hash' => :'Float', :'total_transit_count_in_file' => :'Float' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 189 def ==(o) return true if self.equal?(o) self.class == o.class && batch_number == o.batch_number && category_purpose_description == o.category_purpose_description && end_of_batch_indicator == o.end_of_batch_indicator && end_of_file_indicator == o.end_of_file_indicator && entry_detail_rec_num == o.entry_detail_rec_num && file_id_modifier == o.file_id_modifier && number_of_addenda_records == o.number_of_addenda_records && service_class_code == o.service_class_code && total_batch_count_in_file == o.total_batch_count_in_file && total_batch_entries == o.total_batch_entries && total_entry_count_in_file == o.total_entry_count_in_file && total_entry_hash == o.total_entry_hash && total_transit_count_in_file == o.total_transit_count_in_file end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 243 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = CyberSource.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 309 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 222 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
209 210 211 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 209 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
215 216 217 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 215 def hash [batch_number, category_purpose_description, end_of_batch_indicator, end_of_file_indicator, entry_detail_rec_num, file_id_modifier, number_of_addenda_records, service_class_code, total_batch_count_in_file, total_batch_entries, total_entry_count_in_file, total_entry_hash, total_transit_count_in_file].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
176 177 178 179 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 176 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
289 290 291 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 289 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
295 296 297 298 299 300 301 302 303 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 295 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
283 284 285 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 283 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
183 184 185 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb', line 183 def valid? true end |