nacha 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -2
  3. data/.ruby-version +1 -1
  4. data/CHANGELOG.md +17 -0
  5. data/exe/nacha +51 -20
  6. data/lib/nacha/aba_number.rb +17 -14
  7. data/lib/nacha/ach_date.rb +15 -8
  8. data/lib/nacha/field.rb +69 -58
  9. data/lib/nacha/has_errors.rb +12 -8
  10. data/lib/nacha/numeric.rb +13 -10
  11. data/lib/nacha/parser.rb +22 -27
  12. data/lib/nacha/parser_context.rb +4 -9
  13. data/lib/nacha/record/ack_entry_detail.rb +15 -8
  14. data/lib/nacha/record/adv_batch_control.rb +12 -7
  15. data/lib/nacha/record/adv_entry_detail.rb +3 -2
  16. data/lib/nacha/record/adv_file_control.rb +9 -5
  17. data/lib/nacha/record/adv_file_header.rb +11 -6
  18. data/lib/nacha/record/arc_entry_detail.rb +2 -2
  19. data/lib/nacha/record/base.rb +121 -106
  20. data/lib/nacha/record/batch_control.rb +13 -7
  21. data/lib/nacha/record/batch_header.rb +20 -11
  22. data/lib/nacha/record/batch_header_record_type.rb +1 -1
  23. data/lib/nacha/record/boc_entry_detail.rb +3 -2
  24. data/lib/nacha/record/ccd_addenda.rb +2 -2
  25. data/lib/nacha/record/ccd_entry_detail.rb +3 -2
  26. data/lib/nacha/record/cie_addenda.rb +2 -2
  27. data/lib/nacha/record/cie_entry_detail.rb +5 -3
  28. data/lib/nacha/record/ctx_addenda.rb +2 -2
  29. data/lib/nacha/record/ctx_corporate_entry_detail.rb +2 -2
  30. data/lib/nacha/record/dne_addenda.rb +2 -2
  31. data/lib/nacha/record/dne_entry_detail.rb +6 -4
  32. data/lib/nacha/record/enr_addenda.rb +3 -2
  33. data/lib/nacha/record/enr_entry_detail.rb +4 -3
  34. data/lib/nacha/record/fifth_iat_addenda.rb +8 -4
  35. data/lib/nacha/record/file_control.rb +9 -5
  36. data/lib/nacha/record/file_control_record_type.rb +1 -1
  37. data/lib/nacha/record/file_header.rb +12 -8
  38. data/lib/nacha/record/file_header_record_type.rb +1 -1
  39. data/lib/nacha/record/filler.rb +3 -3
  40. data/lib/nacha/record/filler_record_type.rb +3 -1
  41. data/lib/nacha/record/first_iat_addenda.rb +3 -2
  42. data/lib/nacha/record/fourth_iat_addenda.rb +7 -4
  43. data/lib/nacha/record/iat_batch_header.rb +5 -3
  44. data/lib/nacha/record/iat_entry_detail.rb +7 -4
  45. data/lib/nacha/record/iat_foreign_coorespondent_bank_information_addenda.rb +10 -6
  46. data/lib/nacha/record/iat_remittance_information_addenda.rb +3 -2
  47. data/lib/nacha/record/mte_addenda.rb +4 -3
  48. data/lib/nacha/record/mte_entry_detail.rb +5 -3
  49. data/lib/nacha/record/pop_entry_detail.rb +3 -2
  50. data/lib/nacha/record/pos_addenda.rb +6 -3
  51. data/lib/nacha/record/pos_entry_detail.rb +5 -3
  52. data/lib/nacha/record/ppd_addenda.rb +3 -2
  53. data/lib/nacha/record/ppd_entry_detail.rb +5 -3
  54. data/lib/nacha/record/rck_entry_detail.rb +3 -2
  55. data/lib/nacha/record/second_iat_addenda.rb +3 -2
  56. data/lib/nacha/record/seventh_iat_addenda.rb +3 -2
  57. data/lib/nacha/record/shr_addenda.rb +5 -3
  58. data/lib/nacha/record/shr_entry_detail.rb +3 -2
  59. data/lib/nacha/record/sixth_iat_addenda.rb +5 -3
  60. data/lib/nacha/record/tel_entry_detail.rb +5 -3
  61. data/lib/nacha/record/third_iat_addenda.rb +3 -2
  62. data/lib/nacha/record/trc_entry_detail.rb +3 -2
  63. data/lib/nacha/record/trx_addenda.rb +3 -2
  64. data/lib/nacha/record/trx_entry_detail.rb +5 -3
  65. data/lib/nacha/record/validations/field_validations.rb +26 -14
  66. data/lib/nacha/record/validations/record_validations.rb +2 -1
  67. data/lib/nacha/record/web_addenda.rb +3 -2
  68. data/lib/nacha/record/web_entry_detail.rb +5 -3
  69. data/lib/nacha/record/xck_entry_detail.rb +3 -2
  70. data/lib/nacha/version.rb +4 -1
  71. data/lib/nacha.rb +21 -14
  72. data/nacha.gemspec +13 -16
  73. metadata +22 -8
