Class: Nacha::Record::BatchControl
- Includes:
- BatchControlRecordType
- Defined in:
- lib/nacha/record/batch_control.rb
Instance Attribute Summary collapse
-
#batch_number ⇒ Nacha::Numeric
A number assigned by the ODFI to uniquely identify the batch.
-
#company_identification ⇒ String
The identifier for the company that originated the entries in the batch.
-
#entry_addenda_count ⇒ Nacha::Numeric
The total count of entry detail and addenda records within the batch.
-
#entry_hash ⇒ Nacha::Numeric
A hash total of the routing numbers of all entry detail records in the batch for validation.
-
#message_authentication_code ⇒ String
A code used to authenticate the batch, if required by the ODFI.
-
#originating_dfi_identification ⇒ String
The 8-digit routing number of the financial institution originating the batch.
-
#record_type_code ⇒ String
Identifies the record as a Batch Control record with a constant value of ‘8’.
-
#reserved ⇒ String
A reserved field for future use.
-
#service_class_code ⇒ Nacha::Numeric
Specifies the type of entries in the batch (e.g., credits, debits, or mixed).
-
#total_credit_entry_dollar_amount ⇒ Nacha::Numeric
The total dollar amount of all credit entries in the batch.
-
#total_debit_entry_dollar_amount ⇒ Nacha::Numeric
The total dollar amount of all debit entries in the batch.
Attributes inherited from Base
#children, #fields, #line_number, #name, #original_input_line, #parent, #validations
Method Summary
Methods included from BatchControlRecordType
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_number ⇒ Nacha::Numeric
Returns A number assigned by the ODFI to uniquely identify the batch.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/nacha/record/batch_control.rb', line 31 class BatchControl < Nacha::Record::Base include BatchControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C8', position: 1..1 nacha_field :service_class_code, inclusion: 'M', contents: 'Numeric', position: 2..4 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 5..10 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 11..20 nacha_field :total_debit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 21..32 nacha_field :total_credit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 33..44 nacha_field :company_identification, inclusion: 'R', contents: 'Alphameric', position: 45..54 nacha_field :message_authentication_code, inclusion: 'O', contents: 'Alphameric', position: 55..73 nacha_field :reserved, inclusion: 'O', contents: 'C ', position: 74..79 nacha_field :originating_dfi_identification, inclusion: 'M', contents: 'TTTTAAAA', position: 80..87 nacha_field :batch_number, inclusion: 'M', contents: 'Numeric', position: 88..94 end |
#company_identification ⇒ String
Returns The identifier for the company that originated the entries in the batch.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/nacha/record/batch_control.rb', line 31 class BatchControl < Nacha::Record::Base include BatchControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C8', position: 1..1 nacha_field :service_class_code, inclusion: 'M', contents: 'Numeric', position: 2..4 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 5..10 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 11..20 nacha_field :total_debit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 21..32 nacha_field :total_credit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 33..44 nacha_field :company_identification, inclusion: 'R', contents: 'Alphameric', position: 45..54 nacha_field :message_authentication_code, inclusion: 'O', contents: 'Alphameric', position: 55..73 nacha_field :reserved, inclusion: 'O', contents: 'C ', position: 74..79 nacha_field :originating_dfi_identification, inclusion: 'M', contents: 'TTTTAAAA', position: 80..87 nacha_field :batch_number, inclusion: 'M', contents: 'Numeric', position: 88..94 end |
#entry_addenda_count ⇒ Nacha::Numeric
Returns The total count of entry detail and addenda records within the batch.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/nacha/record/batch_control.rb', line 31 class BatchControl < Nacha::Record::Base include BatchControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C8', position: 1..1 nacha_field :service_class_code, inclusion: 'M', contents: 'Numeric', position: 2..4 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 5..10 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 11..20 nacha_field :total_debit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 21..32 nacha_field :total_credit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 33..44 nacha_field :company_identification, inclusion: 'R', contents: 'Alphameric', position: 45..54 nacha_field :message_authentication_code, inclusion: 'O', contents: 'Alphameric', position: 55..73 nacha_field :reserved, inclusion: 'O', contents: 'C ', position: 74..79 nacha_field :originating_dfi_identification, inclusion: 'M', contents: 'TTTTAAAA', position: 80..87 nacha_field :batch_number, inclusion: 'M', contents: 'Numeric', position: 88..94 end |
#entry_hash ⇒ Nacha::Numeric
Returns A hash total of the routing numbers of all entry detail records in the batch for validation.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/nacha/record/batch_control.rb', line 31 class BatchControl < Nacha::Record::Base include BatchControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C8', position: 1..1 nacha_field :service_class_code, inclusion: 'M', contents: 'Numeric', position: 2..4 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 5..10 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 11..20 nacha_field :total_debit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 21..32 nacha_field :total_credit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 33..44 nacha_field :company_identification, inclusion: 'R', contents: 'Alphameric', position: 45..54 nacha_field :message_authentication_code, inclusion: 'O', contents: 'Alphameric', position: 55..73 nacha_field :reserved, inclusion: 'O', contents: 'C ', position: 74..79 nacha_field :originating_dfi_identification, inclusion: 'M', contents: 'TTTTAAAA', position: 80..87 nacha_field :batch_number, inclusion: 'M', contents: 'Numeric', position: 88..94 end |
#message_authentication_code ⇒ String
Returns A code used to authenticate the batch, if required by the ODFI.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/nacha/record/batch_control.rb', line 31 class BatchControl < Nacha::Record::Base include BatchControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C8', position: 1..1 nacha_field :service_class_code, inclusion: 'M', contents: 'Numeric', position: 2..4 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 5..10 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 11..20 nacha_field :total_debit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 21..32 nacha_field :total_credit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 33..44 nacha_field :company_identification, inclusion: 'R', contents: 'Alphameric', position: 45..54 nacha_field :message_authentication_code, inclusion: 'O', contents: 'Alphameric', position: 55..73 nacha_field :reserved, inclusion: 'O', contents: 'C ', position: 74..79 nacha_field :originating_dfi_identification, inclusion: 'M', contents: 'TTTTAAAA', position: 80..87 nacha_field :batch_number, inclusion: 'M', contents: 'Numeric', position: 88..94 end |
#originating_dfi_identification ⇒ String
Returns The 8-digit routing number of the financial institution originating the batch.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/nacha/record/batch_control.rb', line 31 class BatchControl < Nacha::Record::Base include BatchControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C8', position: 1..1 nacha_field :service_class_code, inclusion: 'M', contents: 'Numeric', position: 2..4 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 5..10 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 11..20 nacha_field :total_debit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 21..32 nacha_field :total_credit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 33..44 nacha_field :company_identification, inclusion: 'R', contents: 'Alphameric', position: 45..54 nacha_field :message_authentication_code, inclusion: 'O', contents: 'Alphameric', position: 55..73 nacha_field :reserved, inclusion: 'O', contents: 'C ', position: 74..79 nacha_field :originating_dfi_identification, inclusion: 'M', contents: 'TTTTAAAA', position: 80..87 nacha_field :batch_number, inclusion: 'M', contents: 'Numeric', position: 88..94 end |
#record_type_code ⇒ String
Returns Identifies the record as a Batch Control record with a constant value of ‘8’.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/nacha/record/batch_control.rb', line 31 class BatchControl < Nacha::Record::Base include BatchControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C8', position: 1..1 nacha_field :service_class_code, inclusion: 'M', contents: 'Numeric', position: 2..4 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 5..10 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 11..20 nacha_field :total_debit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 21..32 nacha_field :total_credit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 33..44 nacha_field :company_identification, inclusion: 'R', contents: 'Alphameric', position: 45..54 nacha_field :message_authentication_code, inclusion: 'O', contents: 'Alphameric', position: 55..73 nacha_field :reserved, inclusion: 'O', contents: 'C ', position: 74..79 nacha_field :originating_dfi_identification, inclusion: 'M', contents: 'TTTTAAAA', position: 80..87 nacha_field :batch_number, inclusion: 'M', contents: 'Numeric', position: 88..94 end |
#reserved ⇒ String
Returns A reserved field for future use.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/nacha/record/batch_control.rb', line 31 class BatchControl < Nacha::Record::Base include BatchControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C8', position: 1..1 nacha_field :service_class_code, inclusion: 'M', contents: 'Numeric', position: 2..4 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 5..10 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 11..20 nacha_field :total_debit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 21..32 nacha_field :total_credit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 33..44 nacha_field :company_identification, inclusion: 'R', contents: 'Alphameric', position: 45..54 nacha_field :message_authentication_code, inclusion: 'O', contents: 'Alphameric', position: 55..73 nacha_field :reserved, inclusion: 'O', contents: 'C ', position: 74..79 nacha_field :originating_dfi_identification, inclusion: 'M', contents: 'TTTTAAAA', position: 80..87 nacha_field :batch_number, inclusion: 'M', contents: 'Numeric', position: 88..94 end |
#service_class_code ⇒ Nacha::Numeric
Returns Specifies the type of entries in the batch (e.g., credits, debits, or mixed).
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/nacha/record/batch_control.rb', line 31 class BatchControl < Nacha::Record::Base include BatchControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C8', position: 1..1 nacha_field :service_class_code, inclusion: 'M', contents: 'Numeric', position: 2..4 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 5..10 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 11..20 nacha_field :total_debit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 21..32 nacha_field :total_credit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 33..44 nacha_field :company_identification, inclusion: 'R', contents: 'Alphameric', position: 45..54 nacha_field :message_authentication_code, inclusion: 'O', contents: 'Alphameric', position: 55..73 nacha_field :reserved, inclusion: 'O', contents: 'C ', position: 74..79 nacha_field :originating_dfi_identification, inclusion: 'M', contents: 'TTTTAAAA', position: 80..87 nacha_field :batch_number, inclusion: 'M', contents: 'Numeric', position: 88..94 end |
#total_credit_entry_dollar_amount ⇒ Nacha::Numeric
Returns The total dollar amount of all credit entries in the batch.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/nacha/record/batch_control.rb', line 31 class BatchControl < Nacha::Record::Base include BatchControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C8', position: 1..1 nacha_field :service_class_code, inclusion: 'M', contents: 'Numeric', position: 2..4 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 5..10 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 11..20 nacha_field :total_debit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 21..32 nacha_field :total_credit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 33..44 nacha_field :company_identification, inclusion: 'R', contents: 'Alphameric', position: 45..54 nacha_field :message_authentication_code, inclusion: 'O', contents: 'Alphameric', position: 55..73 nacha_field :reserved, inclusion: 'O', contents: 'C ', position: 74..79 nacha_field :originating_dfi_identification, inclusion: 'M', contents: 'TTTTAAAA', position: 80..87 nacha_field :batch_number, inclusion: 'M', contents: 'Numeric', position: 88..94 end |
#total_debit_entry_dollar_amount ⇒ Nacha::Numeric
Returns The total dollar amount of all debit entries in the batch.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/nacha/record/batch_control.rb', line 31 class BatchControl < Nacha::Record::Base include BatchControlRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C8', position: 1..1 nacha_field :service_class_code, inclusion: 'M', contents: 'Numeric', position: 2..4 nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 5..10 nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 11..20 nacha_field :total_debit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 21..32 nacha_field :total_credit_entry_dollar_amount, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 33..44 nacha_field :company_identification, inclusion: 'R', contents: 'Alphameric', position: 45..54 nacha_field :message_authentication_code, inclusion: 'O', contents: 'Alphameric', position: 55..73 nacha_field :reserved, inclusion: 'O', contents: 'C ', position: 74..79 nacha_field :originating_dfi_identification, inclusion: 'M', contents: 'TTTTAAAA', position: 80..87 nacha_field :batch_number, inclusion: 'M', contents: 'Numeric', position: 88..94 end |