Class: Nacha::Record::AdvFileControl
- Includes:
- FileControlRecordType
- Defined in:
- lib/nacha/record/adv_file_control.rb
Instance Attribute Summary collapse
-
#batch_count ⇒ Nacha::Numeric
The total number of batch records in the file.
-
#block_count ⇒ Nacha::Numeric
The total number of blocks in the file, where a block is 10 lines.
-
#entry_addenda_count ⇒ Nacha::Numeric
The total number of entry detail and addenda records in the file.
-
#entry_hash ⇒ Nacha::Numeric
The sum of all Entry Hash fields from the Batch Control records in the file.
-
#record_type_code ⇒ String
Identifies the record as an ADV File Control record with a constant value of ‘9’.
-
#reserved ⇒ String
A reserved field for future use.
-
#total_credit_entry_dollar_amount_in_file ⇒ Nacha::Numeric
The total value of all credit entries in the file.
-
#total_debit_entry_dollar_amount_in_file ⇒ Nacha::Numeric
The total value of all debit entries in the file, which is zero for ADV files.
Attributes inherited from Base
#children, #fields, #line_number, #name, #original_input_line, #parent, #validations
Method Summary
Methods included from FileControlRecordType
Methods inherited from Base
#add_error, #create_fields_from_definition, #credit?, #debit?, definition, #definition, #errors, #human_name, #initialize, #inspect, matcher, #method_missing, nacha_field, parse, #record_type, record_type, #respond_to_missing?, #to_ach, #to_h, to_h, #to_html, to_json, #to_json, unpack_str, #valid?, #validate, validations
Methods included from Validations::FieldValidations
Constructor Details
This class inherits a constructor from Nacha::Record::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Nacha::Record::Base
Instance Attribute Details
#batch_count ⇒ Nacha::Numeric
Returns The total number of batch records in the file.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/nacha/record/adv_file_control.rb', line 25 class AdvFileControl < Nacha::Record::Base include FileControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C9', position: 1..1 nacha_field :batch_count, inclusion: 'M', contents: 'Numeric', position: 2..7 nacha_field :block_count, inclusion: 'M', contents: 'Numeric', position: 8..13 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 14..21 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 22..31 nacha_field :total_debit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 32..51 nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 52..71 nacha_field :reserved, inclusion: 'M', contents: 'C', position: 72..94 end |
#block_count ⇒ Nacha::Numeric
Returns The total number of blocks in the file, where a block is 10 lines.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/nacha/record/adv_file_control.rb', line 25 class AdvFileControl < Nacha::Record::Base include FileControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C9', position: 1..1 nacha_field :batch_count, inclusion: 'M', contents: 'Numeric', position: 2..7 nacha_field :block_count, inclusion: 'M', contents: 'Numeric', position: 8..13 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 14..21 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 22..31 nacha_field :total_debit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 32..51 nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 52..71 nacha_field :reserved, inclusion: 'M', contents: 'C', position: 72..94 end |
#entry_addenda_count ⇒ Nacha::Numeric
Returns The total number of entry detail and addenda records in the file.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/nacha/record/adv_file_control.rb', line 25 class AdvFileControl < Nacha::Record::Base include FileControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C9', position: 1..1 nacha_field :batch_count, inclusion: 'M', contents: 'Numeric', position: 2..7 nacha_field :block_count, inclusion: 'M', contents: 'Numeric', position: 8..13 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 14..21 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 22..31 nacha_field :total_debit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 32..51 nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 52..71 nacha_field :reserved, inclusion: 'M', contents: 'C', position: 72..94 end |
#entry_hash ⇒ Nacha::Numeric
Returns The sum of all Entry Hash fields from the Batch Control records in the file.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/nacha/record/adv_file_control.rb', line 25 class AdvFileControl < Nacha::Record::Base include FileControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C9', position: 1..1 nacha_field :batch_count, inclusion: 'M', contents: 'Numeric', position: 2..7 nacha_field :block_count, inclusion: 'M', contents: 'Numeric', position: 8..13 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 14..21 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 22..31 nacha_field :total_debit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 32..51 nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 52..71 nacha_field :reserved, inclusion: 'M', contents: 'C', position: 72..94 end |
#record_type_code ⇒ String
Returns Identifies the record as an ADV File Control record with a constant value of ‘9’.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/nacha/record/adv_file_control.rb', line 25 class AdvFileControl < Nacha::Record::Base include FileControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C9', position: 1..1 nacha_field :batch_count, inclusion: 'M', contents: 'Numeric', position: 2..7 nacha_field :block_count, inclusion: 'M', contents: 'Numeric', position: 8..13 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 14..21 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 22..31 nacha_field :total_debit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 32..51 nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 52..71 nacha_field :reserved, inclusion: 'M', contents: 'C', position: 72..94 end |
#reserved ⇒ String
Returns A reserved field for future use.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/nacha/record/adv_file_control.rb', line 25 class AdvFileControl < Nacha::Record::Base include FileControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C9', position: 1..1 nacha_field :batch_count, inclusion: 'M', contents: 'Numeric', position: 2..7 nacha_field :block_count, inclusion: 'M', contents: 'Numeric', position: 8..13 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 14..21 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 22..31 nacha_field :total_debit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 32..51 nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 52..71 nacha_field :reserved, inclusion: 'M', contents: 'C', position: 72..94 end |
#total_credit_entry_dollar_amount_in_file ⇒ Nacha::Numeric
Returns The total value of all credit entries in the file.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/nacha/record/adv_file_control.rb', line 25 class AdvFileControl < Nacha::Record::Base include FileControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C9', position: 1..1 nacha_field :batch_count, inclusion: 'M', contents: 'Numeric', position: 2..7 nacha_field :block_count, inclusion: 'M', contents: 'Numeric', position: 8..13 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 14..21 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 22..31 nacha_field :total_debit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 32..51 nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 52..71 nacha_field :reserved, inclusion: 'M', contents: 'C', position: 72..94 end |
#total_debit_entry_dollar_amount_in_file ⇒ Nacha::Numeric
Returns The total value of all debit entries in the file, which is zero for ADV files.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/nacha/record/adv_file_control.rb', line 25 class AdvFileControl < Nacha::Record::Base include FileControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C9', position: 1..1 nacha_field :batch_count, inclusion: 'M', contents: 'Numeric', position: 2..7 nacha_field :block_count, inclusion: 'M', contents: 'Numeric', position: 8..13 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 14..21 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 22..31 nacha_field :total_debit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 32..51 nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 52..71 nacha_field :reserved, inclusion: 'M', contents: 'C', position: 72..94 end |