@@ -1,13 +1,14 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/detail_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/detail_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
9
  class BocEntryDetail < Nacha::Record::Base
10
10
  include DetailRecordType
11
+
11
12
  nacha_field :record_type_code, inclusion: 'M', contents: 'C6', position: 1..1
12
13
  nacha_field :transaction_code, inclusion: 'M', contents: 'Numeric', position: 2..3
13
14
  nacha_field :receiving_dfi_identification, inclusion: 'M', contents: 'TTTTAAAAC', position: 4..12
@@ -1,8 +1,8 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/addenda_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/addenda_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
@@ -1,13 +1,14 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/detail_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/detail_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
9
  class CcdEntryDetail < Nacha::Record::Base
10
10
  include DetailRecordType
11
+
11
12
  nacha_field :record_type_code, inclusion: 'M', contents: 'C6', position: 1..1
12
13
  nacha_field :transaction_code, inclusion: 'M', contents: 'Numeric', position: 2..3
13
14
  nacha_field :receiving_dfi_identification, inclusion: 'M', contents: 'TTTTAAAAC', position: 4..12
@@ -1,8 +1,8 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/addenda_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/addenda_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
@@ -1,20 +1,22 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/detail_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/detail_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
9
  class CieEntryDetail < Nacha::Record::Base
10
10
  include DetailRecordType
11
+
11
12
  nacha_field :record_type_code, inclusion: 'M', contents: 'C6', position: 1..1
12
13
  nacha_field :transaction_code, inclusion: 'M', contents: 'Numeric', position: 2..3
13
14
  nacha_field :receiving_dfi_identification, inclusion: 'M', contents: 'TTTTAAAAC', position: 4..12
14
15
  nacha_field :dfi_account_number, inclusion: 'R', contents: 'Alphameric', position: 13..29
15
16
  nacha_field :amount, inclusion: 'M', contents: '$$$$$$$$¢¢', position: 30..39
16
17
  nacha_field :individual_name, inclusion: 'R', contents: 'Alphameric', position: 40..54
17
- nacha_field :individual_identification_number, inclusion: 'M', contents: 'Alphameric', position: 55..76
18
+ nacha_field :individual_identification_number, inclusion: 'M', contents: 'Alphameric',
19
+ position: 55..76
18
20
  nacha_field :discretionary_data, inclusion: 'O', contents: 'Alphameric', position: 77..78
19
21
  nacha_field :addenda_record_indicator, inclusion: 'M', contents: 'Numeric', position: 79..79
20
22
  nacha_field :trace_number, inclusion: 'M', contents: 'Numeric', position: 80..94
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'nacha/record/base.rb'
4
- require 'nacha/record/addenda_record_type.rb'
3
+ require 'nacha/record/base'
4
+ require 'nacha/record/addenda_record_type'
5
5
  module Nacha
6
6
  module Record
7
7
  class CtxAddenda < Nacha::Record::Base
@@ -1,8 +1,8 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/detail_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/detail_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
@@ -1,8 +1,8 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/addenda_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/addenda_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
@@ -1,20 +1,22 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/detail_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/detail_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
+ # Represents a Death Notification Entry (DNE) detail record.
9
10
  class DneEntryDetail < Nacha::Record::Base
10
11
  include DetailRecordType
11
12
 
12
13
  nacha_field :record_type_code, inclusion: 'M', contents: 'C6', position: 1..1
13
14
  nacha_field :transaction_code, inclusion: 'M', contents: 'Numeric', position: 2..3
14
15
  nacha_field :receiving_dfi_identification, inclusion: 'M', contents: 'TTTTAAAAC', position: 4..12
