Class: Nacha::Record::FileHeader
- Includes:
- FileHeaderRecordType
- Defined in:
- lib/nacha/record/file_header.rb
Overview
The FileHeader record is the first record in a Nacha file and contains information about the file itself.
Instance Attribute Summary collapse
-
#blocking_factor ⇒ String
The number of records in a block, which is always ‘10’.
-
#file_creation_date ⇒ String
The date the file was created, in YYMMDD format.
-
#file_creation_time ⇒ String
The time the file was created, in HHMM format.
-
#file_id_modifier ⇒ String
A character used to distinguish between multiple files created on the same day.
-
#format_code ⇒ String
Indicates the version of the Nacha file format, typically ‘1’.
-
#immediate_destination ⇒ Nacha::AbaNumber
The routing number of the ACH Operator or receiving point to which the file is sent.
-
#immediate_destination_name ⇒ String
The name of the ACH Operator or receiving point.
-
#immediate_origin ⇒ Nacha::AbaNumber
The routing number of the ODFI or sending point that created the file.
-
#immediate_origin_name ⇒ String
The name of the ODFI or sending point.
-
#priority_code ⇒ Nacha::Numeric
A code assigned by the ODFI to indicate the processing priority of the file.
-
#record_size ⇒ String
The fixed number of characters per record, which is always ‘094’.
-
#record_type_code ⇒ String
Identifies the record as a File Header record with a constant value of ‘1’.
-
#reference_code ⇒ String
An optional code for the ODFI’s use.
Attributes inherited from Base
#children, #fields, #line_number, #name, #original_input_line, #parent, #validations
Method Summary
Methods included from FileHeaderRecordType
#child_record_types, included, #next_record_types
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
#blocking_factor ⇒ String
Returns The number of records in a block, which is always ‘10’.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/nacha/record/file_header.rb', line 36 class FileHeader < Nacha::Record::Base include FileHeaderRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C1', position: 1..1 nacha_field :priority_code, inclusion: 'R', contents: 'Numeric', position: 2..3 nacha_field :immediate_destination, inclusion: 'M', contents: 'bTTTTAAAAC', position: 4..13 nacha_field :immediate_origin, inclusion: 'M', contents: 'bTTTTAAAAC', position: 14..23 nacha_field :file_creation_date, inclusion: 'M', contents: 'YYMMDD', position: 24..29 nacha_field :file_creation_time, inclusion: 'M', contents: 'HHMM', position: 30..33 nacha_field :file_id_modifier, inclusion: 'M', contents: 'A-Z0-9', position: 34..34 nacha_field :record_size, inclusion: 'M', contents: 'C094', position: 35..37 nacha_field :blocking_factor, inclusion: 'M', contents: 'C10', position: 38..39 nacha_field :format_code, inclusion: 'M', contents: 'C1', position: 40..40 nacha_field :immediate_destination_name, inclusion: 'M', contents: 'Alphameric', position: 41..63 nacha_field :immediate_origin_name, inclusion: 'M', contents: 'Alphameric', position: 64..86 nacha_field :reference_code, inclusion: 'M', contents: 'Alphameric', position: 87..94 end |
#file_creation_date ⇒ String
Returns The date the file was created, in YYMMDD format.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/nacha/record/file_header.rb', line 36 class FileHeader < Nacha::Record::Base include FileHeaderRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C1', position: 1..1 nacha_field :priority_code, inclusion: 'R', contents: 'Numeric', position: 2..3 nacha_field :immediate_destination, inclusion: 'M', contents: 'bTTTTAAAAC', position: 4..13 nacha_field :immediate_origin, inclusion: 'M', contents: 'bTTTTAAAAC', position: 14..23 nacha_field :file_creation_date, inclusion: 'M', contents: 'YYMMDD', position: 24..29 nacha_field :file_creation_time, inclusion: 'M', contents: 'HHMM', position: 30..33 nacha_field :file_id_modifier, inclusion: 'M', contents: 'A-Z0-9', position: 34..34 nacha_field :record_size, inclusion: 'M', contents: 'C094', position: 35..37 nacha_field :blocking_factor, inclusion: 'M', contents: 'C10', position: 38..39 nacha_field :format_code, inclusion: 'M', contents: 'C1', position: 40..40 nacha_field :immediate_destination_name, inclusion: 'M', contents: 'Alphameric', position: 41..63 nacha_field :immediate_origin_name, inclusion: 'M', contents: 'Alphameric', position: 64..86 nacha_field :reference_code, inclusion: 'M', contents: 'Alphameric', position: 87..94 end |
#file_creation_time ⇒ String
Returns The time the file was created, in HHMM format.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/nacha/record/file_header.rb', line 36 class FileHeader < Nacha::Record::Base include FileHeaderRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C1', position: 1..1 nacha_field :priority_code, inclusion: 'R', contents: 'Numeric', position: 2..3 nacha_field :immediate_destination, inclusion: 'M', contents: 'bTTTTAAAAC', position: 4..13 nacha_field :immediate_origin, inclusion: 'M', contents: 'bTTTTAAAAC', position: 14..23 nacha_field :file_creation_date, inclusion: 'M', contents: 'YYMMDD', position: 24..29 nacha_field :file_creation_time, inclusion: 'M', contents: 'HHMM', position: 30..33 nacha_field :file_id_modifier, inclusion: 'M', contents: 'A-Z0-9', position: 34..34 nacha_field :record_size, inclusion: 'M', contents: 'C094', position: 35..37 nacha_field :blocking_factor, inclusion: 'M', contents: 'C10', position: 38..39 nacha_field :format_code, inclusion: 'M', contents: 'C1', position: 40..40 nacha_field :immediate_destination_name, inclusion: 'M', contents: 'Alphameric', position: 41..63 nacha_field :immediate_origin_name, inclusion: 'M', contents: 'Alphameric', position: 64..86 nacha_field :reference_code, inclusion: 'M', contents: 'Alphameric', position: 87..94 end |
#file_id_modifier ⇒ String
Returns A character used to distinguish between multiple files created on the same day.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/nacha/record/file_header.rb', line 36 class FileHeader < Nacha::Record::Base include FileHeaderRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C1', position: 1..1 nacha_field :priority_code, inclusion: 'R', contents: 'Numeric', position: 2..3 nacha_field :immediate_destination, inclusion: 'M', contents: 'bTTTTAAAAC', position: 4..13 nacha_field :immediate_origin, inclusion: 'M', contents: 'bTTTTAAAAC', position: 14..23 nacha_field :file_creation_date, inclusion: 'M', contents: 'YYMMDD', position: 24..29 nacha_field :file_creation_time, inclusion: 'M', contents: 'HHMM', position: 30..33 nacha_field :file_id_modifier, inclusion: 'M', contents: 'A-Z0-9', position: 34..34 nacha_field :record_size, inclusion: 'M', contents: 'C094', position: 35..37 nacha_field :blocking_factor, inclusion: 'M', contents: 'C10', position: 38..39 nacha_field :format_code, inclusion: 'M', contents: 'C1', position: 40..40 nacha_field :immediate_destination_name, inclusion: 'M', contents: 'Alphameric', position: 41..63 nacha_field :immediate_origin_name, inclusion: 'M', contents: 'Alphameric', position: 64..86 nacha_field :reference_code, inclusion: 'M', contents: 'Alphameric', position: 87..94 end |
#format_code ⇒ String
Returns Indicates the version of the Nacha file format, typically ‘1’.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/nacha/record/file_header.rb', line 36 class FileHeader < Nacha::Record::Base include FileHeaderRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C1', position: 1..1 nacha_field :priority_code, inclusion: 'R', contents: 'Numeric', position: 2..3 nacha_field :immediate_destination, inclusion: 'M', contents: 'bTTTTAAAAC', position: 4..13 nacha_field :immediate_origin, inclusion: 'M', contents: 'bTTTTAAAAC', position: 14..23 nacha_field :file_creation_date, inclusion: 'M', contents: 'YYMMDD', position: 24..29 nacha_field :file_creation_time, inclusion: 'M', contents: 'HHMM', position: 30..33 nacha_field :file_id_modifier, inclusion: 'M', contents: 'A-Z0-9', position: 34..34 nacha_field :record_size, inclusion: 'M', contents: 'C094', position: 35..37 nacha_field :blocking_factor, inclusion: 'M', contents: 'C10', position: 38..39 nacha_field :format_code, inclusion: 'M', contents: 'C1', position: 40..40 nacha_field :immediate_destination_name, inclusion: 'M', contents: 'Alphameric', position: 41..63 nacha_field :immediate_origin_name, inclusion: 'M', contents: 'Alphameric', position: 64..86 nacha_field :reference_code, inclusion: 'M', contents: 'Alphameric', position: 87..94 end |
#immediate_destination ⇒ Nacha::AbaNumber
Returns The routing number of the ACH Operator or receiving point to which the file is sent.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/nacha/record/file_header.rb', line 36 class FileHeader < Nacha::Record::Base include FileHeaderRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C1', position: 1..1 nacha_field :priority_code, inclusion: 'R', contents: 'Numeric', position: 2..3 nacha_field :immediate_destination, inclusion: 'M', contents: 'bTTTTAAAAC', position: 4..13 nacha_field :immediate_origin, inclusion: 'M', contents: 'bTTTTAAAAC', position: 14..23 nacha_field :file_creation_date, inclusion: 'M', contents: 'YYMMDD', position: 24..29 nacha_field :file_creation_time, inclusion: 'M', contents: 'HHMM', position: 30..33 nacha_field :file_id_modifier, inclusion: 'M', contents: 'A-Z0-9', position: 34..34 nacha_field :record_size, inclusion: 'M', contents: 'C094', position: 35..37 nacha_field :blocking_factor, inclusion: 'M', contents: 'C10', position: 38..39 nacha_field :format_code, inclusion: 'M', contents: 'C1', position: 40..40 nacha_field :immediate_destination_name, inclusion: 'M', contents: 'Alphameric', position: 41..63 nacha_field :immediate_origin_name, inclusion: 'M', contents: 'Alphameric', position: 64..86 nacha_field :reference_code, inclusion: 'M', contents: 'Alphameric', position: 87..94 end |
#immediate_destination_name ⇒ String
Returns The name of the ACH Operator or receiving point.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/nacha/record/file_header.rb', line 36 class FileHeader < Nacha::Record::Base include FileHeaderRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C1', position: 1..1 nacha_field :priority_code, inclusion: 'R', contents: 'Numeric', position: 2..3 nacha_field :immediate_destination, inclusion: 'M', contents: 'bTTTTAAAAC', position: 4..13 nacha_field :immediate_origin, inclusion: 'M', contents: 'bTTTTAAAAC', position: 14..23 nacha_field :file_creation_date, inclusion: 'M', contents: 'YYMMDD', position: 24..29 nacha_field :file_creation_time, inclusion: 'M', contents: 'HHMM', position: 30..33 nacha_field :file_id_modifier, inclusion: 'M', contents: 'A-Z0-9', position: 34..34 nacha_field :record_size, inclusion: 'M', contents: 'C094', position: 35..37 nacha_field :blocking_factor, inclusion: 'M', contents: 'C10', position: 38..39 nacha_field :format_code, inclusion: 'M', contents: 'C1', position: 40..40 nacha_field :immediate_destination_name, inclusion: 'M', contents: 'Alphameric', position: 41..63 nacha_field :immediate_origin_name, inclusion: 'M', contents: 'Alphameric', position: 64..86 nacha_field :reference_code, inclusion: 'M', contents: 'Alphameric', position: 87..94 end |
#immediate_origin ⇒ Nacha::AbaNumber
Returns The routing number of the ODFI or sending point that created the file.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/nacha/record/file_header.rb', line 36 class FileHeader < Nacha::Record::Base include FileHeaderRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C1', position: 1..1 nacha_field :priority_code, inclusion: 'R', contents: 'Numeric', position: 2..3 nacha_field :immediate_destination, inclusion: 'M', contents: 'bTTTTAAAAC', position: 4..13 nacha_field :immediate_origin, inclusion: 'M', contents: 'bTTTTAAAAC', position: 14..23 nacha_field :file_creation_date, inclusion: 'M', contents: 'YYMMDD', position: 24..29 nacha_field :file_creation_time, inclusion: 'M', contents: 'HHMM', position: 30..33 nacha_field :file_id_modifier, inclusion: 'M', contents: 'A-Z0-9', position: 34..34 nacha_field :record_size, inclusion: 'M', contents: 'C094', position: 35..37 nacha_field :blocking_factor, inclusion: 'M', contents: 'C10', position: 38..39 nacha_field :format_code, inclusion: 'M', contents: 'C1', position: 40..40 nacha_field :immediate_destination_name, inclusion: 'M', contents: 'Alphameric', position: 41..63 nacha_field :immediate_origin_name, inclusion: 'M', contents: 'Alphameric', position: 64..86 nacha_field :reference_code, inclusion: 'M', contents: 'Alphameric', position: 87..94 end |
#immediate_origin_name ⇒ String
Returns The name of the ODFI or sending point.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/nacha/record/file_header.rb', line 36 class FileHeader < Nacha::Record::Base include FileHeaderRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C1', position: 1..1 nacha_field :priority_code, inclusion: 'R', contents: 'Numeric', position: 2..3 nacha_field :immediate_destination, inclusion: 'M', contents: 'bTTTTAAAAC', position: 4..13 nacha_field :immediate_origin, inclusion: 'M', contents: 'bTTTTAAAAC', position: 14..23 nacha_field :file_creation_date, inclusion: 'M', contents: 'YYMMDD', position: 24..29 nacha_field :file_creation_time, inclusion: 'M', contents: 'HHMM', position: 30..33 nacha_field :file_id_modifier, inclusion: 'M', contents: 'A-Z0-9', position: 34..34 nacha_field :record_size, inclusion: 'M', contents: 'C094', position: 35..37 nacha_field :blocking_factor, inclusion: 'M', contents: 'C10', position: 38..39 nacha_field :format_code, inclusion: 'M', contents: 'C1', position: 40..40 nacha_field :immediate_destination_name, inclusion: 'M', contents: 'Alphameric', position: 41..63 nacha_field :immediate_origin_name, inclusion: 'M', contents: 'Alphameric', position: 64..86 nacha_field :reference_code, inclusion: 'M', contents: 'Alphameric', position: 87..94 end |
#priority_code ⇒ Nacha::Numeric
Returns A code assigned by the ODFI to indicate the processing priority of the file.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/nacha/record/file_header.rb', line 36 class FileHeader < Nacha::Record::Base include FileHeaderRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C1', position: 1..1 nacha_field :priority_code, inclusion: 'R', contents: 'Numeric', position: 2..3 nacha_field :immediate_destination, inclusion: 'M', contents: 'bTTTTAAAAC', position: 4..13 nacha_field :immediate_origin, inclusion: 'M', contents: 'bTTTTAAAAC', position: 14..23 nacha_field :file_creation_date, inclusion: 'M', contents: 'YYMMDD', position: 24..29 nacha_field :file_creation_time, inclusion: 'M', contents: 'HHMM', position: 30..33 nacha_field :file_id_modifier, inclusion: 'M', contents: 'A-Z0-9', position: 34..34 nacha_field :record_size, inclusion: 'M', contents: 'C094', position: 35..37 nacha_field :blocking_factor, inclusion: 'M', contents: 'C10', position: 38..39 nacha_field :format_code, inclusion: 'M', contents: 'C1', position: 40..40 nacha_field :immediate_destination_name, inclusion: 'M', contents: 'Alphameric', position: 41..63 nacha_field :immediate_origin_name, inclusion: 'M', contents: 'Alphameric', position: 64..86 nacha_field :reference_code, inclusion: 'M', contents: 'Alphameric', position: 87..94 end |
#record_size ⇒ String
Returns The fixed number of characters per record, which is always ‘094’.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/nacha/record/file_header.rb', line 36 class FileHeader < Nacha::Record::Base include FileHeaderRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C1', position: 1..1 nacha_field :priority_code, inclusion: 'R', contents: 'Numeric', position: 2..3 nacha_field :immediate_destination, inclusion: 'M', contents: 'bTTTTAAAAC', position: 4..13 nacha_field :immediate_origin, inclusion: 'M', contents: 'bTTTTAAAAC', position: 14..23 nacha_field :file_creation_date, inclusion: 'M', contents: 'YYMMDD', position: 24..29 nacha_field :file_creation_time, inclusion: 'M', contents: 'HHMM', position: 30..33 nacha_field :file_id_modifier, inclusion: 'M', contents: 'A-Z0-9', position: 34..34 nacha_field :record_size, inclusion: 'M', contents: 'C094', position: 35..37 nacha_field :blocking_factor, inclusion: 'M', contents: 'C10', position: 38..39 nacha_field :format_code, inclusion: 'M', contents: 'C1', position: 40..40 nacha_field :immediate_destination_name, inclusion: 'M', contents: 'Alphameric', position: 41..63 nacha_field :immediate_origin_name, inclusion: 'M', contents: 'Alphameric', position: 64..86 nacha_field :reference_code, inclusion: 'M', contents: 'Alphameric', position: 87..94 end |
#record_type_code ⇒ String
Returns Identifies the record as a File Header record with a constant value of ‘1’.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/nacha/record/file_header.rb', line 36 class FileHeader < Nacha::Record::Base include FileHeaderRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C1', position: 1..1 nacha_field :priority_code, inclusion: 'R', contents: 'Numeric', position: 2..3 nacha_field :immediate_destination, inclusion: 'M', contents: 'bTTTTAAAAC', position: 4..13 nacha_field :immediate_origin, inclusion: 'M', contents: 'bTTTTAAAAC', position: 14..23 nacha_field :file_creation_date, inclusion: 'M', contents: 'YYMMDD', position: 24..29 nacha_field :file_creation_time, inclusion: 'M', contents: 'HHMM', position: 30..33 nacha_field :file_id_modifier, inclusion: 'M', contents: 'A-Z0-9', position: 34..34 nacha_field :record_size, inclusion: 'M', contents: 'C094', position: 35..37 nacha_field :blocking_factor, inclusion: 'M', contents: 'C10', position: 38..39 nacha_field :format_code, inclusion: 'M', contents: 'C1', position: 40..40 nacha_field :immediate_destination_name, inclusion: 'M', contents: 'Alphameric', position: 41..63 nacha_field :immediate_origin_name, inclusion: 'M', contents: 'Alphameric', position: 64..86 nacha_field :reference_code, inclusion: 'M', contents: 'Alphameric', position: 87..94 end |
#reference_code ⇒ String
Returns An optional code for the ODFI’s use.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/nacha/record/file_header.rb', line 36 class FileHeader < Nacha::Record::Base include FileHeaderRecordType nacha_field :record_type_code, inclusion: 'M', contents: 'C1', position: 1..1 nacha_field :priority_code, inclusion: 'R', contents: 'Numeric', position: 2..3 nacha_field :immediate_destination, inclusion: 'M', contents: 'bTTTTAAAAC', position: 4..13 nacha_field :immediate_origin, inclusion: 'M', contents: 'bTTTTAAAAC', position: 14..23 nacha_field :file_creation_date, inclusion: 'M', contents: 'YYMMDD', position: 24..29 nacha_field :file_creation_time, inclusion: 'M', contents: 'HHMM', position: 30..33 nacha_field :file_id_modifier, inclusion: 'M', contents: 'A-Z0-9', position: 34..34 nacha_field :record_size, inclusion: 'M', contents: 'C094', position: 35..37 nacha_field :blocking_factor, inclusion: 'M', contents: 'C10', position: 38..39 nacha_field :format_code, inclusion: 'M', contents: 'C1', position: 40..40 nacha_field :immediate_destination_name, inclusion: 'M', contents: 'Alphameric', position: 41..63 nacha_field :immediate_origin_name, inclusion: 'M', contents: 'Alphameric', position: 64..86 nacha_field :reference_code, inclusion: 'M', contents: 'Alphameric', position: 87..94 end |