Class: Nacha::Record::AdvFileControl

Inherits:
Base
  • Object
show all
Includes:
FileControlRecordType
Defined in:
lib/nacha/record/adv_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 batch records in the file.

Returns:



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

Returns The total number of blocks in the file, where a block is 10 lines.

Returns:

  • (Nacha::Numeric)

    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_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/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_hashNacha::Numeric

Returns The sum of all Entry Hash fields from the Batch Control records in the file.

Returns:

  • (Nacha::Numeric)

    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_codeString

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

Returns:

  • (String)

    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

#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/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_fileNacha::Numeric

Returns The total value of all credit entries in the file.

Returns:

  • (Nacha::Numeric)

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

Returns The total value of all debit entries in the file, which is zero for ADV files.

Returns:

  • (Nacha::Numeric)

    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