15
- nacha_field :receiving_dfi_identification, inclusion: 'M', contents: 'Alphameric', position: 13..29
16
+ nacha_field :dfi_account_number, inclusion: 'M', contents: 'Alphameric', position: 13..29
16
17
  nacha_field :amount, inclusion: 'M', contents: '$$$$$$$$¢¢', position: 30..39
17
- nacha_field :individual_identification_number, inclusion: 'O', contents: 'Alphameric', position: 40..54
18
+ nacha_field :individual_identification_number, inclusion: 'O', contents: 'Alphameric',
19
+ position: 40..54
18
20
  nacha_field :individual_name, inclusion: 'R', contents: 'Alphameric', position: 55..76
19
21
  nacha_field :discretionary_data, inclusion: 'O', contents: 'Alphameric', position: 77..78
20
22
  nacha_field :addenda_record_indicator, inclusion: 'M', contents: 'Numeric', position: 79..79
@@ -1,11 +1,12 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/addenda_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/addenda_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
+ # Represents an Automated Enrollment Entry (ENR) addenda record.
9
10
  class EnrAddenda < Nacha::Record::Base
10
11
  include AddendaRecordType
11
12
 
@@ -1,18 +1,19 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/detail_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/detail_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
+ # Represents an Automated Enrollment Entry (ENR) detail record.
9
10
  class EnrEntryDetail < Nacha::Record::Base
10
11
  include DetailRecordType
11
12
 
12
13
  nacha_field :record_type_code, inclusion: 'M', contents: 'C6', position: 1..1
13
14
  nacha_field :transaction_code, inclusion: 'M', contents: 'Numeric', position: 2..3
14
15
  nacha_field :receiving_dfi_identification, inclusion: 'M', contents: 'TTTTAAAAC', position: 4..12
15
- nacha_field :receiving_dfi_identification, inclusion: 'M', contents: 'Alphameric', position: 13..29
16
+ nacha_field :dfi_account_number, inclusion: 'M', contents: 'Alphameric', position: 13..29
16
17
  nacha_field :amount, inclusion: 'M', contents: '$$$$$$$$¢¢', position: 30..39
17
18
  nacha_field :identification_number, inclusion: 'O', contents: 'Alphameric', position: 40..54
18
19
  nacha_field :number_of_addenda_records, inclusion: 'M', contents: 'Alphameric', position: 55..58
@@ -1,17 +1,21 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'nacha/record/base.rb'
4
- require 'nacha/record/addenda_record_type.rb'
3
+ require 'nacha/record/base'
4
+ require 'nacha/record/addenda_record_type'
5
5
  module Nacha
6
6
  module Record
7
+ # Represents a fifth IAT addenda record
7
8
  class FifthIatAddenda < Nacha::Record::Base
8
9
  include AddendaRecordType
10
+
9
11
  nacha_field :record_type_code, inclusion: 'M', contents: 'C7', position: 1..1
10
12
  nacha_field :addenda_type_code, inclusion: 'M', contents: 'C14', position: 2..3
11
13
  nacha_field :receiving_dfi_name, inclusion: 'M', contents: 'Alphameric', position: 4..38
12
- nacha_field :receiving_dfi_identification_number_qualifier, inclusion: 'M', contents: 'Alphameric', position: 39..40
14
+ nacha_field :receiving_dfi_identification_number_qualifier, inclusion: 'M', contents: 'Alphameric',
15
+ position: 39..40
13
16
  nacha_field :receiving_dfi_identification, inclusion: 'M', contents: 'Alphameric', position: 41..74
14
- nacha_field :receiving_dfi_branch_country_code, inclusion: 'M', contents: 'Alphameric', position: 75..77
17
+ nacha_field :receiving_dfi_branch_country_code, inclusion: 'M', contents: 'Alphameric',
18
+ position: 75..77
15
19
  nacha_field :reserved, inclusion: 'M', contents: 'C ', position: 78..87
16
20
  nacha_field :entry_detail_sequence_number, inclusion: 'M', contents: 'Numeric', position: 88..94
17
21
  end
@@ -1,21 +1,25 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/file_control_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/file_control_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
9
  class FileControl < Nacha::Record::Base
10
10
  include FileControlRecordType
11
+
11
12
  nacha_field :record_type_code, inclusion: 'M', contents: 'C9', position: 1..1
