Class: Nacha::Record::FileHeader

Inherits:
Base
  • Object
show all
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

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

included

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_factorString

Returns The number of records in a block, which is always ‘10’.

Returns:

  • (String)

    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_dateString

Returns The date the file was created, in YYMMDD format.

Returns:

  • (String)

    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_timeString

Returns The time the file was created, in HHMM format.

Returns:

  • (String)

    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_modifierString

Returns A character used to distinguish between multiple files created on the same day.

Returns:

  • (String)

    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_codeString

Returns Indicates the version of the Nacha file format, typically ‘1’.

Returns:

  • (String)

    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_destinationNacha::AbaNumber

Returns The routing number of the ACH Operator or receiving point to which the file is sent.

Returns:

  • (Nacha::AbaNumber)

    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_nameString

Returns The name of the ACH Operator or receiving point.

Returns:

  • (String)

    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_originNacha::AbaNumber

Returns The routing number of the ODFI or sending point that created the file.

Returns:

  • (Nacha::AbaNumber)

    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_nameString

Returns The name of the ODFI or sending point.

Returns:

  • (String)

    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_codeNacha::Numeric

Returns A code assigned by the ODFI to indicate the processing priority of the file.

Returns:

  • (Nacha::Numeric)

    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_sizeString

Returns The fixed number of characters per record, which is always ‘094’.

Returns:

  • (String)

    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_codeString

Returns Identifies the record as a File Header record with a constant value of ‘1’.

Returns:

  • (String)

    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_codeString

Returns An optional code for the ODFI’s use.

Returns:

  • (String)

    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