Class: Nacha::Record::FileControl

Inherits:
Base
  • Object
show all
Includes:
FileControlRecordType
Defined in:
lib/nacha/record/file_control.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#children, #fields, #line_number, #name, #original_input_line, #parent, #validations

Method Summary

Methods included from FileControlRecordType

#child_record_types, included

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

#batch_countNacha::Numeric

Returns The total number of batches in the file.

Returns:



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/nacha/record/file_control.rb', line 25

class FileControl < 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..43
  nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢',
    position: 44..55
  nacha_field :reserved, inclusion: 'M', contents: 'C                                       ',
    position: 56..94
end

#block_countNacha::Numeric

Returns The total number of physical blocks in the file.

Returns:

  • (Nacha::Numeric)

    The total number of physical blocks in the file.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/nacha/record/file_control.rb', line 25

class FileControl < 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..43
  nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢',
    position: 44..55
  nacha_field :reserved, inclusion: 'M', contents: 'C                                       ',
    position: 56..94
end

#entry_addenda_countNacha::Numeric

Returns The total number of entry detail and addenda records in the file.

Returns:

  • (Nacha::Numeric)

    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/file_control.rb', line 25

class FileControl < 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..43
  nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢',
    position: 44..55
  nacha_field :reserved, inclusion: 'M', contents: 'C                                       ',
    position: 56..94
end

#entry_hashNacha::Numeric

Returns A sum of the entry hash totals from all the batch control records in the file.

Returns:

  • (Nacha::Numeric)

    A sum of the entry hash totals from all 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/file_control.rb', line 25

class FileControl < 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..43
  nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢',
    position: 44..55
  nacha_field :reserved, inclusion: 'M', contents: 'C                                       ',
    position: 56..94
end

#record_type_codeString

Returns Identifies the record as a File Control record with a constant value of ‘9’.

Returns:

  • (String)

    Identifies the record as a 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/file_control.rb', line 25

class FileControl < 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..43
  nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢',
    position: 44..55
  nacha_field :reserved, inclusion: 'M', contents: 'C                                       ',
    position: 56..94
end

#reservedString

Returns A reserved field for future use.

Returns:

  • (String)

    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/file_control.rb', line 25

class FileControl < 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..43
  nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢',
    position: 44..55
  nacha_field :reserved, inclusion: 'M', contents: 'C                                       ',
    position: 56..94
end

#total_credit_entry_dollar_amount_in_fileNacha::Numeric

Returns The total dollar amount of all credit entries in the file.

Returns:

  • (Nacha::Numeric)

    The total dollar amount 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/file_control.rb', line 25

class FileControl < 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..43
  nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢',
    position: 44..55
  nacha_field :reserved, inclusion: 'M', contents: 'C                                       ',
    position: 56..94
end

#total_debit_entry_dollar_amount_in_fileNacha::Numeric

Returns The total dollar amount of all debit entries in the file.

Returns:

  • (Nacha::Numeric)

    The total dollar amount of all debit entries in the file.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/nacha/record/file_control.rb', line 25

class FileControl < 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..43
  nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢',
    position: 44..55
  nacha_field :reserved, inclusion: 'M', contents: 'C                                       ',
    position: 56..94
end