12
13
  nacha_field :batch_count, inclusion: 'M', contents: 'Numeric', position: 2..7
13
14
  nacha_field :block_count, inclusion: 'M', contents: 'Numeric', position: 8..13
14
15
  nacha_field :entry_addenda_count, inclusion: 'M', contents: 'Numeric', position: 14..21
15
16
  nacha_field :entry_hash, inclusion: 'M', contents: 'Numeric', position: 22..31
16
- nacha_field :total_debit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 32..43
17
- nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢', position: 44..55
18
- nacha_field :reserved, inclusion: 'M', contents: 'C ', position: 56..94
17
+ nacha_field :total_debit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢',
18
+ position: 32..43
19
+ nacha_field :total_credit_entry_dollar_amount_in_file, inclusion: 'M', contents: '$$$$$$$$$$¢¢',
20
+ position: 44..55
21
+ nacha_field :reserved, inclusion: 'M', contents: 'C ',
22
+ position: 56..94
19
23
  end
20
24
  end
21
25
  end
@@ -10,7 +10,7 @@ module Nacha
10
10
  module ClassMethods
11
11
  def child_record_types
12
12
  [
13
- "Nacha::Record::Filler",
13
+ "Nacha::Record::Filler"
14
14
  ]
15
15
  end
16
16
  end
@@ -1,27 +1,31 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'nacha/record/base.rb'
4
- require 'nacha/record/file_header_record_type.rb'
3
+ require 'nacha/record/base'
4
+ require 'nacha/record/file_header_record_type'
5
5
 
6
6
  module Nacha
7
7
  module Record
8
-
9
8
  # The FileHeader record is the first record in a
10
9
  # Nacha file and contains information about the file itself.
11
10
  class FileHeader < Nacha::Record::Base
12
11
  include FileHeaderRecordType
12
+
13
13
  nacha_field :record_type_code, inclusion: 'M', contents: 'C1', position: 1..1
14
14
  nacha_field :priority_code, inclusion: 'R', contents: 'Numeric', position: 2..3
15
- nacha_field :immediate_destination, inclusion: 'M', contents: 'bTTTTAAAAC', position: 4..13
16
- nacha_field :immediate_origin, inclusion: 'M', contents: 'bTTTTAAAAC', position: 14..23
15
+ nacha_field :immediate_destination,
16
+ inclusion: 'M', contents: 'bTTTTAAAAC', position: 4..13
17
+ nacha_field :immediate_origin,
18
+ inclusion: 'M', contents: 'bTTTTAAAAC', position: 14..23
17
19
  nacha_field :file_creation_date, inclusion: 'M', contents: 'YYMMDD', position: 24..29
18
20
  nacha_field :file_creation_time, inclusion: 'M', contents: 'HHMM', position: 30..33
19
21
  nacha_field :file_id_modifier, inclusion: 'M', contents: 'A-Z0-9', position: 34..34
20
22
  nacha_field :record_size, inclusion: 'M', contents: 'C094', position: 35..37
21
23
  nacha_field :blocking_factor, inclusion: 'M', contents: 'C10', position: 38..39
22
- nacha_field :format_code, inclusion: 'M', contents: 'C1', position: 40..40
23
- nacha_field :immediate_destination_name, inclusion: 'M', contents: 'Alphameric', position: 41..63
24
- nacha_field :immediate_origin_name, inclusion: 'M', contents: 'Alphameric', position: 64..86
24
+ nacha_field :format_code, inclusion: 'M', contents: 'C1', position: 40..40
25
+ nacha_field :immediate_destination_name,
26
+ inclusion: 'M', contents: 'Alphameric', position: 41..63
27
+ nacha_field :immediate_origin_name,
28
+ inclusion: 'M', contents: 'Alphameric', position: 64..86
25
29
  nacha_field :reference_code, inclusion: 'M', contents: 'Alphameric', position: 87..94
26
30
  end
27
31
  end
@@ -11,7 +11,7 @@ module Nacha
11
11
  def child_record_types
12
12
  [
13
13
  'Nacha::Record::BatchHeader',
14
- 'Nacha::Record::FileControl',
14
+ 'Nacha::Record::FileControl'
15
15
  ]
16
16
  end
17
17
  end
@@ -1,8 +1,8 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/filler_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/filler_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
@@ -10,7 +10,7 @@ module Nacha
10
10
  include FillerRecordType
