ACHFile
: Handles parsing of the entire ACH file.Batch
: Handles parsing of each batch within the file.Record
: Base class for various types of records (File Header, Batch Header, Entry Detail, Addenda, Batch Control, File Control).
parse_file()
: Method insideACHFile
to initiate parsing.parse_batch()
: Method insideBatch
to parse a single batch.- Various
parse_record_xxx()
methods to parse individual record types.
- Read the ACH file line by line.
- For each line, identify the type of record and pass it to the appropriate parser.
- Each parser extracts the relevant fields and stores them in an object.
- Objects are collected in the appropriate parent object (batches in file, records in batches).
Does this sound good as a starting point?
Next steps could be to define the classes and their initial methods. Would you like to start by providing the fields per line and their character values? Then we can dive into the actual code.