Documentation ¶
Overview ¶
Package ach reads and writes (ACH) Automated Clearing House files. ACH is the primary method of electronic money movement through the United States.
Index ¶
- Constants
- type Addenda05
- func (v *Addenda05) CalculateCheckDigit(routingNumber string) int
- func (addenda05 *Addenda05) EntryDetailSequenceNumberField() string
- func (addenda05 *Addenda05) Parse(record string)
- func (addenda05 *Addenda05) PaymentRelatedInformationField() string
- func (addenda05 *Addenda05) SequenceNumberField() string
- func (addenda05 *Addenda05) SetPaymentRelatedInformation(s string) *Addenda05
- func (addenda05 *Addenda05) String() string
- func (addenda05 *Addenda05) TypeCode() string
- func (addenda05 *Addenda05) Validate() error
- type Addenda98
- func (v *Addenda98) CalculateCheckDigit(routingNumber string) int
- func (addenda98 *Addenda98) CorrectedDataField() string
- func (addenda98 *Addenda98) OriginalDFIField() string
- func (addenda98 *Addenda98) OriginalTraceField() string
- func (addenda98 *Addenda98) Parse(record string)
- func (addenda98 *Addenda98) String() string
- func (addenda98 *Addenda98) TraceNumberField() string
- func (addenda98 *Addenda98) TypeCode() string
- func (addenda98 *Addenda98) Validate() error
- type Addenda99
- func (Addenda99 *Addenda99) AddendaInformationField() string
- func (v *Addenda99) CalculateCheckDigit(routingNumber string) int
- func (Addenda99 *Addenda99) DateOfDeathField() string
- func (Addenda99 *Addenda99) OriginalDFIField() string
- func (Addenda99 *Addenda99) OriginalTraceField() string
- func (Addenda99 *Addenda99) Parse(record string)
- func (Addenda99 *Addenda99) String() string
- func (Addenda99 *Addenda99) TraceNumberField() string
- func (Addenda99 *Addenda99) TypeCode() string
- func (Addenda99 *Addenda99) Validate() error
- type Addendumer
- type BatchCCD
- func (batch *BatchCCD) AddEntry(entry *EntryDetail)
- func (batch *BatchCCD) Category() string
- func (batch *BatchCCD) Create() error
- func (batch *BatchCCD) GetControl() *BatchControl
- func (batch *BatchCCD) GetEntries() []*EntryDetail
- func (batch *BatchCCD) GetHeader() *BatchHeader
- func (batch *BatchCCD) SetControl(batchControl *BatchControl)
- func (batch *BatchCCD) SetHeader(batchHeader *BatchHeader)
- func (batch *BatchCCD) Validate() error
- type BatchCOR
- func (batch *BatchCOR) AddEntry(entry *EntryDetail)
- func (batch *BatchCOR) Category() string
- func (batch *BatchCOR) Create() error
- func (batch *BatchCOR) GetControl() *BatchControl
- func (batch *BatchCOR) GetEntries() []*EntryDetail
- func (batch *BatchCOR) GetHeader() *BatchHeader
- func (batch *BatchCOR) SetControl(batchControl *BatchControl)
- func (batch *BatchCOR) SetHeader(batchHeader *BatchHeader)
- func (batch *BatchCOR) Validate() error
- type BatchControl
- func (bc *BatchControl) BatchNumberField() string
- func (v *BatchControl) CalculateCheckDigit(routingNumber string) int
- func (bc *BatchControl) CompanyIdentificationField() string
- func (bc *BatchControl) EntryAddendaCountField() string
- func (bc *BatchControl) EntryHashField() string
- func (bc *BatchControl) MessageAuthenticationCodeField() string
- func (bc *BatchControl) ODFIIdentificationField() string
- func (bc *BatchControl) Parse(record string)
- func (bc *BatchControl) String() string
- func (bc *BatchControl) TotalCreditEntryDollarAmountField() string
- func (bc *BatchControl) TotalDebitEntryDollarAmountField() string
- func (bc *BatchControl) Validate() error
- type BatchError
- type BatchHeader
- func (bh *BatchHeader) BatchNumberField() string
- func (v *BatchHeader) CalculateCheckDigit(routingNumber string) int
- func (bh *BatchHeader) CompanyDescriptiveDateField() string
- func (bh *BatchHeader) CompanyDiscretionaryDataField() string
- func (bh *BatchHeader) CompanyEntryDescriptionField() string
- func (bh *BatchHeader) CompanyIdentificationField() string
- func (bh *BatchHeader) CompanyNameField() string
- func (bh *BatchHeader) EffectiveEntryDateField() string
- func (bh *BatchHeader) ODFIIdentificationField() string
- func (bh *BatchHeader) Parse(record string)
- func (bh *BatchHeader) String() string
- func (bh *BatchHeader) Validate() error
- type BatchPPD
- func (batch *BatchPPD) AddEntry(entry *EntryDetail)
- func (batch *BatchPPD) Category() string
- func (batch *BatchPPD) Create() error
- func (batch *BatchPPD) GetControl() *BatchControl
- func (batch *BatchPPD) GetEntries() []*EntryDetail
- func (batch *BatchPPD) GetHeader() *BatchHeader
- func (batch *BatchPPD) SetControl(batchControl *BatchControl)
- func (batch *BatchPPD) SetHeader(batchHeader *BatchHeader)
- func (batch *BatchPPD) Validate() error
- type BatchTEL
- func (batch *BatchTEL) AddEntry(entry *EntryDetail)
- func (batch *BatchTEL) Category() string
- func (batch *BatchTEL) Create() error
- func (batch *BatchTEL) GetControl() *BatchControl
- func (batch *BatchTEL) GetEntries() []*EntryDetail
- func (batch *BatchTEL) GetHeader() *BatchHeader
- func (batch *BatchTEL) SetControl(batchControl *BatchControl)
- func (batch *BatchTEL) SetHeader(batchHeader *BatchHeader)
- func (batch *BatchTEL) Validate() error
- type BatchWEB
- func (batch *BatchWEB) AddEntry(entry *EntryDetail)
- func (batch *BatchWEB) Category() string
- func (batch *BatchWEB) Create() error
- func (batch *BatchWEB) GetControl() *BatchControl
- func (batch *BatchWEB) GetEntries() []*EntryDetail
- func (batch *BatchWEB) GetHeader() *BatchHeader
- func (batch *BatchWEB) SetControl(batchControl *BatchControl)
- func (batch *BatchWEB) SetHeader(batchHeader *BatchHeader)
- func (batch *BatchWEB) Validate() error
- type Batcher
- type EntryDetail
- func (ed *EntryDetail) AddAddenda(addenda Addendumer) []Addendumer
- func (ed *EntryDetail) AmountField() string
- func (v *EntryDetail) CalculateCheckDigit(routingNumber string) int
- func (ed *EntryDetail) CreditOrDebit() string
- func (ed *EntryDetail) DFIAccountNumberField() string
- func (ed *EntryDetail) DiscretionaryDataField() string
- func (ed *EntryDetail) IdentificationNumberField() string
- func (ed *EntryDetail) IndividualNameField() string
- func (ed *EntryDetail) Parse(record string)
- func (ed *EntryDetail) PaymentTypeField() string
- func (ed *EntryDetail) RDFIIdentificationField() string
- func (ed *EntryDetail) ReceivingCompanyField() string
- func (ed *EntryDetail) SetPaymentType(t string)
- func (ed *EntryDetail) SetRDFI(rdfi string) *EntryDetail
- func (ed *EntryDetail) SetReceivingCompany(s string)
- func (ed *EntryDetail) SetTraceNumber(ODFIIdentification string, seq int)
- func (ed *EntryDetail) String() string
- func (ed *EntryDetail) TraceNumberField() string
- func (ed *EntryDetail) Validate() error
- type FieldError
- type File
- type FileControl
- func (fc *FileControl) BatchCountField() string
- func (fc *FileControl) BlockCountField() string
- func (v *FileControl) CalculateCheckDigit(routingNumber string) int
- func (fc *FileControl) EntryAddendaCountField() string
- func (fc *FileControl) EntryHashField() string
- func (fc *FileControl) Parse(record string)
- func (fc *FileControl) String() string
- func (fc *FileControl) TotalCreditEntryDollarAmountInFileField() string
- func (fc *FileControl) TotalDebitEntryDollarAmountInFileField() string
- func (fc *FileControl) Validate() error
- type FileError
- type FileHeader
- func (v *FileHeader) CalculateCheckDigit(routingNumber string) int
- func (fh *FileHeader) FileCreationDateField() string
- func (fh *FileHeader) FileCreationTimeField() string
- func (fh *FileHeader) ImmediateDestinationField() string
- func (fh *FileHeader) ImmediateDestinationNameField() string
- func (fh *FileHeader) ImmediateOriginField() string
- func (fh *FileHeader) ImmediateOriginNameField() string
- func (fh *FileHeader) Parse(record string)
- func (fh *FileHeader) ReferenceCodeField() string
- func (fh *FileHeader) String() string
- func (fh *FileHeader) Validate() error
- type ParseError
- type Reader
- type Writer
Constants ¶
const ( CategoryForward = "Forward" CategoryReturn = "Return" CategoryNOC = "NOC" )
const (
// RecordLength character count of each line representing a letter in a file
RecordLength = 94
)
First position of all Record Types. These codes are uniquely assigned to the first byte of each row in a file.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addenda05 ¶ added in v0.2.0
type Addenda05 struct { // PaymentRelatedInformation PaymentRelatedInformation string // SequenceNumber is consecutively assigned to each Addenda05 Record following // an Entry Detail Record. The first addenda05 sequence number must always // be a "1". SequenceNumber int // EntryDetailSequenceNumber contains the ascending sequence number section of the Entry // Detail or Corporate Entry Detail Record's trace number This number is // the same as the last seven digits of the trace number of the related // Entry Detail Record or Corporate Entry Detail Record. EntryDetailSequenceNumber int // contains filtered or unexported fields }
func NewAddenda05 ¶ added in v0.2.0
func NewAddenda05() *Addenda05
func (*Addenda05) CalculateCheckDigit ¶ added in v0.2.0
CalculateCheckDigit returns a check digit for a routing number Multiply each digit in the Routing number by a weighting factor. The weighting factors for each digit are: Position: 1 2 3 4 5 6 7 8 Weights : 3 7 1 3 7 1 3 7 Add the results of the eight multiplications Subtract the sum from the next highest multiple of 10. The result is the Check Digit
func (*Addenda05) EntryDetailSequenceNumberField ¶ added in v0.2.0
EntryDetailSequenceNumberField returns a zero padded EntryDetailSequenceNumber string
func (*Addenda05) Parse ¶ added in v0.2.0
Parse takes the input record string and parses the Addenda05 values
func (*Addenda05) PaymentRelatedInformationField ¶ added in v0.2.0
PaymentRelatedInformationField returns a zero padded PaymentRelatedInformation string
func (*Addenda05) SequenceNumberField ¶ added in v0.2.0
SequenceNumberField returns a zero padded SequenceNumber string
func (*Addenda05) SetPaymentRelatedInformation ¶ added in v0.2.0
SetPaymentRealtedInformation
func (*Addenda05) String ¶ added in v0.2.0
String writes the Addenda05 struct to a 94 character string.
type Addenda98 ¶ added in v0.2.0
type Addenda98 struct { // ChangeCode field contains a standard code used by an ACH Operator or RDFI to describe the reason for a change Entry. // Must exist in changeCodeDict ChangeCode string // OriginalTrace This field contains the Trace Number as originally included on the forward Entry or Prenotification. // The RDFI must include the Original Entry Trace Number in the Addenda Record of an Entry being returned to an ODFI, // in the Addenda Record of an 98, within an Acknowledgment Entry, or with an RDFI request for a copy of an authorization. OriginalTrace int // OriginalDFI field contains the Receiving DFI Identification (addenda.RDFIIdentification) as originally included on the forward Entry or Prenotification that the RDFI is returning or correcting. OriginalDFI string // CorrectedData CorrectedData string // TraceNumber matches the Entry Detail Trace Number of the entry being returned. TraceNumber int // contains filtered or unexported fields }
Addenda98 is a Addendumer addenda record format for Notification OF Change(98) The field contents for Notification of Change Entries must match the field contents of the original Entries
func NewAddenda98 ¶ added in v0.2.0
func NewAddenda98() *Addenda98
NewAddenda98 returns an reference to an instantiated Addenda98 with default values
func (*Addenda98) CalculateCheckDigit ¶ added in v0.2.0
CalculateCheckDigit returns a check digit for a routing number Multiply each digit in the Routing number by a weighting factor. The weighting factors for each digit are: Position: 1 2 3 4 5 6 7 8 Weights : 3 7 1 3 7 1 3 7 Add the results of the eight multiplications Subtract the sum from the next highest multiple of 10. The result is the Check Digit
func (*Addenda98) CorrectedDataField ¶ added in v0.2.0
CorrectedDataField returns a space padded CorrectedData string
func (*Addenda98) OriginalDFIField ¶ added in v0.2.0
OriginalDFIField returns a zero padded OriginalDFI string
func (*Addenda98) OriginalTraceField ¶ added in v0.2.0
OriginalTraceField returns a zero padded OriginalTrace string
func (*Addenda98) Parse ¶ added in v0.2.0
Parse takes the input record string and parses the Addenda98 values
func (*Addenda98) String ¶ added in v0.2.0
String writes the Addenda98 struct to a 94 character string
func (*Addenda98) TraceNumberField ¶ added in v0.2.0
TraceNumberField returns a zero padded traceNumber string
type Addenda99 ¶ added in v0.2.0
type Addenda99 struct { // ReturnCode field contains a standard code used by an ACH Operator or RDFI to describe the reason for returning an Entry. // Must exist in returnCodeDict ReturnCode string // OriginalTrace This field contains the Trace Number as originally included on the forward Entry or Prenotification. // The RDFI must include the Original Entry Trace Number in the Addenda Record of an Entry being returned to an ODFI, // in the Addenda Record of an 98, within an Acknowledgment Entry, or with an RDFI request for a copy of an authorization. OriginalTrace int // DateOfDeath The field date of death is to be supplied on Entries being returned for reason of death (return reason codes R14 and R15). DateOfDeath time.Time // OriginalDFI field contains the Receiving DFI Identification (addenda.RDFIIdentification) as originally included on the forward Entry or Prenotification that the RDFI is returning or correcting. OriginalDFI string // AddendaInformation AddendaInformation string // TraceNumber matches the Entry Detail Trace Number of the entry being returned. TraceNumber int // contains filtered or unexported fields }
Addenda99 utilized for Notification of Change Entry (COR) and Return types.
func NewAddenda99 ¶ added in v0.2.0
func NewAddenda99() *Addenda99
NewAddenda99 returns a new Addenda99 with default values for none exported fields
func (*Addenda99) AddendaInformationField ¶ added in v0.2.0
AddendaInformationField returns a space padded AddendaInformation string
func (*Addenda99) CalculateCheckDigit ¶ added in v0.2.0
CalculateCheckDigit returns a check digit for a routing number Multiply each digit in the Routing number by a weighting factor. The weighting factors for each digit are: Position: 1 2 3 4 5 6 7 8 Weights : 3 7 1 3 7 1 3 7 Add the results of the eight multiplications Subtract the sum from the next highest multiple of 10. The result is the Check Digit
func (*Addenda99) DateOfDeathField ¶ added in v0.2.0
DateOfDeathField returns a space padded DateOfDeath string
func (*Addenda99) OriginalDFIField ¶ added in v0.2.0
OriginalDFIField returns a zero padded OriginalDFI string
func (*Addenda99) OriginalTraceField ¶ added in v0.2.0
OriginalTraceField returns a zero padded OriginalTrace string
func (*Addenda99) Parse ¶ added in v0.2.0
Parse takes the input record string and parses the Addenda99 values
func (*Addenda99) String ¶ added in v0.2.0
String writes the Addenda99 struct to a 94 character string
func (*Addenda99) TraceNumberField ¶ added in v0.2.0
TraceNumberField returns a zero padded traceNumber string
type Addendumer ¶
type Addendumer interface { Parse(string) //TypeCode Defines the specific explanation and format for the addenda information TypeCode() string String() string Validate() error }
Addendumer abstracts the different ACH addendum types that can be added to an EntryDetail record
type BatchCCD ¶
type BatchCCD struct {
// contains filtered or unexported fields
}
BatchCCD is a batch file that handles SEC payment type CCD amd CCD+. Corporate credit or debit. Identifies an Entry initiated by an Organization to transfer funds to or from an account of that Organization or another Organization. For commercial accounts only.
func (*BatchCCD) AddEntry ¶
func (batch *BatchCCD) AddEntry(entry *EntryDetail)
AddEntry appends an EntryDetail to the Batch
func (*BatchCCD) Category ¶
func (batch *BatchCCD) Category() string
IsReturn is true if the batch contains an Entry Return
func (*BatchCCD) Create ¶
Create builds the batch sequence numbers and batch control. Additional creation
func (*BatchCCD) GetControl ¶
func (batch *BatchCCD) GetControl() *BatchControl
GetControl returns the current Batch Control
func (*BatchCCD) GetEntries ¶
func (batch *BatchCCD) GetEntries() []*EntryDetail
GetEntries returns a slice of entry details for the batch
func (*BatchCCD) GetHeader ¶
func (batch *BatchCCD) GetHeader() *BatchHeader
GetHeader returns the current Batch header
func (*BatchCCD) SetControl ¶
func (batch *BatchCCD) SetControl(batchControl *BatchControl)
SetControl appends an BatchControl to the Batch
func (*BatchCCD) SetHeader ¶
func (batch *BatchCCD) SetHeader(batchHeader *BatchHeader)
SetHeader appends an BatchHeader to the Batch
type BatchCOR ¶
type BatchCOR struct {
// contains filtered or unexported fields
}
BatchCOR COR - Automated Notification of Change (NOC) or Refused Notification of Change This Standard Entry Class Code is used by an RDFI or ODFI when originating a Notification of Change or Refused Notification of Change in automated format. A Notification of Change may be created by an RDFI to notify the ODFI that a posted Entry or Prenotification Entry contains invalid or erroneous information and should be changed.
func (*BatchCOR) AddEntry ¶
func (batch *BatchCOR) AddEntry(entry *EntryDetail)
AddEntry appends an EntryDetail to the Batch
func (*BatchCOR) Category ¶
func (batch *BatchCOR) Category() string
IsReturn is true if the batch contains an Entry Return
func (*BatchCOR) Create ¶
Create builds the batch sequence numbers and batch control. Additional creation
func (*BatchCOR) GetControl ¶
func (batch *BatchCOR) GetControl() *BatchControl
GetControl returns the current Batch Control
func (*BatchCOR) GetEntries ¶
func (batch *BatchCOR) GetEntries() []*EntryDetail
GetEntries returns a slice of entry details for the batch
func (*BatchCOR) GetHeader ¶
func (batch *BatchCOR) GetHeader() *BatchHeader
GetHeader returns the current Batch header
func (*BatchCOR) SetControl ¶
func (batch *BatchCOR) SetControl(batchControl *BatchControl)
SetControl appends an BatchControl to the Batch
func (*BatchCOR) SetHeader ¶
func (batch *BatchCOR) SetHeader(batchHeader *BatchHeader)
SetHeader appends an BatchHeader to the Batch
type BatchControl ¶
type BatchControl struct { // ServiceClassCode ACH Mixed Debits and Credits ‘200’ // ACH Credits Only ‘220’ // ACH Debits Only ‘225' // Same as 'ServiceClassCode' in BatchHeaderRecord ServiceClassCode int // EntryAddendaCount is a tally of each Entry Detail Record and each Addenda // Record processed, within either the batch or file as appropriate. EntryAddendaCount int // validate the Receiving DFI Identification in each Entry Detail Record is hashed // to provide a check against inadvertent alteration of data contents due // to hardware failure or program erro // // In this context the Entry Hash is the sum of the corresponding fields in the // Entry Detail Records on the file. EntryHash int // TotalDebitEntryDollarAmount Contains accumulated Entry debit totals within the batch. TotalDebitEntryDollarAmount int // TotalCreditEntryDollarAmount Contains accumulated Entry credit totals within the batch. TotalCreditEntryDollarAmount int // CompanyIdentification is an alphameric code used to identify an Originato // The Company Identification Field must be included on all // prenotification records and on each entry initiated puruant to such // prenotification. The Company ID may begin with the ANSI one-digit // Identification Code Designators (ICD), followed by the identification // numbe The ANSI Identification Numbers and related Identification Code // Designators (ICD) are: // // IRS Employer Identification Number (EIN) "1" // Data Universal Numbering Systems (DUNS) "3" // User Assigned Number "9" CompanyIdentification string // MessageAuthenticationCode the MAC is an eight character code derived from a special key used in // conjunction with the DES algorithm. The purpose of the MAC is to // validate the authenticity of ACH entries. The DES algorithm and key // message standards must be in accordance with standards adopted by the // American National Standards Institute. The remaining eleven characters // of this field are blank. MessageAuthenticationCode string // OdfiIdentification the routing number is used to identify the DFI originating entries within a given branch. ODFIIdentification string // BatchNumber this number is assigned in ascending sequence to each batch by the ODFI // or its Sending Point in a given file of entries. Since the batch number // in the Batch Header Record and the Batch Control Record is the same, // the ascending sequence number should be assigned by batch and not by record. BatchNumber int // contains filtered or unexported fields }
BatchControl contains entry counts, dollar total and has totals for all entries contained in the preceding batch
func NewBatchControl ¶
func NewBatchControl() *BatchControl
NewBatchControl returns a new BatchControl with default values for none exported fields
func (*BatchControl) BatchNumberField ¶
func (bc *BatchControl) BatchNumberField() string
BatchNumberField gets a string of the batch number zero padded
func (*BatchControl) CalculateCheckDigit ¶
CalculateCheckDigit returns a check digit for a routing number Multiply each digit in the Routing number by a weighting factor. The weighting factors for each digit are: Position: 1 2 3 4 5 6 7 8 Weights : 3 7 1 3 7 1 3 7 Add the results of the eight multiplications Subtract the sum from the next highest multiple of 10. The result is the Check Digit
func (*BatchControl) CompanyIdentificationField ¶
func (bc *BatchControl) CompanyIdentificationField() string
CompanyIdentificationField get the CompanyIdentification righ padded
func (*BatchControl) EntryAddendaCountField ¶
func (bc *BatchControl) EntryAddendaCountField() string
EntryAddendaCountField gets a string of the addenda count zero padded
func (*BatchControl) EntryHashField ¶
func (bc *BatchControl) EntryHashField() string
EntryHashField get a zero padded EntryHash
func (*BatchControl) MessageAuthenticationCodeField ¶
func (bc *BatchControl) MessageAuthenticationCodeField() string
MessageAuthenticationCodeField get the MessageAuthenticationCode right padded
func (*BatchControl) ODFIIdentificationField ¶
func (bc *BatchControl) ODFIIdentificationField() string
ODFIIdentificationField get the odfi number zero padded
func (*BatchControl) Parse ¶
func (bc *BatchControl) Parse(record string)
Parse takes the input record string and parses the EntryDetail values
func (*BatchControl) String ¶
func (bc *BatchControl) String() string
String writes the BatchControl struct to a 94 character string.
func (*BatchControl) TotalCreditEntryDollarAmountField ¶
func (bc *BatchControl) TotalCreditEntryDollarAmountField() string
TotalCreditEntryDollarAmountField get a zero padded Credit Entry Amount
func (*BatchControl) TotalDebitEntryDollarAmountField ¶
func (bc *BatchControl) TotalDebitEntryDollarAmountField() string
TotalDebitEntryDollarAmountField get a zero padded Debity Entry Amount
func (*BatchControl) Validate ¶
func (bc *BatchControl) Validate() error
Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.
type BatchError ¶
BatchError is an Error that describes batch validation issues
func (*BatchError) Error ¶
func (e *BatchError) Error() string
type BatchHeader ¶
type BatchHeader struct { // ServiceClassCode ACH Mixed Debits and Credits ‘200’ // ACH Credits Only ‘220’ // ACH Debits Only ‘225' ServiceClassCode int // CompanyName the company originating the entries in the batch CompanyName string // CompanyDiscretionaryData allows Originators and/or ODFIs to include codes (one or more), // of significance only to them, to enable specialized handling of all // subsequent entries in that batch. There will be no standardized // interpretation for the value of the field. This field must be returned // intact on any return entry. CompanyDiscretionaryData string // CompanyIdentification The 9 digit FEIN number (proceeded by a predetermined // alpha or numeric character) of the entity in the company name field CompanyIdentification string // StandardEntryClassCode // Identifies the payment type (product) found within an ACH batch-using a 3-character code. // The SEC Code pertains to all items within batch. // Determines format of the detail records. // Determines addenda records (required or optional PLUS one or up to 9,999 records). // Determines rules to follow (return time frames). // Some SEC codes require specific data in predetermined fields within the ACH record StandardEntryClassCode string // CompanyEntryDescription A description of the entries contained in the batch // //The Originator establishes the value of this field to provide a // description of the purpose of the entry to be displayed back to // the receive For example, "GAS BILL," "REG. SALARY," "INS. PREM," // "SOC. SEC.," "DTC," "TRADE PAY," "PURCHASE," etc. // // This field must contain the word "REVERSAL" (left justified) when the // batch contains reversing entries. // // This field must contain the word "RECLAIM" (left justified) when the // batch contains reclamation entries. // // This field must contain the word "NONSETTLED" (left justified) when the // batch contains entries which could not settle. CompanyEntryDescription string // CompanyDescriptiveDate except as otherwise noted below, the Originator establishes this field // as the date it would like to see displayed to the receiver for // descriptive purposes. This field is never used to control timing of any // computer or manual operation. It is solely for descriptive purposes. // The RDFI should not assume any specific format. Examples of possible // entries in this field are "011392,", "01 92," "JAN 13," "JAN 92," etc. CompanyDescriptiveDate string // EffectiveEntryDate the date on which the entries are to settle EffectiveEntryDate time.Time // OriginatorStatusCode refers to the ODFI initiating the Entry. // 0 ADV File prepared by an ACH Operator. // 1 This code identifies the Originator as a depository financial institution. // 2 This code identifies the Originator as a Federal Government entity or agency. OriginatorStatusCode int //ODFIIdentification First 8 digits of the originating DFI transit routing number ODFIIdentification string // BatchNumber is assigned in ascending sequence to each batch by the ODFI // or its Sending Point in a given file of entries. Since the batch number // in the Batch Header Record and the Batch Control Record is the same, // the ascending sequence number should be assigned by batch and not by // record. BatchNumber int // contains filtered or unexported fields }
BatchHeader identifies the originating entity and the type of transactions contained in the batch (i.e., the standard entry class, PPD for consumer, CCD or CTX for corporate). This record also contains the effective date, or desired settlement date, for all entries contained in this batch. The settlement date field is not entered as it is determined by the ACH operator
func NewBatchHeader ¶
func NewBatchHeader() *BatchHeader
NewBatchHeader returns a new BatchHeader with default values for non exported fields
func (*BatchHeader) BatchNumberField ¶
func (bh *BatchHeader) BatchNumberField() string
BatchNumberField get the batch number zero padded
func (*BatchHeader) CalculateCheckDigit ¶
CalculateCheckDigit returns a check digit for a routing number Multiply each digit in the Routing number by a weighting factor. The weighting factors for each digit are: Position: 1 2 3 4 5 6 7 8 Weights : 3 7 1 3 7 1 3 7 Add the results of the eight multiplications Subtract the sum from the next highest multiple of 10. The result is the Check Digit
func (*BatchHeader) CompanyDescriptiveDateField ¶
func (bh *BatchHeader) CompanyDescriptiveDateField() string
CompanyDescriptiveDateField get the CompanyDescriptiveDate left padded
func (*BatchHeader) CompanyDiscretionaryDataField ¶
func (bh *BatchHeader) CompanyDiscretionaryDataField() string
CompanyDiscretionaryDataField get the CompanyDiscretionaryData left padded
func (*BatchHeader) CompanyEntryDescriptionField ¶
func (bh *BatchHeader) CompanyEntryDescriptionField() string
CompanyEntryDescriptionField get the CompanyEntryDescription left padded
func (*BatchHeader) CompanyIdentificationField ¶
func (bh *BatchHeader) CompanyIdentificationField() string
CompanyIdentificationField get the CompanyIdentification left padded
func (*BatchHeader) CompanyNameField ¶
func (bh *BatchHeader) CompanyNameField() string
CompanyNameField get the CompanyName left padded
func (*BatchHeader) EffectiveEntryDateField ¶
func (bh *BatchHeader) EffectiveEntryDateField() string
EffectiveEntryDateField get the EffectiveEntryDate in YYMMDD format
func (*BatchHeader) ODFIIdentificationField ¶
func (bh *BatchHeader) ODFIIdentificationField() string
ODFIIdentificationField get the odfi number zero padded
func (*BatchHeader) Parse ¶
func (bh *BatchHeader) Parse(record string)
Parse takes the input record string and parses the BatchHeader values
func (*BatchHeader) String ¶
func (bh *BatchHeader) String() string
String writes the BatchHeader struct to a 94 character string.
func (*BatchHeader) Validate ¶
func (bh *BatchHeader) Validate() error
Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.
type BatchPPD ¶
type BatchPPD struct {
// contains filtered or unexported fields
}
BatchPPD holds the Batch Header and Batch Control and all Entry Records for PPD Entries
func (*BatchPPD) AddEntry ¶
func (batch *BatchPPD) AddEntry(entry *EntryDetail)
AddEntry appends an EntryDetail to the Batch
func (*BatchPPD) Category ¶
func (batch *BatchPPD) Category() string
IsReturn is true if the batch contains an Entry Return
func (*BatchPPD) GetControl ¶
func (batch *BatchPPD) GetControl() *BatchControl
GetControl returns the current Batch Control
func (*BatchPPD) GetEntries ¶
func (batch *BatchPPD) GetEntries() []*EntryDetail
GetEntries returns a slice of entry details for the batch
func (*BatchPPD) GetHeader ¶
func (batch *BatchPPD) GetHeader() *BatchHeader
GetHeader returns the current Batch header
func (*BatchPPD) SetControl ¶
func (batch *BatchPPD) SetControl(batchControl *BatchControl)
SetControl appends an BatchControl to the Batch
func (*BatchPPD) SetHeader ¶
func (batch *BatchPPD) SetHeader(batchHeader *BatchHeader)
SetHeader appends an BatchHeader to the Batch
type BatchTEL ¶ added in v0.2.0
type BatchTEL struct {
// contains filtered or unexported fields
}
BatchTEL is a batch that handles SEC payment type Telephone-Initiated Entries (TEL) Telephone-Initiated Entries (TEL) are consumer debit transactions. The NACHA Operating Rules permit TEL entries when the Originator obtains the Receiver’s authorization for the debit entry orally via the telephone. An entry based upon a Receiver’s oral authorization must utilize the TEL (Telephone-Initiated Entry) Standard Entry Class (SEC) Code.
func NewBatchTEL ¶ added in v0.2.0
func NewBatchTEL(bh *BatchHeader) *BatchTEL
NewBatchTEL returns a *BatchTEL
func (*BatchTEL) AddEntry ¶ added in v0.2.0
func (batch *BatchTEL) AddEntry(entry *EntryDetail)
AddEntry appends an EntryDetail to the Batch
func (*BatchTEL) Category ¶ added in v0.2.0
func (batch *BatchTEL) Category() string
IsReturn is true if the batch contains an Entry Return
func (*BatchTEL) Create ¶ added in v0.2.0
Create builds the batch sequence numbers and batch control. Additional creation
func (*BatchTEL) GetControl ¶ added in v0.2.0
func (batch *BatchTEL) GetControl() *BatchControl
GetControl returns the current Batch Control
func (*BatchTEL) GetEntries ¶ added in v0.2.0
func (batch *BatchTEL) GetEntries() []*EntryDetail
GetEntries returns a slice of entry details for the batch
func (*BatchTEL) GetHeader ¶ added in v0.2.0
func (batch *BatchTEL) GetHeader() *BatchHeader
GetHeader returns the current Batch header
func (*BatchTEL) SetControl ¶ added in v0.2.0
func (batch *BatchTEL) SetControl(batchControl *BatchControl)
SetControl appends an BatchControl to the Batch
func (*BatchTEL) SetHeader ¶ added in v0.2.0
func (batch *BatchTEL) SetHeader(batchHeader *BatchHeader)
SetHeader appends an BatchHeader to the Batch
type BatchWEB ¶
type BatchWEB struct {
// contains filtered or unexported fields
}
BatchWEB creates a batch file that handles SEC payment type WEB. Entry submitted pursuant to an authorization obtained solely via the Internet or a wireless network For consumer accounts only.
func (*BatchWEB) AddEntry ¶
func (batch *BatchWEB) AddEntry(entry *EntryDetail)
AddEntry appends an EntryDetail to the Batch
func (*BatchWEB) Category ¶
func (batch *BatchWEB) Category() string
IsReturn is true if the batch contains an Entry Return
func (*BatchWEB) Create ¶
Create builds the batch sequence numbers and batch control. Additional creation
func (*BatchWEB) GetControl ¶
func (batch *BatchWEB) GetControl() *BatchControl
GetControl returns the current Batch Control
func (*BatchWEB) GetEntries ¶
func (batch *BatchWEB) GetEntries() []*EntryDetail
GetEntries returns a slice of entry details for the batch
func (*BatchWEB) GetHeader ¶
func (batch *BatchWEB) GetHeader() *BatchHeader
GetHeader returns the current Batch header
func (*BatchWEB) SetControl ¶
func (batch *BatchWEB) SetControl(batchControl *BatchControl)
SetControl appends an BatchControl to the Batch
func (*BatchWEB) SetHeader ¶
func (batch *BatchWEB) SetHeader(batchHeader *BatchHeader)
SetHeader appends an BatchHeader to the Batch
type Batcher ¶
type Batcher interface { GetHeader() *BatchHeader SetHeader(*BatchHeader) GetControl() *BatchControl SetControl(*BatchControl) GetEntries() []*EntryDetail AddEntry(*EntryDetail) Create() error Validate() error // Category defines if a Forward or Return Category() string }
Batcher abstract the different ACH batch types that can exist in a file. Each batch type is defined by SEC (Standard Entry Class) code in the Batch Header * SEC identifies the payment type (product) found within an ACH batch-using a 3-character code * The SEC Code pertains to all items within batch
- Determines format of the entry detail records
- Determines addenda records (required or optional PLUS one or up to 9,999 records)
- Determines rules to follow (return timeframes)
- Some SEC codes require specific data in predetermined fields within the ACH record
func NewBatch ¶
func NewBatch(bh *BatchHeader) (Batcher, error)
NewBatch takes a BatchHeader and returns a matching SEC code batch type that is a batcher. Returns an error if the SEC code is not supported.
type EntryDetail ¶
type EntryDetail struct { // TransactionCode if the receivers account is: // Credit (deposit) to checking account ‘22’ // Prenote for credit to checking account ‘23’ // Debit (withdrawal) to checking account ‘27’ // Prenote for debit to checking account ‘28’ // Credit to savings account ‘32’ // Prenote for credit to savings account ‘33’ // Debit to savings account ‘37’ // Prenote for debit to savings account ‘38’ TransactionCode int // RDFIIdentification is the RDFI's routing number without the last digit. // Receiving Depository Financial Institution RDFIIdentification string // CheckDigit the last digit of the RDFI's routing number CheckDigit string // DFIAccountNumber is the receiver's bank account number you are crediting/debiting. // It important to note that this is an alphanumeric field, so its space padded, no zero padded DFIAccountNumber string // Amount Number of cents you are debiting/crediting this account Amount int // IdentificationNumber n internal identification (alphanumeric) that // you use to uniquely identify this Entry Detail Record IdentificationNumber string // IndividualName The name of the receiver, usually the name on the bank account IndividualName string // DiscretionaryData allows ODFIs to include codes, of significance only to them, // to enable specialized handling of the entry. There will be no // standardized interpretation for the value of this field. It can either // be a single two-character code, or two distinct one-character codes, // according to the needs of the ODFI and/or Originator involved. This // field must be returned intact for any returned entry. // // WEB uses the Discretionary Data Field as the Payment Type Code DiscretionaryData string // AddendaRecordIndicator indicates the existence of an Addenda Record. // A value of "1" indicates that one ore more addenda records follow, // and "0" means no such record is present. AddendaRecordIndicator int // TraceNumber assigned by the ODFI in ascending sequence, is included in each // Entry Detail Record, Corporate Entry Detail Record, and addenda Record. // Trace Numbers uniquely identify each entry within a batch in an ACH input file. // In association with the Batch Number, transmission (File Creation) Date, // and File ID Modifier, the Trace Number uniquely identifies an entry within a given file. // For addenda Records, the Trace Number will be identical to the Trace Number // in the associated Entry Detail Record, since the Trace Number is associated // with an entry or item rather than a physical record. TraceNumber int // Addendum a list of Addenda for the Entry Detail Addendum []Addendumer // Category defines if the entry is a Forward, Return, or NOC Category string // contains filtered or unexported fields }
EntryDetail contains the actual transaction data for an individual entry. Fields include those designating the entry as a deposit (credit) or withdrawal (debit), the transit routing number for the entry recipient’s financial institution, the account number (left justify,no zero fill), name, and dollar amount.
func NewEntryDetail ¶
func NewEntryDetail() *EntryDetail
NewEntryDetail returns a new EntryDetail with default values for non exported fields
func (*EntryDetail) AddAddenda ¶
func (ed *EntryDetail) AddAddenda(addenda Addendumer) []Addendumer
AddAddenda appends an Addendumer to the EntryDetail
func (*EntryDetail) AmountField ¶
func (ed *EntryDetail) AmountField() string
AmountField returns a zero padded string of amount
func (*EntryDetail) CalculateCheckDigit ¶
CalculateCheckDigit returns a check digit for a routing number Multiply each digit in the Routing number by a weighting factor. The weighting factors for each digit are: Position: 1 2 3 4 5 6 7 8 Weights : 3 7 1 3 7 1 3 7 Add the results of the eight multiplications Subtract the sum from the next highest multiple of 10. The result is the Check Digit
func (*EntryDetail) CreditOrDebit ¶ added in v0.2.0
func (ed *EntryDetail) CreditOrDebit() string
CreditOrDebit returns a "C" for credit or "D" for debit based on the entry TransactionCode
func (*EntryDetail) DFIAccountNumberField ¶
func (ed *EntryDetail) DFIAccountNumberField() string
DFIAccountNumberField gets the DFIAccountNumber with space padding
func (*EntryDetail) DiscretionaryDataField ¶
func (ed *EntryDetail) DiscretionaryDataField() string
DiscretionaryDataField returns a space padded string of DiscretionaryData
func (*EntryDetail) IdentificationNumberField ¶
func (ed *EntryDetail) IdentificationNumberField() string
IdentificationNumberField returns a space padded string of IdentificationNumber
func (*EntryDetail) IndividualNameField ¶
func (ed *EntryDetail) IndividualNameField() string
IndividualNameField returns a space padded string of IndividualName
func (*EntryDetail) Parse ¶
func (ed *EntryDetail) Parse(record string)
Parse takes the input record string and parses the EntryDetail values
func (*EntryDetail) PaymentTypeField ¶
func (ed *EntryDetail) PaymentTypeField() string
PaymentTypeField returns the discretionary data field used in WEB batch files
func (*EntryDetail) RDFIIdentificationField ¶
func (ed *EntryDetail) RDFIIdentificationField() string
RDFIIdentificationField get the rdfiIdentification with zero padding
func (*EntryDetail) ReceivingCompanyField ¶
func (ed *EntryDetail) ReceivingCompanyField() string
ReceivingCompanyField is used in CCD files but returns the underlying IndividualName field
func (*EntryDetail) SetPaymentType ¶
func (ed *EntryDetail) SetPaymentType(t string)
SetPaymentType as R (Recurring) all other values will result in S (single)
func (*EntryDetail) SetRDFI ¶
func (ed *EntryDetail) SetRDFI(rdfi string) *EntryDetail
SetRDFI takes the 9 digit RDFI account number and separates it for RDFIIdentification and CheckDigit
func (*EntryDetail) SetReceivingCompany ¶
func (ed *EntryDetail) SetReceivingCompany(s string)
SetReceivingCompany setter for CCD receiving company individual name
func (*EntryDetail) SetTraceNumber ¶ added in v0.2.0
func (ed *EntryDetail) SetTraceNumber(ODFIIdentification string, seq int)
SetTraceNumber takes first 8 digits of ODFI and concatenates a sequence number onto the TraceNumber
func (*EntryDetail) String ¶
func (ed *EntryDetail) String() string
String writes the EntryDetail struct to a 94 character string.
func (*EntryDetail) TraceNumberField ¶
func (ed *EntryDetail) TraceNumberField() string
TraceNumberField returns a zero padded traceNumber string
func (*EntryDetail) Validate ¶
func (ed *EntryDetail) Validate() error
Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.
type FieldError ¶
type FieldError struct { FieldName string // field name where error happened Value string // value that cause error Msg string // context of the error. }
FieldError is returned for errors at a field level in a record
func (*FieldError) Error ¶
func (e *FieldError) Error() string
Error message is constructed FieldName Msg Value Example1: BatchCount $% has none alphanumeric characters Example2: BatchCount 5 is out-of-balance with file count 6
type File ¶
type File struct { Header FileHeader Batches []Batcher Control FileControl // NotificationOfChange (Notification of change) is a slice of references to BatchCOR in file.Batches NotificationOfChange []*BatchCOR // ReturnEntries is a slice of references to file.Batches that contain return entires ReturnEntries []Batcher // contains filtered or unexported fields }
File contains the structures of a parsed ACH File.
func (*File) Create ¶
Create creates a valid file and requires that the FileHeader and at least one Batch
func (*File) SetHeader ¶
func (f *File) SetHeader(h FileHeader) *File
SetHeader allows for header to be built.
type FileControl ¶
type FileControl struct { // BatchCount total number of batches (i.e., ‘5’ records) in the file BatchCount int // BlockCount total number of records in the file (include all headers and trailer) divided // by 10 (This number must be evenly divisible by 10. If not, additional records consisting of all 9’s are added to the file after the initial ‘9’ record to fill out the block 10.) BlockCount int // EntryAddendaCount total detail and addenda records in the file EntryAddendaCount int // EntryHash calculated in the same manner as the batch has total but includes total from entire file EntryHash int // TotalDebitEntryDollarAmountInFile contains accumulated Batch debit totals within the file. TotalDebitEntryDollarAmountInFile int // TotalCreditEntryDollarAmountInFile contains accumulated Batch credit totals within the file. TotalCreditEntryDollarAmountInFile int // contains filtered or unexported fields }
FileControl record contains entry counts, dollar totals and hash totals accumulated from each batch control record in the file.
func NewFileControl ¶
func NewFileControl() FileControl
NewFileControl returns a new FileControl with default values for none exported fields
func (*FileControl) BatchCountField ¶
func (fc *FileControl) BatchCountField() string
BatchCountField gets a string of the batch count zero padded
func (*FileControl) BlockCountField ¶
func (fc *FileControl) BlockCountField() string
BlockCountField gets a string of the block count zero padded
func (*FileControl) CalculateCheckDigit ¶
CalculateCheckDigit returns a check digit for a routing number Multiply each digit in the Routing number by a weighting factor. The weighting factors for each digit are: Position: 1 2 3 4 5 6 7 8 Weights : 3 7 1 3 7 1 3 7 Add the results of the eight multiplications Subtract the sum from the next highest multiple of 10. The result is the Check Digit
func (*FileControl) EntryAddendaCountField ¶
func (fc *FileControl) EntryAddendaCountField() string
EntryAddendaCountField gets a string of entry addenda batch count zero padded
func (*FileControl) EntryHashField ¶
func (fc *FileControl) EntryHashField() string
EntryHashField gets a string of entry hash zero padded
func (*FileControl) Parse ¶
func (fc *FileControl) Parse(record string)
Parse takes the input record string and parses the FileControl values
func (*FileControl) String ¶
func (fc *FileControl) String() string
String writes the FileControl struct to a 94 character string.
func (*FileControl) TotalCreditEntryDollarAmountInFileField ¶
func (fc *FileControl) TotalCreditEntryDollarAmountInFileField() string
TotalCreditEntryDollarAmountInFileField get a zero padded Total credit Entry Amount
func (*FileControl) TotalDebitEntryDollarAmountInFileField ¶
func (fc *FileControl) TotalDebitEntryDollarAmountInFileField() string
TotalDebitEntryDollarAmountInFileField get a zero padded Total debit Entry Amount
func (*FileControl) Validate ¶
func (fc *FileControl) Validate() error
Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.
type FileHeader ¶
type FileHeader struct { // ImmediateDestination contains the Routing Number of the ACH Operator or receiving // point to which the file is being sent. The ach file format specifies a 10 character // field begins with a blank space in the first position, followed by the four digit // Federal Reserve Routing Symbol, the four digit ABA Institution Identifier, and the Check // Digit (bTTTTAAAAC). ImmediateDestinationField() will append the blank space to the // routing number. ImmediateDestination string // ImmediateOrigin contains the Routing Number of the ACH Operator or sending // point that is sending the file. The ach file format specifies a 10 character field // which begins with a blank space in the first position, followed by the four digit // Federal Reserve Routing Symbol, the four digit ABA Institution Identifier, and the Check // Digit (bTTTTAAAAC). ImmediateOriginField() will append the blank space to the routing // number. ImmediateOrigin string // FileCreationDate is expressed in a "YYMMDD" format. The File Creation // Date is the date on which the file is prepared by an ODFI (ACH input files) // or the date (exchange date) on which a file is transmitted from ACH Operator // to ACH Operator, or from ACH Operator to RDFIs (ACH output files). FileCreationDate time.Time // FileCreationTime is expressed ina n "HHMM" (24 hour clock) format. // The system time when the ACH file was created FileCreationTime time.Time // This field should start at zero and increment by 1 (up to 9) and then go to // letters starting at A through Z for each subsequent file that is created for // a single system date. (34-34) 1 numeric 0-9 or uppercase alpha A-Z. // I have yet to see this ID not A FileIDModifier string // ImmediateDestinationName us the name of the ACH or receiving point for which that // file is destined. Name corresponding to the ImmediateDestination ImmediateDestinationName string // ImmediateOriginName is the name of the ACH operator or sending point that is // sending the file. Name corresponding to the ImmediateOrigin ImmediateOriginName string // ReferenceCode is reserved for information pertinent to the Originator. ReferenceCode string // contains filtered or unexported fields }
FileHeader is a Record designating physical file characteristics and identify the origin (sending point) and destination (receiving point) of the entries contained in the file. The file header also includes creation date and time fields which can be used to uniquely identify a file.
func NewFileHeader ¶
func NewFileHeader() FileHeader
NewFileHeader returns a new FileHeader with default values for none exported fields
func (*FileHeader) CalculateCheckDigit ¶
CalculateCheckDigit returns a check digit for a routing number Multiply each digit in the Routing number by a weighting factor. The weighting factors for each digit are: Position: 1 2 3 4 5 6 7 8 Weights : 3 7 1 3 7 1 3 7 Add the results of the eight multiplications Subtract the sum from the next highest multiple of 10. The result is the Check Digit
func (*FileHeader) FileCreationDateField ¶
func (fh *FileHeader) FileCreationDateField() string
FileCreationDateField gets the file creation date in YYMMDD format
func (*FileHeader) FileCreationTimeField ¶
func (fh *FileHeader) FileCreationTimeField() string
FileCreationTimeField gets the file creation time in HHMM format
func (*FileHeader) ImmediateDestinationField ¶
func (fh *FileHeader) ImmediateDestinationField() string
ImmediateDestinationField gets the immediate destination number with zero padding
func (*FileHeader) ImmediateDestinationNameField ¶
func (fh *FileHeader) ImmediateDestinationNameField() string
ImmediateDestinationNameField gets the ImmediateDestinationName field padded
func (*FileHeader) ImmediateOriginField ¶
func (fh *FileHeader) ImmediateOriginField() string
ImmediateOriginField gets the immediate origin number with 0 padding
func (*FileHeader) ImmediateOriginNameField ¶
func (fh *FileHeader) ImmediateOriginNameField() string
ImmediateOriginNameField gets the ImmImmediateOriginName field padded
func (*FileHeader) Parse ¶
func (fh *FileHeader) Parse(record string)
Parse takes the input record string and parses the FileHeader values
func (*FileHeader) ReferenceCodeField ¶
func (fh *FileHeader) ReferenceCodeField() string
ReferenceCodeField gets the ReferenceCode field padded
func (*FileHeader) String ¶
func (fh *FileHeader) String() string
String writes the FileHeader struct to a 94 character string.
func (*FileHeader) Validate ¶
func (fh *FileHeader) Validate() error
Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.
type ParseError ¶
type ParseError struct { Line int // Line number where the error accurd Record string // Name of the record type being parsed Err error // The actual error }
ParseError is returned for parsing reader errors. The first line is 1.
func (*ParseError) Error ¶
func (e *ParseError) Error() string
type Reader ¶
type Reader struct { // file is ach.file model being built as r is parsed. File File // contains filtered or unexported fields }
Reader reads records from a ACH-encoded file.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
A Writer writes an ach.file to a NACHA encoded file.
As returned by NewWriter, a Writer writes ach.file structs into NACHA formted files.
func (*Writer) Flush ¶
func (w *Writer) Flush()
Flush writes any buffered data to the underlying io.Writer. To check if an error occurred during the Flush, call Error.