11
11
 
12
12
  nacha_field :record_type_code, inclusion: 'M', contents: 'C9', position: 1..1
13
- nacha_field :filler, inclusion: 'M', contents: ('C' + ('9' * 93)), position: 2..94
13
+ nacha_field :filler, inclusion: 'M', contents: "C#{'9' * 93}", position: 2..94
14
14
  end
15
15
  end
16
16
  end
@@ -9,7 +9,9 @@ module Nacha
9
9
 
10
10
  module ClassMethods
11
11
  def child_record_types
12
- []
12
+ [
13
+ "Nacha::Record::Filler"
14
+ ]
13
15
  end
14
16
  end
15
17
 
@@ -1,11 +1,12 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/addenda_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/addenda_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
+ # Represents a first IAT addenda record
9
10
  class FirstIatAddenda < Nacha::Record::Base
10
11
  include AddendaRecordType
11
12
 
@@ -1,20 +1,23 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/addenda_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/addenda_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
+ # Represents a fourth IAT addenda record
9
10
  class FourthIatAddenda < Nacha::Record::Base
10
11
  include AddendaRecordType
11
12
 
12
13
  nacha_field :record_type_code, inclusion: 'M', contents: 'C7', position: 1..1
13
14
  nacha_field :addenda_type_code, inclusion: 'M', contents: 'C13', position: 2..3
14
15
  nacha_field :originating_dfi_name, inclusion: 'M', contents: 'Alphameric', position: 4..38
15
- nacha_field :originating_dfi_identification_number_qualifier, inclusion: 'M', contents: 'Alphameric', position: 39..40
16
+ nacha_field :originating_dfi_identification_number_qualifier, inclusion: 'M', contents: 'Alphameric',
17
+ position: 39..40
16
18
  nacha_field :originating_dfi_identification, inclusion: 'M', contents: 'Alphameric', position: 41..74
17
- nacha_field :originating_dfi_branch_country_code, inclusion: 'M', contents: 'Alphameric', position: 75..77
19
+ nacha_field :originating_dfi_branch_country_code, inclusion: 'M', contents: 'Alphameric',
20
+ position: 75..77
18
21
  nacha_field :reserved, inclusion: 'M', contents: 'C ', position: 78..87
19
22
  nacha_field :entry_detail_sequence_number, inclusion: 'M', contents: 'Numeric', position: 88..94
20
23
  end
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'nacha/record/base.rb'
4
- require 'nacha/record/batch_header_record_type.rb'
3
+ require 'nacha/record/base'
4
+ require 'nacha/record/batch_header_record_type'
5
5
 
6
6
  module Nacha
7
7
  module Record
8
+ # Represents an IAT batch header record
8
9
  class IatBatchHeader < Nacha::Record::Base
9
10
  include BatchHeaderRecordType
10
11
 
@@ -12,7 +13,8 @@ module Nacha
12
13
  nacha_field :service_class_code, inclusion: 'M', contents: 'Numeric', position: 2..4
13
14
  nacha_field :iat_indicator, inclusion: 'O', contents: 'Alphameric', position: 5..20
14
15
  nacha_field :foreign_exchange_indicator, inclusion: 'M', contents: 'Alphameric', position: 21..22
15
- nacha_field :foreign_exchange_reference_indicator, inclusion: 'R', contents: 'Numeric', position: 23..23
16
+ nacha_field :foreign_exchange_reference_indicator, inclusion: 'R', contents: 'Numeric',
17
+ position: 23..23
16
18
  nacha_field :foreign_exchange_reference, inclusion: 'R', contents: 'Alphameric', position: 24..38
17
19
  nacha_field :iso_destination_country_code, inclusion: 'M', contents: 'Alphameric', position: 39..40
18
20
  nacha_field :originator_identification, inclusion: 'M', contents: 'Alphameric', position: 41..50
@@ -1,11 +1,12 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/detail_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/detail_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
+ # Represents an IAT entry detail record
9
10
  class IatEntryDetail < Nacha::Record::Base
10
11
  include DetailRecordType
11
12
 
@@ -17,8 +18,10 @@ module Nacha
17
18
  nacha_field :amount, inclusion: 'M', contents: '$$$$$$$$¢¢', position: 30..39
18
19
  nacha_field :dfi_account_number, inclusion: 'M', contents: 'Numeric', position: 40..74
19
20
  nacha_field :reserved, inclusion: 'O', contents: 'C ', position: 75..76
20
- nacha_field :gateway_operator_ofac_screening_indicator, inclusion: 'O', contents: 'Alphameric', position: 77..77
21
- nacha_field :secondary_ofac_screening_indicator, inclusion: 'O', contents: 'Alphameric', position: 78..78
21
+ nacha_field :gateway_operator_ofac_screening_indicator, inclusion: 'O', contents: 'Alphameric',
22
+ position: 77..77
23
+ nacha_field :secondary_ofac_screening_indicator, inclusion: 'O', contents: 'Alphameric',
24
+ position: 78..78
22
25
  nacha_field :addenda_record_indicator, inclusion: 'M', contents: 'Numeric', position: 79..79
23
26
  nacha_field :trace_number, inclusion: 'M', contents: 'Numeric', position: 80..94
24
27
  end
@@ -1,20 +1,24 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/addenda_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/addenda_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
+ # Represents an IAT Foreign Correspondent Bank Information addenda record.
9
10
  class IatForeignCoorespondentBankInformationAddenda < Nacha::Record::Base
10
11
  include AddendaRecordType
11
12
 
12
13
  nacha_field :record_type_code, inclusion: 'M', contents: 'C7', position: 1..1
13
14
  nacha_field :addenda_type_code, inclusion: 'M', contents: 'C18', position: 2..3
14
- nacha_field :foreign_coorespondent_bank_name, inclusion: 'M', contents: 'Alphameric', position: 4..38
15
- nacha_field :foreign_coorespondent_bank_identification_number_qualifier, inclusion: 'M', contents: 'Alphameric', position: 39..40
16
- nacha_field :foreign_coorespondent_bank_identification_number, inclusion: 'M', contents: 'Alphameric', position: 41..74
17
- nacha_field :foreign_coorestpondent_bank_branch_country_code, inclusion: 'M', contents: 'Alphameric', position: 75..77
15
+ nacha_field :foreign_correspondent_bank_name, inclusion: 'M', contents: 'Alphameric', position: 4..38
16
+ nacha_field :foreign_correspondent_bank_identification_number_qualifier, inclusion: 'M',
17
+ contents: 'Alphameric', position: 39..40
18
+ nacha_field :foreign_correspondent_bank_identification_number, inclusion: 'M',
19
+ contents: 'Alphameric', position: 41..74
20
+ nacha_field :foreign_correspondent_bank_branch_country_code, inclusion: 'M', contents: 'Alphameric',
21
+ position: 75..77
18
22
  nacha_field :reserved, inclusion: 'M', contents: 'C ', position: 78..83
19
23
  nacha_field :addenda_sequence_number, inclusion: 'M', contents: 'Numeric', position: 84..87
20
24
  nacha_field :entry_detail_sequence_number, inclusion: 'M', contents: 'Numeric', position: 88..94
@@ -1,11 +1,12 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/addenda_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/addenda_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
+ # Represents an IAT Remittance Information addenda record.
9
10
  class IatRemittanceInformationAddenda < Nacha::Record::Base
10
11
  include AddendaRecordType
11
12
 
@@ -1,15 +1,16 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/addenda_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/addenda_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
+ # Represents a Machine Transfer Entry (MTE) addenda record.
9
10
  class MteAddenda < Nacha::Record::Base
10
11
  include AddendaRecordType
11
12
 
12
- nacha_field :record_type_code, inclusion: 'M', contents: 'C6', position: 1..1
13
+ nacha_field :record_type_code, inclusion: 'M', contents: 'C7', position: 1..1
13
14
  nacha_field :addenda_type_code, inclusion: 'M', contents: 'C02', position: 2..3
14
15
  nacha_field :transaction_description, inclusion: 'R', contents: 'Alphameric', position: 4..10
15
16
  nacha_field :network_identification_code, inclusion: 'O', contents: 'Alphameric', position: 11..13
@@ -1,11 +1,12 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/detail_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/detail_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
+ # Represents a Machine Transfer Entry (MTE) detail record.
9
10
  class MteEntryDetail < Nacha::Record::Base
10
11
  include DetailRecordType
11
12
 
@@ -15,7 +16,8 @@ module Nacha
15
16
  nacha_field :dfi_account_number, inclusion: 'R', contents: 'Alphameric', position: 13..29
16
17
  nacha_field :amount, inclusion: 'M', contents: '$$$$$$$$¢¢', position: 30..39
17
18
  nacha_field :individual_name, inclusion: 'M', contents: 'Alphameric', position: 40..54
18
- nacha_field :individual_identification_number, inclusion: 'M', contents: 'Alphameric', position: 55..76
19
+ nacha_field :individual_identification_number, inclusion: 'M', contents: 'Alphameric',
20
+ position: 55..76
19
21
  nacha_field :discretionary_data, inclusion: 'O', contents: 'Alphameric', position: 77..78
20
22
  nacha_field :addenda_record_indicator, inclusion: 'M', contents: 'Numeric', position: 79..79
21
23
  nacha_field :trace_number, inclusion: 'M', contents: 'Numeric', position: 80..94
@@ -1,11 +1,12 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/detail_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/detail_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
+ # Represents a Point-of-Purchase (POP) entry detail record.
9
10
  class PopEntryDetail < Nacha::Record::Base
10
11
  include DetailRecordType
11
12
 
@@ -1,13 +1,15 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/addenda_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/addenda_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
+ # Represents a Point-of-Sale (POS) addenda record.
9
10
  class PosAddenda < Nacha::Record::Base
10
11
  include AddendaRecordType
12
+
11
13
  nacha_field :record_type_code, inclusion: 'M', contents: 'C7', position: 1..1
12
14
  nacha_field :addenda_type_code, inclusion: 'M', contents: 'C02', position: 2..3
13
15
  nacha_field :reference_information_1, inclusion: 'O', contents: 'Alphameric', position: 4..10
@@ -15,7 +17,8 @@ module Nacha
15
17
  nacha_field :terminal_identification_code, inclusion: 'R', contents: 'Alphameric', position: 14..19
16
18
  nacha_field :transaction_serial_number, inclusion: 'R', contents: 'Alphameric', position: 20..25
17
19
  nacha_field :transaction_date, inclusion: 'O', contents: 'Alphameric', position: 26..29
18
- nacha_field :authorization_code_or_card_expiration_date, inclusion: 'O', contents: 'Alphameric', position: 30..35
20
+ nacha_field :authorization_code_or_card_expiration_date, inclusion: 'O', contents: 'Alphameric',
21
+ position: 30..35
19
22
  nacha_field :terminal_location, inclusion: 'R', contents: 'Alphameric', position: 36..62
20
23
  nacha_field :terminal_city, inclusion: 'R', contents: 'Alphameric', position: 63..77
21
24
  nacha_field :terminal_state, inclusion: 'M', contents: 'Numeric', position: 78..79
@@ -1,11 +1,12 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/detail_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/detail_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
+ # Represents a Point-of-Sale (POS) entry detail record.
9
10
  class PosEntryDetail < Nacha::Record::Base
10
11
  include DetailRecordType
11
12
 
@@ -14,7 +15,8 @@ module Nacha
14
15
  nacha_field :receiving_dfi_identification, inclusion: 'M', contents: 'TTTTAAAAC', position: 4..12
15
16
  nacha_field :dfi_account_number, inclusion: 'R', contents: 'Alphameric', position: 13..29
16
17
  nacha_field :amount, inclusion: 'M', contents: '$$$$$$$$¢¢', position: 30..39
17
- nacha_field :individual_identification_number, inclusion: 'O', contents: 'Alphameric', position: 40..54
18
+ nacha_field :individual_identification_number, inclusion: 'O', contents: 'Alphameric',
19
+ position: 40..54
18
20
  nacha_field :individual_name, inclusion: 'R', contents: 'Alphameric', position: 55..76
19
21
  nacha_field :card_transaction_type_code, inclusion: 'M', contents: 'Alphameric', position: 77..78
20
22
  nacha_field :addenda_record_indicator, inclusion: 'M', contents: 'Numeric', position: 79..79
@@ -1,11 +1,12 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'nacha/record/base.rb'
5
- require 'nacha/record/addenda_record_type.rb'
4
+ require 'nacha/record/base'
5
+ require 'nacha/record/addenda_record_type'
6
6
 
7
7
  module Nacha
8
8
  module Record
9
+ # Represents a Prearranged Payment and Deposit (PPD) addenda record.
9
10
  class PpdAddenda < Nacha::Record::Base
10
11
  include AddendaRecordType
11
12