imagecashletter

package module
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2022 License: Apache-2.0 Imports: 14 Imported by: 15

README

Moov Banner Logo

Project Documentation · API Endpoints · API Guide · Community · Blog

GoDoc Build Status Coverage Status Go Report Card Repo Size Apache 2 License Slack Channel Docker Pulls GitHub Stars Twitter

moov-io/imagecashletter

Moov's mission is to give developers an easy way to create and integrate bank processing into their own software products. Our open source projects are each focused on solving a single responsibility in financial services and designed around performance, scalability, and ease of use.

ImageCashLetter implements a reader, writer, and validator for X9’s Specifications for Image Cash Letter (ICL) to provide Check 21 services in an HTTP server and Go library. The HTTP server is available in a Docker image and the Go package github.com/moov-io/imagecashletter is available.

Table of contents

Project status

Moov ImageCashLetter is actively used in multiple production environments. Please star the project if you are interested in its progress. If you have layers above ImageCashLetter to simplify tasks, perform business operations, or found bugs we would appreciate an issue or pull request. Thanks!

Usage

The Image Cash Letter project implements an HTTP server and Go library for creating and modifying ICL files. We also have some examples of the reader and writer.

Docker

We publish a public Docker image moov/imagecashletter from Docker Hub or use this repository. No configuration is required to serve on :8083 and metrics at :9093/metrics in Prometheus format. We also have Docker images for OpenShift published as quay.io/moov/imagecashletter.

Pull & start the Docker image:

docker pull moov/imagecashletter:latest
docker run -p 8083:8083 -p 9093:9093 moov/imagecashletter:latest

List files stored in-memory:

curl localhost:8083/files
null

Upload an x9 file (binary):

curl -X POST --data-binary "@./test/testdata/valid-ascii.x937" http://localhost:8083/files/create
{"id":"<YOUR-UNIQUE-FILE-ID>","fileHeader":{"id":"","standardLevel":"03","testIndicator":"T","immediateDestination":"061000146","immediateOrigin":"026073150", ...

Retrieve an existing x9 file (JSON):

curl http://localhost:8083/files/<YOUR-UNIQUE-FILE-ID>
{"id":"<YOUR-UNIQUE-FILE-ID>","fileHeader":{"id":"","standardLevel":"03","testIndicator":"T","immediateDestination":"061000146","immediateOrigin":"026073150", ...

Create an x9 file from JSON:

curl -X POST -H "content-type: application/json" localhost:8083/files/create --data @./test/testdata/icl-valid.json
{"id":"<YOUR-UNIQUE-FILE-ID>","fileHeader":{"id":"","standardLevel":"35","testIndicator":"T","immediateDestination":"231380104","immediateOrigin":"121042882", ...

Get the formatted file:

curl localhost:8083/files/<YOUR-UNIQUE-FILE-ID>/contents
P0135T231380104121042882201810032219NCitadel      Wells Fargo    US   P100123138010412104288220181003201810032219IGA1   Contact Name 5558675552  P200123138010412104288220181003201810039999   1  01             P25   123456789 031300012       555888100001000001       GD1Y030BP261121042882201810031       938383      01  Test Payee   Y10
...
Google Cloud Run

To get started in a hosted environment you can deploy this project to the Google Cloud Platform.

From your Google Cloud dashboard create a new project and call it:

moov-icl-demo

Enable the Container Registry API for your project and associate a billing account if needed. Then, open the Cloud Shell terminal and run the following Docker commands, substituting your unique project ID:

docker pull moov/imagecashletter
docker tag moov/imagecashletter gcr.io/<PROJECT-ID>/imagecashletter
docker push gcr.io/<PROJECT-ID>/imagecashletter

Deploy the container to Cloud Run:

gcloud run deploy --image gcr.io/<PROJECT-ID>/imagecashletter --port 8083

Select your target platform to 1, service name to imagecashletter, and region to the one closest to you (enable Google API service if a prompt appears). Upon a successful build you will be given a URL where the API has been deployed:

https://YOUR-ICL-APP-URL.a.run.app

Now you can list files stored in-memory:

curl https://YOUR-ICL-APP-URL.a.run.app/files

You should get this response:

null
Configuration settings

The following environmental variables can be set to configure behavior in ImageCashLetter.

Environmental Variable Description Default
HTTPS_CERT_FILE Filepath containing a certificate (or intermediate chain) to be served by the HTTP server. Requires all traffic be over secure HTTP. Empty
HTTPS_KEY_FILE Filepath of a private key matching the leaf certificate from HTTPS_CERT_FILE. Empty
Data persistence

By design, ImageCashLetter does not persist (save) any data about the files or entry details created. The only storage occurs in memory of the process and upon restart ImageCashLetter will have no files or data saved. Also, no in-memory encryption of the data is performed.

Go library

This project uses Go Modules and uses Go v1.14 or higher. See Golang's install instructions for help setting up Go. You can download the source code and we offer tagged and released versions as well. We highly recommend you use a tagged release for production.

$ git@github.com:moov-io/imagecashletter.git

# Pull down into the Go Module cache
$ go get -u github.com/moov-io/imagecashletter

$ go doc github.com/moov-io/imagecashletter CashLetter

The package github.com/moov-io/imagecashletter offers a Go-based Image Cash Letter file reader and writer. To get started, check out a specific example:

ICL File Read Write
Link Link Link

ImageCashLetter's file handling behaviors can be modified to accommodate your specific use case. This is done by passing options into ICL's reader and writer during instantiation. For example, to read EBCDID encoded files you would instantiate a reader with NewReader(fd, ReadVariableLineLengthOption(), ReadEbcdicEncodingOption()).

The following options are currently supported:

Option Description
ReadVariableLineLengthOption Allows Reader to split ICL files based on the Inserted Length Field.
ReadEbcdicEncodingOption Allows Reader to decode scanned lines from EBCDIC to UTF-8.
WriteVariableLineLengthOption Instructs the Writer to begin each record with the appropriate Inserted Length Field.
WriteEbcdicEncodingOption Allows Writer to write file in EBCDIC.
In-browser ICL file parser

Using our in-browser utility, you can instantly convert X9 files into JSON. Either paste in ICL file content directly or choose a file from your local machine. This tool is particularly useful if you're handling sensitive PII or want to perform some quick tests, as operations are fully client-side with nothing stored in memory. We plan to support bidirectional conversion in the near future.

Learn about Image Cash Letter

Getting help

channel info
Project Documentation Our project documentation available online.
Twitter @moov You can follow Moov.io's Twitter feed to get updates on our project(s). You can also tweet us questions or just share blogs or stories.
GitHub Issue If you are able to reproduce a problem please open a GitHub Issue under the specific project that caused the error.
moov-io slack Join our slack channel to have an interactive discussion about the development of the project.

Supported and tested platforms

  • 64-bit Linux (Ubuntu, Debian), macOS, and Windows
  • Raspberry Pi

Note: 32-bit platforms have known issues and are not supported.

Contributing

Yes please! Please review our Contributing guide and Code of Conduct to get started!

This project uses Go Modules and uses Go v1.14 or higher. See Golang's install instructions for help setting up Go. You can download the source code and we offer tagged and released versions as well. We highly recommend you use a tagged release for production.

Releasing

To make a release of imagecashletter simply open a pull request with CHANGELOG.md and version.go updated with the next version number and details. You'll also need to push the tag (i.e. git push origin v1.0.0) to origin in order for CI to make the release.

Testing

We maintain a comprehensive suite of unit tests and recommend table-driven testing when a particular function warrants several very similar test cases. To run all test files in the current directory, use go test. Current overall coverage can be found on Codecov.

Fuzzing

We currently run fuzzing over ImageCashLetter in the form of a moov/imagecashletterfuzz Docker image. You can read more or run the image and report crasher examples to security@moov.io. Thanks!

As part of Moov's initiative to offer open source fintech infrastructure, we have a large collection of active projects you may find useful:

  • Moov Watchman offers search functions over numerous trade sanction lists from the United States and European Union.

  • Moov Fed implements utility services for searching the United States Federal Reserve System such as ABA routing numbers, financial institution name lookup, and FedACH and Fedwire routing information.

  • Moov Wire implements an interface to write files for the Fedwire Funds Service, a real-time gross settlement funds transfer system operated by the United States Federal Reserve Banks.

  • Moov ACH provides ACH file generation and parsing, supporting all Standard Entry Codes for the primary method of money movement throughout the United States.

  • Moov Metro 2 provides a way to easily read, create, and validate Metro 2 format, which is used for consumer credit history reporting by the United States credit bureaus.

License

Apache License 2.0 - See LICENSE for details.

Documentation

Index

Constants

View Source
const (
	CheckDetailAddendumACount  = 9
	CheckDetailAddendumBCount  = 1
	CheckDetailAddendumCCount  = 99
	ReturnDetailAddendumACount = 9
	ReturnDetailAddendumBCount = 1
	ReturnDetailAddendumCCount = 1
	ReturnDetailAddendumDCount = 99
)

Addendum Counts

View Source
const Version = "v0.9.1"

Version is the current version

Variables

View Source
var (
	CustomerReturnCodeDict       = map[string]*CustomerReturnCode{}
	AdministrativeReturnCodeDict = map[string]*AdministrativeReturnCode{}
)
View Source
var (
	ErrNilFile = errors.New("given nil File")
)

Functions

func DecodeEBCDIC added in v0.5.0

func DecodeEBCDIC(lineIn string) (lineOut string)

DecodeEBCDIC will decode a line from EBCDIC-0037 to UTF-8

func Passthrough added in v0.5.0

func Passthrough(lineIn string) (lineOut string)

Passthrough will return line as is

Types

type AdministrativeReturnCode

type AdministrativeReturnCode struct {
	Code, Abbreviation, Description string
}

AdministrativeReturnCode are customer return reason codes as defined in Part 6.3 of the ANSI X9.100-188-2018 Return Reasons for Check Image Exchange and IRDs

type Bundle

type Bundle struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`
	// BundleHeader is a Bundle Header Record
	BundleHeader *BundleHeader `json:"bundleHeader,omitempty"`
	// Checks are Check Items: Check Detail Records, Check Detail Addendum Records, and Image Views
	Checks []*CheckDetail `json:"checks,omitempty"`
	// Returns are Return Items: Return Detail Records, Return Detail Addendum Records, and Image Views
	Returns []*ReturnDetail `json:"returns,omitempty"`
	// BundleControl is a Bundle Control Record
	BundleControl *BundleControl `json:"bundleControl,omitempty"`
}

Bundle contains forward items (checks)

func NewBundle

func NewBundle(bh *BundleHeader) *Bundle

NewBundle takes a BundleHeader and returns a Bundle

func (*Bundle) AddCheckDetail

func (b *Bundle) AddCheckDetail(cd *CheckDetail)

AddCheckDetail appends a CheckDetail to the Bundle

func (*Bundle) AddReturnDetail

func (b *Bundle) AddReturnDetail(rd *ReturnDetail)

AddReturnDetail appends a ReturnDetail to the Bundle

func (*Bundle) GetChecks

func (b *Bundle) GetChecks() []*CheckDetail

GetChecks returns a slice of check details for the Bundle

func (*Bundle) GetControl

func (b *Bundle) GetControl() *BundleControl

GetControl returns the current Bundle Control

func (*Bundle) GetHeader

func (b *Bundle) GetHeader() *BundleHeader

GetHeader returns the current Bundle header

func (*Bundle) GetReturns

func (b *Bundle) GetReturns() []*ReturnDetail

GetReturns returns a slice of return details for the Bundle

func (*Bundle) SetControl

func (b *Bundle) SetControl(bundleControl *BundleControl)

SetControl appends an BundleControl to the Bundle

func (*Bundle) SetHeader

func (b *Bundle) SetHeader(bundleHeader *BundleHeader)

SetHeader appends an BundleHeader to the Bundle

func (*Bundle) Validate

func (b *Bundle) Validate() error

Validate performs imagecashletter validations and format rule checks and returns an error if not Validated

func (*Bundle) ValidateForwardItems

func (b *Bundle) ValidateForwardItems(cd *CheckDetail) error

ValidateForwardItems calls Validate function for check items

func (*Bundle) ValidateReturnItems

func (b *Bundle) ValidateReturnItems(rd *ReturnDetail) error

ValidateReturnItems calls Validate function for return items

type BundleControl

type BundleControl struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// BundleItemsCount identifies the total number of items within the bundle.
	BundleItemsCount int `json:"bundleitemsCount"`
	// BundleTotalAmount identifies the total amount of item amounts within the bundle.
	BundleTotalAmount int `json:"bundleTotalAmount"`
	// MICRValidTotalAmount identifies the total amount of all CheckDetail Records within the bundle which
	// contains 1 in the MICRValidIndicator .
	MICRValidTotalAmount int `json:"micrValidTotalAmount"`
	// BundleImagesCount identifies the total number of Image ViewDetail Records  within the bundle.
	BundleImagesCount int `json:"bundleImagesCount"`
	// UserField is used at the discretion of users of the standard.
	UserField string `json:"userField"`
	// CreditTotalIndicator identifies a code that indicates whether Credits Items are included in the totals.
	// If so they will be included in Items CashLetterItemsCount, CashLetterTotalAmount and
	// CashLetterImagesCount.
	// Values:
	// 	0: Credit Items are not included in totals
	//  1: Credit Items are included in totals
	CreditTotalIndicator int `json:"creditTotalIndicator"`
	// contains filtered or unexported fields
}

BundleControl Record

func NewBundleControl

func NewBundleControl() *BundleControl

NewBundleControl returns a new BundleControl with default values for non exported fields

func (*BundleControl) BundleImagesCountField

func (bc *BundleControl) BundleImagesCountField() string

BundleImagesCountField gets a string of the BundleImagesCount zero padded

func (*BundleControl) BundleItemsCountField

func (bc *BundleControl) BundleItemsCountField() string

BundleItemsCountField gets a string of the BundleItemsCount zero padded

func (*BundleControl) BundleTotalAmountField

func (bc *BundleControl) BundleTotalAmountField() string

BundleTotalAmountField gets a string of the BundleTotalAmount zero padded

func (*BundleControl) CreditTotalIndicatorField

func (bc *BundleControl) CreditTotalIndicatorField() string

CreditTotalIndicatorField gets a string of the CreditTotalIndicator field

func (*BundleControl) MICRValidTotalAmountField

func (bc *BundleControl) MICRValidTotalAmountField() string

MICRValidTotalAmountField gets a string of the MICRValidTotalAmount zero padded

func (*BundleControl) Parse

func (bc *BundleControl) Parse(record string)

Parse takes the input record string and parses the BundleControl values

func (*BundleControl) String

func (bc *BundleControl) String() string

String writes the BundleControl struct to a string.

func (*BundleControl) UnmarshalJSON added in v0.5.0

func (bc *BundleControl) UnmarshalJSON(data []byte) error

func (*BundleControl) UserFieldField

func (bc *BundleControl) UserFieldField() string

UserFieldField gets the UserField field

func (*BundleControl) Validate

func (bc *BundleControl) Validate() error

Validate performs image cash letter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type BundleError

type BundleError struct {
	BundleSequenceNumber string
	FieldName            string
	Msg                  string
}

BundleError is an Error that describes bundle validation issues

func (*BundleError) Error

func (e *BundleError) Error() string

type BundleHeader

type BundleHeader struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// A code that identifies the type of bundle. It is the same value as the CollectionTypeIndicator
	// in the CashLetterHeader within which the bundle is contained, unless the CollectionTypeIndicator
	// in the CashLetterHeader is 99.
	// Values:
	// 00: Preliminary Forward Information–Used when information may change and the information is treated
	// as not final.
	// 01: Forward Presentment–For the collection and settlement of checks (demand instruments).
	// Data are treated as final.
	// 02: Forward Presentment–Same-Day Settlement–For the collection and settlement of checks (demand instruments)
	// presented under the Federal Reserve’s same day settlement amendments to Regulation CC (12CFR Part 229).
	// Data are treated as final.
	// 03: Return–For the return of check(s). Transaction carries value. Data are treated as final.
	// 04: Return Notification–For the notification of return of check(s). Transaction carries no value. The Return
	// Notification Indicator (Field 12) in the Return Record (Type 31) has to be interrogated to determine whether a
	// notice is a preliminary or final notification.
	// 05: Preliminary Return Notification–For the notification of return of check(s). Transaction carries no value.
	// Used to indicate that an item may be returned. This field supersedes the Return Notification Indicator
	// (Field 12) in the Return Record (Type 31).
	// 06: Final Return Notification–For the notification of return of check(s). Transaction carries no value. Used to
	// indicate that an item will be returned. This field supersedes the Return Notification Indicator (Field 12)
	// in the Return Record (Type 31).
	CollectionTypeIndicator string `json:"collectionTypeIndicator"`
	// DestinationRoutingNumber contains the routing and transit number of the institution that
	// receives and processes the cash letter or the bundle.  Format: TTTTAAAAC, where:
	//  TTTT Federal Reserve Prefix
	//  AAAA ABA Institution Identifier
	//  C Check Digit
	//	For a number that identifies a non-financial institution: NNNNNNNNN
	DestinationRoutingNumber string `json:"destinationRoutingNumber"`
	// ECEInstitutionRoutingNumber contains the routing and transit number of the institution that
	// that creates the bundle header.  Format: TTTTAAAAC, where:
	//	TTTT Federal Reserve Prefix
	//	AAAA ABA Institution Identifier
	//	C Check Digit
	//	For a number that identifies a non-financial institution: NNNNNNNNN
	ECEInstitutionRoutingNumber string `json:"eceInstitutionRoutingNumber"`
	// BundleBusinessDate is the business date of the bundle.
	// Values:
	// YYYY 1993 through 9999
	// MM 01 through 12
	// DD 01 through 31
	BundleBusinessDate time.Time `json:"bundleBusinessDate"`
	// BundleCreationDate is the date that the bundle is created. It is Eastern Time zone format unless
	// different clearing arrangements have been made
	// Format: YYYYMMDD, where: YYYY year, MM month, DD day
	// Values:
	// YYYY 1993 through 9999
	// MM 01 through 12
	// DD 01 through 31
	BundleCreationDate time.Time `json:"bundleCreationDate"`
	// BundleID is number that identifies the bundle, assigned by the institution that creates the bundle.
	BundleID string `json:"bundleID"`
	// BundleSequenceNumber is a number assigned by the institution that creates the bundle. Usually denotes
	// the relative position of the bundle within the cash letter.  NumericBlank
	BundleSequenceNumber string `json:"BundleSequenceNumber,omitempty"`
	// CycleNumber is a code assigned by the institution that creates the bundle.  Denotes the cycle under which
	// the bundle is created.
	CycleNumber string `json:"cycleNumber"`
	// ReturnLocationRoutingNumber is a bank routing number used by some processors.
	// This will be blank in the resulting file if it is empty.
	ReturnLocationRoutingNumber string `json:"returnLocationRoutingNumber,omitempty"`
	// UserField identifies a field used at the discretion of users of the standard.
	UserField string `json:"userField"`
	// contains filtered or unexported fields
}

BundleHeader Record

func NewBundleHeader

func NewBundleHeader() *BundleHeader

NewBundleHeader returns a new BundleHeader with default values for non exported fields

func (*BundleHeader) BundleBusinessDateField

func (bh *BundleHeader) BundleBusinessDateField() string

BundleBusinessDateField gets the BundleBusinessDate in YYYYMMDD format

func (*BundleHeader) BundleCreationDateField

func (bh *BundleHeader) BundleCreationDateField() string

BundleCreationDateField gets the BundleCreationDate in YYYYMMDD format

func (*BundleHeader) BundleIDField

func (bh *BundleHeader) BundleIDField() string

BundleIDField gets the BundleID field space padded

func (*BundleHeader) BundleSequenceNumberField

func (bh *BundleHeader) BundleSequenceNumberField() string

BundleSequenceNumberField gets the BundleSequenceNumber field zero padded

func (*BundleHeader) CollectionTypeIndicatorField

func (bh *BundleHeader) CollectionTypeIndicatorField() string

CollectionTypeIndicatorField gets the CollectionTypeIndicator field

func (*BundleHeader) CycleNumberField

func (bh *BundleHeader) CycleNumberField() string

CycleNumberField gets the CycleNumber field

func (*BundleHeader) DestinationRoutingNumberField

func (bh *BundleHeader) DestinationRoutingNumberField() string

DestinationRoutingNumberField gets the DestinationRoutingNumber field

func (*BundleHeader) ECEInstitutionRoutingNumberField

func (bh *BundleHeader) ECEInstitutionRoutingNumberField() string

ECEInstitutionRoutingNumberField gets the ECEInstitutionRoutingNumber field

func (*BundleHeader) Parse

func (bh *BundleHeader) Parse(record string)

Parse takes the input record string and parses the BundleHeader values

func (*BundleHeader) ReturnLocationRoutingNumberField added in v0.5.0

func (bh *BundleHeader) ReturnLocationRoutingNumberField() string

ReturnLocationRoutingNumberField gets the ReturnLocationRoutingNumber field or spaces if blank

func (*BundleHeader) SetBundleSequenceNumber

func (bh *BundleHeader) SetBundleSequenceNumber(seq int) string

SetBundleSequenceNumber sets BundleSequenceNumber

func (*BundleHeader) String

func (bh *BundleHeader) String() string

String writes the BundleHeader struct to a string.

func (*BundleHeader) UnmarshalJSON added in v0.5.0

func (bh *BundleHeader) UnmarshalJSON(data []byte) error

func (*BundleHeader) UserFieldField

func (bh *BundleHeader) UserFieldField() string

UserFieldField gets the UserField field

func (*BundleHeader) Validate

func (bh *BundleHeader) Validate() error

Validate performs imagecashletter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type CashLetter

type CashLetter struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`
	// CashLetterHeader is a Cash Letter Header Record
	CashLetterHeader *CashLetterHeader `json:"cashLetterHeader,omitempty"`
	// Bundles is an array of Bundle
	Bundles []*Bundle `json:"bundles,omitempty"`
	// Credits is an array of Credit
	Credits []*Credit `json:"credit,omitempty"`
	// CreditItems is an array of CreditItem
	CreditItems []*CreditItem `json:"creditItem,omitempty"`
	// RoutingNumberSummary is an array of RoutingNumberSummary
	RoutingNumberSummary []*RoutingNumberSummary `json:"routingNumberSummary,omitempty"`

	// CashLetterControl is a Cash Letter Control Record
	CashLetterControl *CashLetterControl `json:"cashLetterControl,omitempty"`
	// contains filtered or unexported fields
}

CashLetter contains CashLetterHeader, CashLetterControl and Bundle records.

func NewCashLetter

func NewCashLetter(clh *CashLetterHeader) CashLetter

NewCashLetter takes a CashLetterHeader and returns a CashLetter

func (*CashLetter) AddBundle

func (cl *CashLetter) AddBundle(bundle *Bundle) []*Bundle

AddBundle appends a Bundle to the CashLetter

func (*CashLetter) AddCredit added in v0.9.0

func (cl *CashLetter) AddCredit(cr *Credit) []*Credit

AddCredit appends a CreditItem to the CashLetter

func (*CashLetter) AddCreditItem

func (cl *CashLetter) AddCreditItem(ci *CreditItem) []*CreditItem

AddCreditItem appends a CreditItem to the CashLetter

func (*CashLetter) AddRoutingNumberSummary

func (cl *CashLetter) AddRoutingNumberSummary(rns *RoutingNumberSummary) []*RoutingNumberSummary

AddRoutingNumberSummary appends a RoutingNumberSummary to the CashLetter

func (*CashLetter) Create

func (cl *CashLetter) Create() error

Create creates a CashLetter of Bundles containing CheckDetail or ReturnDetail

func (*CashLetter) GetBundles

func (cl *CashLetter) GetBundles() []*Bundle

GetBundles returns a slice of Bundle for the CashLetter

func (*CashLetter) GetControl

func (cl *CashLetter) GetControl() *CashLetterControl

GetControl returns the current CashLetter Control

func (*CashLetter) GetCreditItems

func (cl *CashLetter) GetCreditItems() []*CreditItem

GetCreditItems returns a slice of CreditItem for the CashLetter

func (*CashLetter) GetCredits added in v0.9.0

func (cl *CashLetter) GetCredits() []*Credit

GetCredits returns a slice of Credit for the CashLetter

func (*CashLetter) GetHeader

func (cl *CashLetter) GetHeader() *CashLetterHeader

GetHeader returns the current CashLetter header

func (*CashLetter) GetRoutingNumberSummary

func (cl *CashLetter) GetRoutingNumberSummary() []*RoutingNumberSummary

GetRoutingNumberSummary returns a slice of RoutingNumberSummary for the CashLetter

func (*CashLetter) SetControl

func (cl *CashLetter) SetControl(cashLetterControl *CashLetterControl)

SetControl appends a CashLetterControl to the CashLetter

func (*CashLetter) SetHeader

func (cl *CashLetter) SetHeader(cashLetterHeader *CashLetterHeader)

SetHeader appends a CashLetterHeader to the CashLetter

func (*CashLetter) Validate

func (cl *CashLetter) Validate() error

Validate performs ImageCashLetter validations and format rule checks and returns an error if not Validated

type CashLetterControl

type CashLetterControl struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// CashLetterBundleCount identifies the total number of bundles within the cash letter.
	CashLetterBundleCount int `json:"cashLetterBundleCount"`
	// CashLetterItemsCount identifies the total number of items within the cash letter.
	CashLetterItemsCount int `json:"cashLetterItemsCount"`
	// CashLetterTotalAmount identifies the total dollar value of all item amounts within the cash letter.
	CashLetterTotalAmount int `json:"cashLetterTotalAmount"`
	// CashLetterImagesCount identifies the total number of ImageViewDetail(s) within the CashLetter.
	CashLetterImagesCount int `json:"cashLetterImagesCount"`
	// ECEInstitutionName identifies the short name of the institution that creates the CashLetterControl.
	ECEInstitutionName string `json:"eceInstitutionName"`
	// SettlementDate identifies the date that the institution that creates the cash letter expects settlement.
	// Format: YYYYMMDD, where: YYYY year, MM month, DD day
	// Values:
	// YYYY 1993 through 9999
	// MM 01 through 12
	// DD 01 through 31
	SettlementDate time.Time `json:"settlementDate"`
	// CreditTotalIndicator identifies a code that indicates whether Credits Items are included in the totals.
	// If so they will be included in Items CashLetterItemsCount, CashLetterTotalAmount and CashLetterImagesCount.
	// Values:
	// 	0: Credit Items are not included in totals
	//  1: Credit Items are included in totals
	CreditTotalIndicator int `json:"creditTotalIndicator"`
	// contains filtered or unexported fields
}

CashLetterControl Record

func NewCashLetterControl

func NewCashLetterControl() *CashLetterControl

NewCashLetterControl returns a new CashLetterControl with default values for non exported fields

func (*CashLetterControl) CashLetterBundleCountField

func (clc *CashLetterControl) CashLetterBundleCountField() string

CashLetterBundleCountField gets a string of the CashLetterBundleCount zero padded

func (*CashLetterControl) CashLetterImagesCountField

func (clc *CashLetterControl) CashLetterImagesCountField() string

CashLetterImagesCountField gets a string of the CashLetterImagesCount zero padded

func (*CashLetterControl) CashLetterItemsCountField

func (clc *CashLetterControl) CashLetterItemsCountField() string

CashLetterItemsCountField gets a string of the CashLetterItemsCount zero padded

func (*CashLetterControl) CashLetterTotalAmountField

func (clc *CashLetterControl) CashLetterTotalAmountField() string

CashLetterTotalAmountField gets a string of the CashLetterTotalAmount zero padded

func (*CashLetterControl) CreditTotalIndicatorField

func (clc *CashLetterControl) CreditTotalIndicatorField() string

CreditTotalIndicatorField gets a string of the CreditTotalIndicator field

func (*CashLetterControl) ECEInstitutionNameField

func (clc *CashLetterControl) ECEInstitutionNameField() string

ECEInstitutionNameField gets the ECEInstitutionName field

func (*CashLetterControl) Parse

func (clc *CashLetterControl) Parse(record string)

Parse takes the input record string and parses the CashLetterControl values

func (*CashLetterControl) SettlementDateField

func (clc *CashLetterControl) SettlementDateField() string

SettlementDateField gets the SettlementDate in YYYYMMDD format

func (*CashLetterControl) String

func (clc *CashLetterControl) String() string

String writes the CashLetterControl struct to a string.

func (*CashLetterControl) UnmarshalJSON added in v0.5.0

func (clc *CashLetterControl) UnmarshalJSON(data []byte) error

func (*CashLetterControl) Validate

func (clc *CashLetterControl) Validate(collectionTypeIndicator string) error

Validate performs imagecashletter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type CashLetterError

type CashLetterError struct {
	CashLetterID string
	FieldName    string
	Msg          string
}

CashLetterError is an Error that describes CashLetter validation issues

func (*CashLetterError) Error

func (e *CashLetterError) Error() string

type CashLetterHeader

type CashLetterHeader struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// CollectionTypeIndicator is a code that identifies the type of cash letter.
	// Values:
	// 00: Preliminary Forward Information–Used when information may change and the
	// information is treated as not final.
	// 01: Forward Presentment–For the collection and settlement of checks (demand
	// instruments). Data are treated as final.
	// 02: Forward Presentment–Same-Day Settlement–For the collection and settlement of
	// checks (demand instruments) presented under the Federal Reserve’s same day
	// settlement amendments to Regulation CC (12CFR Part 229). Data are treated as
	// final.
	// 03: Return–For the return of check(s). Transaction carries value. Data are
	// treated as final.
	// 04: Return Notification–For the notification of return of check(s). Transaction
	// carries no value. The Return Notification Indicator (Field 12) in the Return Record
	// (Type 31) has to be interrogated to determine whether a notice is a preliminary or final
	// notification.
	// 05: Preliminary Return Notification–For the notification of return of check(s). Transaction
	// carries no value. Used to indicate that an item may be returned. This field supersedes
	// the Return Notification Indicator (Field 12) in the Return Record (Type 31).
	// 06: Final Return Notification–For the notification of return of check(s). Transaction
	// carries no value. Used to indicate that an item will be returned. This field
	// supersedes the Return Notification Indicator (Field 12) in the Return Record (Type 31).
	// 20: No Detail–There are no detail records contained within the bundle or cash letter.
	// Defined Value of the Cash Letter Record Type Indicator (Field 8) shall be set to ‘N’.
	// 99: Bundles not the same collection type. Use of the value is only allowed by clearing
	// arrangement.
	CollectionTypeIndicator string `json:"collectionTypeIndicator"`
	// DestinationRoutingNumber contains the routing and transit number of the institution that
	// receives and processes the cash letter or the bundle.  Format: TTTTAAAAC, where:
	//  TTTT Federal Reserve Prefix
	//  AAAA ABA Institution Identifier
	//  C Check Digit
	//	For a number that identifies a non-financial institution: NNNNNNNNN
	DestinationRoutingNumber string `json:"destinationRoutingNumber"`
	// ECEInstitutionRoutingNumber contains the routing and transit number of the institution that
	// that creates the Cash Letter Header Record.  Format: TTTTAAAAC, where:
	//  TTTT Federal Reserve Prefix
	//  AAAA ABA Institution Identifier
	//  C Check Digit
	//	For a number that identifies a non-financial institution: NNNNNNNNN
	ECEInstitutionRoutingNumber string `json:"eceInstitutionRoutingNumber"`
	// CashLetterBusinessDate is the business date of the cash letter.
	// Format: YYYYMMDD, where: YYYY year, MM month, DD day
	// Values:
	// YYYY 1993 through 9999
	// MM 01 through 12
	// DD 01 through 31
	CashLetterBusinessDate time.Time `json:"cashLetterBusinessDate"`
	// CashLetterCreationDate is the date that the cash letter is created which shall be in Eastern
	// Time zone format. Other time zones may be used under clearing arrangements.
	// Format: YYYYMMDD, where: YYYY year, MM month, DD day
	// Values:
	// YYYY 1993 through 9999
	// MM 01 through 12
	// DD 01 through 31
	CashLetterCreationDate time.Time `json:"cashLetterCreationDate"`
	// CashLetterCreationTime is the time that the cash letter is created.  Default time shall be in
	// Eastern Time zone format. Other time zones may be used under clearing arrangements.
	// Format: hhmm, where: hh hour, mm minute
	// Values:
	// hh '00' through '23'
	// mm '00' through '59'
	CashLetterCreationTime time.Time `json:"cashLetterCreationTime"`
	// RecordTypeIndicator is a code that indicates the presence of records or the type of records contained
	// in the cash letter.   If an image is associated with any CheckDetail or Return, the cash letter must have a
	// CashLetter.RecordTypeIndicator of I or F.
	// Values:
	// N: No electronic check records or image records (Type 2x’s, 3x’s, 5x’s); e.g., an empty cash letter.
	// E: Cash letter contains electronic check records with no images (Type 2x’s and 3x’s only).
	// I: Cash letter contains electronic check records (Type 2x’s, 3x’s) and image records (Type 5x’s).
	// F: Cash letter contains electronic check records (Type 2x’s and 3x’s) and image records (Type 5x’s)
	// that correspond to a previously sent cash letter (i.e., E file).
	//
	// The fields in this file that contain posting data shall not be changed from the previously sent CashLetter
	// with CollectionTypeIndicator values of 01, 02 or 03. ItemsCount and TotalAmount of the CashLetterControl with
	// a RecordTypeIndicator value of F must equal the corresponding fields in a CashLetter with a RecordTypeIndicator
	// value of E.
	RecordTypeIndicator string `json:"recordTypeIndicator"`
	// DocumentationTypeIndicator is a code that indicates the type of documentation that supports
	// all check records in the cash letter
	// Values:
	// A: No image provided, paper provided separately
	// B: No image provided, paper provided separately, image upon request
	// C: Image provided separately, no paper provided
	// D: Image provided separately, no paper provided, image upon request
	// E: Image and paper provided separately
	// F: Image and paper provided separately, image upon request
	// G: Image included, no paper provided
	// H: Image included, no paper provided, image upon request
	// I: Image included, paper provided separately
	// J: Image included, paper provided separately, image upon request
	// K: No image provided, no paper provided
	// L: No image provided, no paper provided, image upon request
	// M: No image provided, Electronic Check provided separately
	// Z: Not Same Type–Documentation associated with each item in Cash Letter will be different. The Check Detail
	// Record (Type 25) or Return Record (Type 31) has to be interrogated for further information.
	DocumentationTypeIndicator string `json:"DocumentationTypeIndicator"`
	// CashLetterID uniquely identifies the cash letter. It is assigned by the institution that creates the cash
	// letter and must be unique within a Cash Letter Business Date.
	CashLetterID string `json:"cashLetterID"`
	// OriginatorContactName is the name of contact at the institution that creates the cash letter.
	OriginatorContactName string `json:"originatorContactName"`
	// OriginatorContactPhoneNumber is the phone number of the contact at the institution that creates
	// the cash letter.
	OriginatorContactPhoneNumber string `json:"originatorContactPhoneNumber"`
	// FedWorkType is any valid codes specified by the Federal Reserve Bank.
	FedWorkType string `json:"fedWorkType"`
	// ReturnsIndicator identifies type pf returns.
	// Values:
	// "": Blank for Forward Presentment
	// E: Administrative - items being returned that are handled by the bank and usually do not directly
	// affect the customer or its account.
	// R: Customer–items being returned that directly affect a customer’s account.
	// J: Reject Return
	ReturnsIndicator string `json:"returnsIndicator"`
	// UserField is a field used at the discretion of users of the standard.
	UserField string `json:"userField"`
	// contains filtered or unexported fields
}

CashLetterHeader Record is mandatory.

func NewCashLetterHeader

func NewCashLetterHeader() *CashLetterHeader

NewCashLetterHeader returns a new CashLetterHeader with default values for non exported fields

func (*CashLetterHeader) CashLetterBusinessDateField

func (clh *CashLetterHeader) CashLetterBusinessDateField() string

CashLetterBusinessDateField gets the CashLetterBusinessDate in YYYYMMDD format

func (*CashLetterHeader) CashLetterCreationDateField

func (clh *CashLetterHeader) CashLetterCreationDateField() string

CashLetterCreationDateField gets the CashLetterCreationDate in YYYYMMDD format

func (*CashLetterHeader) CashLetterCreationTimeField

func (clh *CashLetterHeader) CashLetterCreationTimeField() string

CashLetterCreationTimeField gets the CashLetterCreationTime in HHMM format

func (*CashLetterHeader) CashLetterIDField

func (clh *CashLetterHeader) CashLetterIDField() string

CashLetterIDField gets the CashLetterID field

func (*CashLetterHeader) CollectionTypeIndicatorField

func (clh *CashLetterHeader) CollectionTypeIndicatorField() string

CollectionTypeIndicatorField gets the CollectionTypeIndicator field

func (*CashLetterHeader) DestinationRoutingNumberField

func (clh *CashLetterHeader) DestinationRoutingNumberField() string

DestinationRoutingNumberField gets the DestinationRoutingNumber field

func (*CashLetterHeader) DocumentationTypeIndicatorField

func (clh *CashLetterHeader) DocumentationTypeIndicatorField() string

DocumentationTypeIndicatorField gets the DocumentationTypeIndicator field

func (*CashLetterHeader) ECEInstitutionRoutingNumberField

func (clh *CashLetterHeader) ECEInstitutionRoutingNumberField() string

ECEInstitutionRoutingNumberField gets the ECEInstitutionRoutingNumber field

func (*CashLetterHeader) FedWorkTypeField

func (clh *CashLetterHeader) FedWorkTypeField() string

FedWorkTypeField gets the FedWorkType field

func (*CashLetterHeader) OriginatorContactNameField

func (clh *CashLetterHeader) OriginatorContactNameField() string

OriginatorContactNameField gets the OriginatorContactName field

func (*CashLetterHeader) OriginatorContactPhoneNumberField

func (clh *CashLetterHeader) OriginatorContactPhoneNumberField() string

OriginatorContactPhoneNumberField gets the OriginatorContactPhoneNumber field

func (*CashLetterHeader) Parse

func (clh *CashLetterHeader) Parse(record string)

Parse takes the input record string and parses the CashLetterHeader values

func (*CashLetterHeader) RecordTypeIndicatorField

func (clh *CashLetterHeader) RecordTypeIndicatorField() string

RecordTypeIndicatorField gets the RecordTypeIndicator field

func (*CashLetterHeader) ReturnsIndicatorField

func (clh *CashLetterHeader) ReturnsIndicatorField() string

ReturnsIndicatorField gets the ReturnsIndicator field

func (*CashLetterHeader) String

func (clh *CashLetterHeader) String() string

String writes the CashLetterHeader struct to a string.

func (*CashLetterHeader) UnmarshalJSON added in v0.5.0

func (clh *CashLetterHeader) UnmarshalJSON(data []byte) error

func (*CashLetterHeader) UserFieldField

func (clh *CashLetterHeader) UserFieldField() string

UserFieldField gets the UserField field

func (*CashLetterHeader) Validate

func (clh *CashLetterHeader) Validate() error

Validate performs imagecashletter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type CheckDetail

type CheckDetail struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// AuxiliaryOnUs identifies a code used on commercial checks at the discretion of the payor bank.
	AuxiliaryOnUs string `json:"auxiliaryOnUs"`
	// ExternalProcessingCode identifies a code used for special purposes as authorized by the Accredited
	// Standards Committee X9. Also known as Position 44.
	ExternalProcessingCode string `json:"externalProcessingCode"`
	// PayorBankRoutingNumber identifies a number that identifies the institution by or through which the item is
	// payable. Must be a valid routing and transit number issued by the ABA’s Routing Number Registrar. Shall
	// represent the first 8 digits of a 9-digit routing number or 8 numeric digits of a 4 dash 4 routing number.
	// A valid routing number consists of 2 fields: the eight- digit Payor Bank Routing Number  and the
	// one-digit Payor Bank Routing Number Check Digit.
	// Format: TTTTAAAA, where:
	// TTTT: Federal Reserve Prefix
	// AAAA: ABA Institution Identifier
	PayorBankRoutingNumber string `json:"payorBankRoutingNumber"`
	// PayorBankCheckDigit identifies a digit representing the routing number check digit. The combination of Payor
	// Bank Routing Number and payor Bank Routing Number Check Digit  must be a mod-checked routing number with a
	// valid check digit.
	PayorBankCheckDigit string `json:"payorBankCheckDigit"`
	// OnUs identifies data specified by the payor bank. On-Us data usually consists of the payor’s account number,
	// a serial number or transaction code, or both.
	OnUs string `json:"onUs"`
	// Amount identifies the amount of the check.  All amounts fields have two implied decimal points.
	// e.g., 100000 is $1,000.00
	ItemAmount int `json:"itemAmount"`
	// EceInstitutionItemSequenceNumber identifies a number assigned by the institution that creates the CheckDetail.
	// Field must contain a numeric value. It cannot be all blanks.
	EceInstitutionItemSequenceNumber string `json:"eceInstitutionItemSequenceNumber"`
	// DocumentationTypeIndicator identifies a code that indicates the type of documentation that supports the check
	// record.
	// This field is superseded by the Cash Letter Documentation Type Indicator in the Cash Letter Header
	// Record (Type 10) for all Defined Values except ‘Z’ Not Same Type. In the case of Defined Value of ‘Z’, the
	// Documentation Type Indicator in this record takes precedent.
	//
	// Shall be present when Cash Letter Documentation Type Indicator (Field 9) in the Cash Letter Header Record
	// (Type 10) is Defined Value of ‘Z’.
	//
	// Values:
	// A: No image provided, paper provided separately
	// B: No image provided, paper provided separately, image upon request
	// C:	Image provided separately, no paper provided
	// D: Image provided separately, no paper provided, image upon request
	// E:	Image and paper provided separately
	// F: Image and paper provided separately, image upon request
	// G: Image included, no paper provided
	// H: Image included, no paper provided, image upon request
	// I:	Image included, paper provided separately
	// J: Image included, paper provided separately, image upon request
	// K:	No image provided, no paper provided
	// L: No image provided, no paper provided, image upon request
	// M: No image provided, Electronic Check provided separately
	DocumentationTypeIndicator string `json:"documentationTypeIndicator"`
	// ReturnAcceptanceIndicator is a code that indicates whether the institution that creates the CheckDetail
	// will or will not support electronic return processing.
	// Values:
	// 0:	Will not accept any electronic information
	// 1:	Will accept preliminary return notifications, returns, and final return notifications
	// 2:	Will accept preliminary return notifications and returns
	// 3:	Will accept preliminary return notifications and final return notifications
	// 4:	Will accept returns and final return notifications
	// 5:	Will accept preliminary return notifications only
	// 6:	Will accept returns only
	// 7:	Will accept final return notifications only
	// 8:	Will accept preliminary return notifications, returns, final return notifications, and image returns
	// 9:	Will accept preliminary return notifications, returns and image returns
	// A:	Will accept preliminary return notifications, final return notifications and image returns
	// B:	Will accept returns, final return notifications and image returns
	// C:	Will accept preliminary return notifications and image returns
	// D:	Will accept returns and image returns
	// E:	Will accept final return notifications and image returns
	// F:	Will accept image returns only
	ReturnAcceptanceIndicator string `json:"returnAcceptanceIndicator"`
	// MICRValidIndicator is a code that indicates whether any character in the Magnetic Ink Character Recognition
	// (MICR) property is unreadable, or the OnUs property is missing from the CheckDetail.
	// 1: Good read
	// 2: Good read, missing field
	// 3: Read error encountered
	// 4: Missing field and read error encountered
	MICRValidIndicator int `json:"micrValidIndicator"`
	// BOFDIndicator is a code that indicates whether the ECE institution indicated on the Bundle Header Record (Type 20)
	// is the Bank of First Deposit (BOFD). This field shall be consistent with values contained in the Check Detail
	// Addendum A Record (Type 26) and Check Detail Addendum C Record (Type 28).
	// Values:
	// Y: ECE institution is BOFD
	// N: ECE institution is not BOFD
	// U: ECE institution relationship to BOFD is undetermined
	BOFDIndicator string `json:"bofdIndicator"`
	// AddendumCount is a number of Check Detail Record Addenda to follow. This represents the number of
	// CheckDetailAddendumA, CheckDetailAddendumB and CheckDetailAddendumC types.  It matches the total number
	// of addendum records associated with this item. The standard supports up to 99 addendum records.
	AddendumCount int `json:"addendumCount"`
	// CorrectionIndicator identifies whether and how the MICR line was repaired, for fields other than Payor Bank
	// Routing Number and Amount.
	// Values:
	// 0: No Repair
	// 1: Repaired (form of repair unknown)
	// 2: Repaired without Operator intervention
	// 3: Repaired with Operator intervention
	// 4: Undetermined if repair has been done or not
	CorrectionIndicator int `json:"correctionIndicator"`
	// ArchiveTypeIndicator is a code that indicates the type of archive that supports this CheckDetail.
	// Access method, availability and time-frames shall be defined by clearing arrangements.
	// Values:
	// A: Microfilm
	// B: Image
	// C: Paper
	// D: Microfilm and image
	// E: Microfilm and paper
	// F: Image and paper
	// G: Microfilm, image and paper
	// H: Electronic Check Instrument
	// I: None
	ArchiveTypeIndicator string `json:"archiveTypeIndicator"`
	// CheckDetailAddendumA
	CheckDetailAddendumA []CheckDetailAddendumA `json:"checkDetailAddendumA"`
	// CheckDetailAddendumB
	CheckDetailAddendumB []CheckDetailAddendumB `json:"checkDetailAddendumB"`
	// CheckDetailAddendumC
	CheckDetailAddendumC []CheckDetailAddendumC `json:"checkDetailAddendumC"`
	// ImageViewDetail
	ImageViewDetail []ImageViewDetail `json:"imageViewDetail"`
	// ImageViewData
	ImageViewData []ImageViewData `json:"imageViewData"`
	// ImageViewAnalysis
	ImageViewAnalysis []ImageViewAnalysis `json:"imageViewAnalysis"`
	// contains filtered or unexported fields
}

CheckDetail Record

func NewCheckDetail

func NewCheckDetail() *CheckDetail

NewCheckDetail returns a new CheckDetail with default values for non exported fields

func (*CheckDetail) AddCheckDetailAddendumA

func (cd *CheckDetail) AddCheckDetailAddendumA(cdAddendaA CheckDetailAddendumA) []CheckDetailAddendumA

AddCheckDetailAddendumA appends an AddendumA to the CheckDetail

func (*CheckDetail) AddCheckDetailAddendumB

func (cd *CheckDetail) AddCheckDetailAddendumB(cdAddendaB CheckDetailAddendumB) []CheckDetailAddendumB

AddCheckDetailAddendumB appends an AddendumA to the CheckDetail

func (*CheckDetail) AddCheckDetailAddendumC

func (cd *CheckDetail) AddCheckDetailAddendumC(cdAddendaC CheckDetailAddendumC) []CheckDetailAddendumC

AddCheckDetailAddendumC appends an AddendumC to the CheckDetail

func (*CheckDetail) AddImageViewAnalysis

func (cd *CheckDetail) AddImageViewAnalysis(ivAnalysis ImageViewAnalysis) []ImageViewAnalysis

AddImageViewAnalysis appends an ImageViewAnalysis to the CheckDetail

func (*CheckDetail) AddImageViewData

func (cd *CheckDetail) AddImageViewData(ivData ImageViewData) []ImageViewData

AddImageViewData appends an ImageViewData to the CheckDetail

func (*CheckDetail) AddImageViewDetail

func (cd *CheckDetail) AddImageViewDetail(ivDetail ImageViewDetail) []ImageViewDetail

AddImageViewDetail appends an ImageViewDetail to the CheckDetail

func (*CheckDetail) AddendumCountField

func (cd *CheckDetail) AddendumCountField() string

AddendumCountField gets a string of the AddendumCount field

func (*CheckDetail) ArchiveTypeIndicatorField

func (cd *CheckDetail) ArchiveTypeIndicatorField() string

ArchiveTypeIndicatorField gets the ArchiveTypeIndicator field

func (*CheckDetail) AuxiliaryOnUsField

func (cd *CheckDetail) AuxiliaryOnUsField() string

AuxiliaryOnUsField gets the AuxiliaryOnUs field

func (*CheckDetail) BOFDIndicatorField

func (cd *CheckDetail) BOFDIndicatorField() string

BOFDIndicatorField gets the BOFDIndicator field

func (*CheckDetail) CorrectionIndicatorField

func (cd *CheckDetail) CorrectionIndicatorField() string

CorrectionIndicatorField gets a string of the CorrectionIndicator field

func (*CheckDetail) DocumentationTypeIndicatorField

func (cd *CheckDetail) DocumentationTypeIndicatorField() string

DocumentationTypeIndicatorField gets the DocumentationTypeIndicator field

func (*CheckDetail) EceInstitutionItemSequenceNumberField

func (cd *CheckDetail) EceInstitutionItemSequenceNumberField() string

EceInstitutionItemSequenceNumberField gets a string of the EceInstitutionItemSequenceNumber field

func (*CheckDetail) ExternalProcessingCodeField

func (cd *CheckDetail) ExternalProcessingCodeField() string

ExternalProcessingCodeField gets the ExternalProcessingCode field - Also known as Position 44

func (*CheckDetail) GetCheckDetailAddendumA

func (cd *CheckDetail) GetCheckDetailAddendumA() []CheckDetailAddendumA

GetCheckDetailAddendumA returns a slice of AddendumA for the CheckDetail

func (*CheckDetail) GetCheckDetailAddendumB

func (cd *CheckDetail) GetCheckDetailAddendumB() []CheckDetailAddendumB

GetCheckDetailAddendumB returns a slice of AddendumB for the CheckDetail

func (*CheckDetail) GetCheckDetailAddendumC

func (cd *CheckDetail) GetCheckDetailAddendumC() []CheckDetailAddendumC

GetCheckDetailAddendumC returns a slice of AddendumC for the CheckDetail

func (*CheckDetail) GetImageViewAnalysis

func (cd *CheckDetail) GetImageViewAnalysis() []ImageViewAnalysis

GetImageViewAnalysis returns a slice of ImageViewAnalysis for the CheckDetail

func (*CheckDetail) GetImageViewData

func (cd *CheckDetail) GetImageViewData() []ImageViewData

GetImageViewData returns a slice of ImageViewData for the CheckDetail

func (*CheckDetail) GetImageViewDetail

func (cd *CheckDetail) GetImageViewDetail() []ImageViewDetail

GetImageViewDetail returns a slice of ImageViewDetail for the CheckDetail

func (*CheckDetail) ItemAmountField

func (cd *CheckDetail) ItemAmountField() string

ItemAmountField gets the ItemAmount right justified and zero padded

func (*CheckDetail) MICRValidIndicatorField

func (cd *CheckDetail) MICRValidIndicatorField() string

MICRValidIndicatorField gets a string of the MICRValidIndicator field

func (*CheckDetail) OnUsField

func (cd *CheckDetail) OnUsField() string

OnUsField gets the OnUs field

func (*CheckDetail) Parse

func (cd *CheckDetail) Parse(record string)

Parse takes the input record string and parses the CheckDetail values

func (*CheckDetail) PayorBankCheckDigitField

func (cd *CheckDetail) PayorBankCheckDigitField() string

PayorBankCheckDigitField gets the PayorBankCheckDigit field

func (*CheckDetail) PayorBankRoutingNumberField

func (cd *CheckDetail) PayorBankRoutingNumberField() string

PayorBankRoutingNumberField gets the PayorBankRoutingNumber field

func (*CheckDetail) ReturnAcceptanceIndicatorField

func (cd *CheckDetail) ReturnAcceptanceIndicatorField() string

ReturnAcceptanceIndicatorField gets the ReturnAcceptanceIndicator field

func (*CheckDetail) SetEceInstitutionItemSequenceNumber

func (cd *CheckDetail) SetEceInstitutionItemSequenceNumber(seq int) string

SetEceInstitutionItemSequenceNumber sets EceInstitutionItemSequenceNumber

func (*CheckDetail) String

func (cd *CheckDetail) String() string

String writes the CheckDetail struct to a variable length string.

func (*CheckDetail) UnmarshalJSON added in v0.5.0

func (cd *CheckDetail) UnmarshalJSON(data []byte) error

func (*CheckDetail) Validate

func (cd *CheckDetail) Validate() error

Validate performs imagecashletter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type CheckDetailAddendumA

type CheckDetailAddendumA struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// recordNumber is a number representing the order in which each CheckDetailAddendumA was created.
	// CheckDetailAddendumA shall be in sequential order starting with 1. Maximum 99.
	RecordNumber int `json:"recordNumber"`
	// RoutingNumber (Return Location Routing Number) is valid routing and transit number indicating where returns,
	// final return notifications, and preliminary return notifications are sent, usually the BOFD.
	// Format: TTTTAAAAC, where:
	// TTTT Federal Reserve Prefix
	// AAAA ABA Institution Identifier
	// C Check Digit
	// For a number that identifies a non-financial institution: NNNNNNNNN
	ReturnLocationRoutingNumber string `json:"returnLocationRoutingNumber"`
	// BOFDEndorsementDate is the date of endorsement.
	// Format: YYYYMMDD, where: YYYY year, MM month, DD day
	// Values:
	// YYYY 1993 through 9999
	// MM 01 through 12
	// DD 01 through 31
	BOFDEndorsementDate time.Time `json:"bofdEndorsementDate"`
	// BOFDItemSequenceNumber is a number that identifies the item in the CheckDetailAddendumA.
	BOFDItemSequenceNumber string `json:"bofdItemSequenceNumber"`
	// BOFDAccountNumber is a number that identifies the depository account at the Bank of First Deposit.
	BOFDAccountNumber string `json:"bofdAccountNumber"`
	// BOFDBranchCode is a code that identifies the branch at the Bank of First Deposit.
	BOFDBranchCode string `json:"bofdBranchCode"`
	// PayeeName is the name of the payee from the check.
	PayeeName string `json:"payeeName"`
	// TruncationIndicator identifies if the institution truncated the original check item.
	// Values: Y: Yes this institution truncated this original check item and this is first endorsement
	// for the institution.
	// N: No this institution did not truncate the original check or, this is not the first endorsement for the
	// institution or, this item is an IRD not an original check item (EPC equals 4).
	TruncationIndicator string `json:"truncationIndicator"`
	// BOFDConversionIndicator is a code that indicates the conversion within the processing institution between
	// original paper check, image and IRD. The indicator is specific to the action of institution that created
	// this record.
	//Values:
	// 0: Did not convert physical document
	// 1: Original paper converted to IRD
	// 2: Original paper converted to image
	// 3: IRD converted to another IRD
	// 4: IRD converted to image of IRD
	// 5: Image converted to an IRD
	// 6: Image converted to another image (e.g., transcoded)
	// 7: Did not convert image (e.g., same as source)
	// 8: Undetermined
	BOFDConversionIndicator string `json:"bofdConversionIndicator"`
	// BOFDCorrectionIndicator identifies whether and how the MICR line of this item was repaired by the
	// creator of this CheckDetailAddendumA Record for fields other than Payor Bank Routing Number and Amount.
	// Values:
	// 0: No Repair
	// 1: Repaired (form of repair unknown)
	// 2: Repaired without Operator intervention
	// 3: Repaired with Operator intervention
	// 4: Undetermined if repair has been done or not
	BOFDCorrectionIndicator int `json:"bofdCorrectionIndicator"`
	// UserField identifies a field used at the discretion of users of the standard.
	UserField string `json:"userField"`
	// contains filtered or unexported fields
}

CheckDetailAddendumA Record

func NewCheckDetailAddendumA

func NewCheckDetailAddendumA() CheckDetailAddendumA

NewCheckDetailAddendumA returns a new CheckDetailAddendumA with default values for non exported fields

func (*CheckDetailAddendumA) BOFDAccountNumberField

func (cdAddendumA *CheckDetailAddendumA) BOFDAccountNumberField() string

BOFDAccountNumberField gets the BOFDAccountNumber field

func (*CheckDetailAddendumA) BOFDBranchCodeField

func (cdAddendumA *CheckDetailAddendumA) BOFDBranchCodeField() string

BOFDBranchCodeField gets the BOFDBranchCode field

func (*CheckDetailAddendumA) BOFDConversionIndicatorField

func (cdAddendumA *CheckDetailAddendumA) BOFDConversionIndicatorField() string

BOFDConversionIndicatorField gets the BOFDConversionIndicator field

func (*CheckDetailAddendumA) BOFDCorrectionIndicatorField

func (cdAddendumA *CheckDetailAddendumA) BOFDCorrectionIndicatorField() string

BOFDCorrectionIndicatorField gets a string of the BOFDCorrectionIndicator field

func (*CheckDetailAddendumA) BOFDEndorsementDateField

func (cdAddendumA *CheckDetailAddendumA) BOFDEndorsementDateField() string

BOFDEndorsementDateField gets the BOFDEndorsementDate in YYYYMMDD format

func (*CheckDetailAddendumA) BOFDItemSequenceNumberField

func (cdAddendumA *CheckDetailAddendumA) BOFDItemSequenceNumberField() string

BOFDItemSequenceNumberField gets a string of the BOFDItemSequenceNumber field zero padded

func (*CheckDetailAddendumA) Parse

func (cdAddendumA *CheckDetailAddendumA) Parse(record string)

Parse takes the input record string and parses the CheckDetailAddendumA values

func (*CheckDetailAddendumA) PayeeNameField

func (cdAddendumA *CheckDetailAddendumA) PayeeNameField() string

PayeeNameField gets the PayeeName field

func (*CheckDetailAddendumA) RecordNumberField

func (cdAddendumA *CheckDetailAddendumA) RecordNumberField() string

RecordNumberField gets a string of the RecordNumber field

func (*CheckDetailAddendumA) ReturnLocationRoutingNumberField

func (cdAddendumA *CheckDetailAddendumA) ReturnLocationRoutingNumberField() string

ReturnLocationRoutingNumberField gets a string of the ReturnLocationRoutingNumber field

func (*CheckDetailAddendumA) SetBOFDItemSequenceNumber

func (cdAddendumA *CheckDetailAddendumA) SetBOFDItemSequenceNumber(seq int) string

SetBOFDItemSequenceNumber sets BOFDItemSequenceNumber

func (*CheckDetailAddendumA) String

func (cdAddendumA *CheckDetailAddendumA) String() string

String writes the CheckDetailAddendumA struct to a string.

func (*CheckDetailAddendumA) TruncationIndicatorField

func (cdAddendumA *CheckDetailAddendumA) TruncationIndicatorField() string

TruncationIndicatorField gets the TruncationIndicator field

func (*CheckDetailAddendumA) UnmarshalJSON added in v0.5.0

func (cdAddendumA *CheckDetailAddendumA) UnmarshalJSON(data []byte) error

func (*CheckDetailAddendumA) UserFieldField

func (cdAddendumA *CheckDetailAddendumA) UserFieldField() string

UserFieldField gets the UserField field

func (*CheckDetailAddendumA) Validate

func (cdAddendumA *CheckDetailAddendumA) Validate() error

Validate performs image cash letter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type CheckDetailAddendumB

type CheckDetailAddendumB struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// ImageReferenceKeyIndicator identifies whether ImageReferenceKeyLength contains a variable value within the
	// allowable range, or contains a defined value and the content is ItemReferenceKey.
	// Values:
	// 0: ImageReferenceKeyIndicator has Defined Value of 0034 and ImageReferenceKey contains the Image Reference Key.
	// 1: ImageReferenceKeyIndicator contains a value other than Value 0034;
	// or ImageReferenceKeyIndicator contains Value 0034, which is not a Defined Value, and the content of
	// ImageReferenceKey has no special significance with regards to an Image Reference Key;
	// or ImageReferenceKeyIndicator is 0000, meaning the ImageReferenceKey is not present.
	ImageReferenceKeyIndicator int `json:"imageReferenceKeyIndicator"`
	// MicrofilmArchiveSequenceNumber A number that identifies the item in the microfilm archive system;
	// it may be different than the Check Detail.ECEInstitutionItemSequenceNumber and from the ImageReferenceKey.
	MicrofilmArchiveSequenceNumber string `json:"microfilmArchiveSequenceNumber"`
	// ImageReferenceKeyLength is the number of characters in the ImageReferenceKey
	// Values:
	// 0034: ImageReferenceKey contains the ImageReferenceKey (ImageReferenceKeyIndicator is 0).
	// 0000: ImageReferenceKey not present (ImageReferenceKeyIndicator is 1).
	// 0001 - 9999: May include Value 0034, and ImageReferenceKey has no special significance to
	// Image Reference Key (ImageReferenceKey is 1).
	LengthImageReferenceKey string `json:"imageReferenceKeyLength"`
	// ImageReferenceKey  is used to find the image of the item in the image data system.
	ImageReferenceKey string `json:"imageReferenceKey"`
	//Description describes the transaction
	Description string `json:"description"`
	// UserField identifies a field used at the discretion of users of the standard.
	UserField string `json:"userField"`
	// contains filtered or unexported fields
}

CheckDetailAddendumB Record

func NewCheckDetailAddendumB

func NewCheckDetailAddendumB() CheckDetailAddendumB

NewCheckDetailAddendumB returns a new CheckDetailAddendumB with default values for non exported fields

func (*CheckDetailAddendumB) DescriptionField

func (cdAddendumB *CheckDetailAddendumB) DescriptionField() string

DescriptionField gets the Description field

func (*CheckDetailAddendumB) ImageReferenceKeyField

func (cdAddendumB *CheckDetailAddendumB) ImageReferenceKeyField() string

ImageReferenceKeyField gets the ImageReferenceKey field

func (*CheckDetailAddendumB) ImageReferenceKeyIndicatorField

func (cdAddendumB *CheckDetailAddendumB) ImageReferenceKeyIndicatorField() string

ImageReferenceKeyIndicatorField gets a string of the ImageReferenceKeyIndicator field

func (*CheckDetailAddendumB) LengthImageReferenceKeyField

func (cdAddendumB *CheckDetailAddendumB) LengthImageReferenceKeyField() string

LengthImageReferenceKeyField gets the LengthImageReferenceKey field

func (*CheckDetailAddendumB) MicrofilmArchiveSequenceNumberField

func (cdAddendumB *CheckDetailAddendumB) MicrofilmArchiveSequenceNumberField() string

MicrofilmArchiveSequenceNumberField gets the MicrofilmArchiveSequenceNumber field

func (*CheckDetailAddendumB) Parse

func (cdAddendumB *CheckDetailAddendumB) Parse(record string)

Parse takes the input record string and parses the CheckDetailAddendumB values

func (*CheckDetailAddendumB) String

func (cdAddendumB *CheckDetailAddendumB) String() string

String writes the CheckDetailAddendumB struct to a string.

func (*CheckDetailAddendumB) UnmarshalJSON added in v0.5.0

func (cdAddendumB *CheckDetailAddendumB) UnmarshalJSON(data []byte) error

func (*CheckDetailAddendumB) UserFieldField

func (cdAddendumB *CheckDetailAddendumB) UserFieldField() string

UserFieldField gets the UserField field

func (*CheckDetailAddendumB) Validate

func (cdAddendumB *CheckDetailAddendumB) Validate() error

Validate performs image cash letter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type CheckDetailAddendumC

type CheckDetailAddendumC struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// RecordNumber is a number representing the order in which each CheckDetailAddendumC was created.
	// CheckDetailAddendumC shall be in sequential order starting with 1.  Maximum 99,
	RecordNumber int `json:"recordNumber"`
	// RoutingNumber (Endorsing Bank Routing Number) is valid routing and transit number indicating the bank that
	// endorsed the check.
	// Format: TTTTAAAAC, where:
	// TTTT Federal Reserve Prefix
	// AAAA ABA Institution Identifier
	// C Check Digit
	// For a number that identifies a non-financial institution: NNNNNNNNN
	EndorsingBankRoutingNumber string `json:"endorsingBankRoutingNumber"`
	// BOFDEndorsementBusinessDate is the business date the check was endorsed.
	// Format: YYYYMMDD, where: YYYY year, MM month, DD day
	// Values:
	// YYYY 1993 through 9999
	// MM 01 through 12
	// DD 01 through 31
	BOFDEndorsementBusinessDate time.Time `json:"bofdEndorsementBusinessDate"`
	// EndorsingItemSequenceNumber is a number that identifies the item at the endorsing bank.
	EndorsingBankItemSequenceNumber string `json:"endorsingBankItemSequenceNumber"`
	// TruncationIndicator identifies if the institution truncated the original check item.
	// Values: Y: Yes this institution truncated this original check item and this is first endorsement
	// for the institution.
	// N: No this institution did not truncate the original check or, this is not the first endorsement for the
	// institution or, this item is an IRD not an original check item (EPC equals 4).
	TruncationIndicator string `json:"truncationIndicator"`
	// EndorsingConversionIndicator is a code that indicates the conversion within the processing institution among
	// original paper check, image and IRD. The indicator is specific to the action of institution identified in the
	// Endorsing Bank RoutingNumber.
	// Values:
	// 0: Did not convert physical document
	// 1: Original paper converted to IRD
	// 2: Original paper converted to image
	// 3: IRD converted to another IRD
	// 4: IRD converted to image of IRD
	// 5: Image converted to an IRD
	// 6: Image converted to another image (e.g., transcoded)
	// 7: Did not convert image (e.g., same as source)
	// 8: Undetermined
	EndorsingBankConversionIndicator string `json:"endorsingBankConversionIndicator"`
	// EndorsingCorrectionIndicator identifies whether and how the MICR line of this item was repaired by the
	// creator of this CheckDetailAddendumC Record for fields other than Payor Bank Routing Number and Amount.
	// Values:
	// 0: No Repair
	// 1: Repaired (form of repair unknown)
	// 2: Repaired without Operator intervention
	// 3: Repaired with Operator intervention
	// 4: Undetermined if repair has been done or no
	EndorsingBankCorrectionIndicator int `json:"endorsingBankCorrectionIndicator"`
	// ReturnReason is a code that indicates the reason for non-payment.
	ReturnReason string `json:"returnReason"`
	// UserField identifies a field used at the discretion of users of the standard.
	UserField string `json:"userField"`
	//EndorsingBankIdentifier
	// Values:
	// 0: Depository Bank (BOFD) - this value is used when the CheckDetailAddendumC Record reflects the Return
	// Processing Bank in lieu of BOFD.
	// 1: Other Collecting Bank
	// 2: Other Returning Bank
	// 3: Payor Bank
	EndorsingBankIdentifier int `json:"endorsingBankIdentifier"`
	// contains filtered or unexported fields
}

CheckDetailAddendumC Record

func NewCheckDetailAddendumC

func NewCheckDetailAddendumC() CheckDetailAddendumC

NewCheckDetailAddendumC returns a new CheckDetailAddendumC with default values for non exported fields

func (*CheckDetailAddendumC) BOFDEndorsementBusinessDateField

func (cdAddendumC *CheckDetailAddendumC) BOFDEndorsementBusinessDateField() string

BOFDEndorsementBusinessDateField gets the BOFDEndorsementBusinessDate in YYYYMMDD format

func (*CheckDetailAddendumC) EndorsingBankConversionIndicatorField

func (cdAddendumC *CheckDetailAddendumC) EndorsingBankConversionIndicatorField() string

EndorsingBankConversionIndicatorField gets the EndorsingBankConversionIndicator field

func (*CheckDetailAddendumC) EndorsingBankCorrectionIndicatorField

func (cdAddendumC *CheckDetailAddendumC) EndorsingBankCorrectionIndicatorField() string

EndorsingBankCorrectionIndicatorField gets a string of the EndorsingBankCorrectionIndicator field

func (*CheckDetailAddendumC) EndorsingBankIdentifierField

func (cdAddendumC *CheckDetailAddendumC) EndorsingBankIdentifierField() string

EndorsingBankIdentifierField gets the EndorsingBankIdentifier field

func (*CheckDetailAddendumC) EndorsingBankItemSequenceNumberField

func (cdAddendumC *CheckDetailAddendumC) EndorsingBankItemSequenceNumberField() string

EndorsingBankItemSequenceNumberField gets the EndorsingBankItemSequenceNumber field

func (*CheckDetailAddendumC) EndorsingBankRoutingNumberField

func (cdAddendumC *CheckDetailAddendumC) EndorsingBankRoutingNumberField() string

EndorsingBankRoutingNumberField gets a string of the EndorsingBankRoutingNumber field

func (*CheckDetailAddendumC) Parse

func (cdAddendumC *CheckDetailAddendumC) Parse(record string)

Parse takes the input record string and parses the CheckDetailAddendumC values

func (*CheckDetailAddendumC) RecordNumberField

func (cdAddendumC *CheckDetailAddendumC) RecordNumberField() string

RecordNumberField gets a string of the RecordNumber field

func (*CheckDetailAddendumC) ReturnReasonField

func (cdAddendumC *CheckDetailAddendumC) ReturnReasonField() string

ReturnReasonField gets the ReturnReason field

func (*CheckDetailAddendumC) SetEndorsingBankItemSequenceNumber

func (cdAddendumC *CheckDetailAddendumC) SetEndorsingBankItemSequenceNumber(seq int) string

SetEndorsingBankItemSequenceNumber sets EndorsingBankItemSequenceNumber

func (*CheckDetailAddendumC) String

func (cdAddendumC *CheckDetailAddendumC) String() string

String writes the CheckDetailAddendumC struct to a string.

func (*CheckDetailAddendumC) TruncationIndicatorField

func (cdAddendumC *CheckDetailAddendumC) TruncationIndicatorField() string

TruncationIndicatorField gets the TruncationIndicator field

func (*CheckDetailAddendumC) UnmarshalJSON added in v0.5.0

func (cdAddendumC *CheckDetailAddendumC) UnmarshalJSON(data []byte) error

func (*CheckDetailAddendumC) UserFieldField

func (cdAddendumC *CheckDetailAddendumC) UserFieldField() string

UserFieldField gets the UserField field

func (*CheckDetailAddendumC) Validate

func (cdAddendumC *CheckDetailAddendumC) Validate() error

Validate performs image cash letter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type Credit added in v0.9.0

type Credit struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// AuxiliaryOnUs identifies a code used on commercial checks at the discretion of the payor bank.
	AuxiliaryOnUs string `json:"auxiliaryOnUs,omitempty"`
	// ExternalProcessingCode identifies a code used for special purposes as authorized by the AS Committee X9.
	ExternalProcessingCode string `json:"externalProcessingCode,omitempty"`
	// PayorBankRoutingNumber identifies a number that identifies the institution by or through
	// which the item is payable.
	PayorBankRoutingNumber string `json:"payorBankRoutingNumber"`
	// CreditAccountNumberOnUs identifies data specified by the payor bank.
	// Usually an account number, serial number or transaction code or both.
	CreditAccountNumberOnUs string `json:"creditAccountNumberOnUs"`
	// ItemAmount identifies amount of the credit in U.S. dollars.
	ItemAmount int `json:"itemAmount"`
	// InstitutionItemSequenceNumber identifies sequence number assigned by the ECE company/institution.
	ECEInstitutionItemSequenceNumber string `json:"eceInstitutionItemSequenceNumber,omitempty"`
	// DocumentationTypeIndicator identifies a code that indicates the type of documentation
	// that supports the check record.
	DocumentationTypeIndicator string `json:"documentationTypeIndicator,omitempty"`
	// AccountTypeCode identifies a code to designate account type.
	AccountTypeCode string `json:"accountTypeCode,omitempty"`
	// SourceWorkCode identifies a code that identifies the incoming work.
	SourceWorkCode string `json:"sourceWorkCode,omitempty"`
	// WorkType identifies a code that identifies the type of work.
	WorkType string `json:"workType,omitempty"`
	// InstitutionItemSequenceNumber identifies a code that identifies whether this record represents
	// a debit or credit adjustment.
	DebitCreditIndicator string `json:"debitCreditIndicator,omitempty"`
	// contains filtered or unexported fields
}

Credit Record

func NewCredit added in v0.9.0

func NewCredit() *Credit

NewCredit returns a new credit with default values for non exported fields

func (*Credit) AccountTypeCodeField added in v0.9.0

func (cr *Credit) AccountTypeCodeField() string

AccountTypeCodeField gets a string of the AccountTypeCode

func (*Credit) AuxiliaryOnUsField added in v0.9.0

func (cr *Credit) AuxiliaryOnUsField() string

AuxiliaryOnUsField gets a string of the AuxiliaryOnUs

func (*Credit) CreditAccountNumberOnUsField added in v0.9.0

func (cr *Credit) CreditAccountNumberOnUsField() string

CreditAccountNumberOnUsField gets a string of the CreditAccountNumberOnUs

func (*Credit) DebitCreditIndicatorField added in v0.9.0

func (cr *Credit) DebitCreditIndicatorField() string

DebitCreditIndicatorField gets a string of the DebitCreditIndicator

func (*Credit) DocumentationTypeIndicatorField added in v0.9.0

func (cr *Credit) DocumentationTypeIndicatorField() string

DocumentationTypeIndicatorField gets a string of the DocumentationTypeIndicator

func (*Credit) ECEInstitutionItemSequenceNumberField added in v0.9.0

func (cr *Credit) ECEInstitutionItemSequenceNumberField() string

ECEInstitutionItemSequenceNumberField gets a string of the ECEInstitutionItemSequenceNumber

func (*Credit) ExternalProcessingCodeField added in v0.9.0

func (cr *Credit) ExternalProcessingCodeField() string

ExternalProcessingCodeField gets a string of the ExternalProcessingCode

func (*Credit) ItemAmountField added in v0.9.0

func (cr *Credit) ItemAmountField() string

ItemAmountField gets a string of the ItemAmount zero padded

func (*Credit) Parse added in v0.9.0

func (cr *Credit) Parse(record string)

Parse takes the input record string and parses the BundleControl values

func (*Credit) PayorBankRoutingNumberField added in v0.9.0

func (cr *Credit) PayorBankRoutingNumberField() string

PayorBankRoutingNumberField gets a string of the PayorBankRoutingNumber zero padded

func (*Credit) SourceWorkCodeField added in v0.9.0

func (cr *Credit) SourceWorkCodeField() string

SourceWorkCodeField gets a string of the SourceOfWorkCode

func (*Credit) String added in v0.9.0

func (cr *Credit) String() string

String writes the BundleControl struct to a string.

func (*Credit) UnmarshalJSON added in v0.9.0

func (cr *Credit) UnmarshalJSON(data []byte) error

func (*Credit) Validate added in v0.9.0

func (cr *Credit) Validate() error

Validate performs image cash letter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

func (*Credit) WorkTypeField added in v0.9.0

func (cr *Credit) WorkTypeField() string

WorkTypeField gets a string of the WorkType

type CreditItem

type CreditItem struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// AuxiliaryOnUs identifies a code used on commercial checks at the discretion of the payor bank.
	AuxiliaryOnUs string `json:"auxiliaryOnUs"`
	// ExternalProcessingCode identifies a code used for special purposes as authorized by the Accredited
	// Standards Committee X9. Also known as Position 44.
	ExternalProcessingCode string `json:"externalProcessingCode"`
	// PostingBankRoutingNumber is a routing number assigned by the posting bank to identify this credit.
	// Format: TTTTAAAA, where:
	// TTTT: Federal Reserve Prefix
	// AAAA: ABA Institution Identifier
	PostingBankRoutingNumber string `json:"postingBankRoutingNumber"`
	// OnUs identifies data specified by the payor bank. On-Us data usually consists of the payor’s account number,
	// a serial number or transaction code, or both.
	OnUs string `json:"onUs"`
	// Amount identifies the amount of the check.  All amounts fields have two implied decimal points.
	// e.g., 100000 is $1,000.00
	ItemAmount int `json:"itemAmount"`
	// CreditItemSequenceNumber identifies a number assigned by the institution that creates the CreditItem
	CreditItemSequenceNumber string `json:"creditItemSequenceNumber"`
	// DocumentationTypeIndicator identifies a code that indicates the type of documentation that supports the check
	// record.
	// This field is superseded by the Cash Letter Documentation Type Indicator in the Cash Letter Header
	// Record (Type 10) for all Defined Values except ‘Z’ Not Same Type. In the case of Defined Value of ‘Z’, the
	// Documentation Type Indicator in this record takes precedent.
	//
	// Shall be present when Cash Letter Documentation Type Indicator (Field 9) in the Cash Letter Header Record
	// (Type 10) is Defined Value of ‘Z’.
	//
	// Values:
	// A: No image provided, paper provided separately
	// B: No image provided, paper provided separately, image upon request
	// C: Image provided separately, no paper provided
	// D: Image provided separately, no paper provided, image upon request
	// E: Image and paper provided separately
	// F: Image and paper provided separately, image upon request
	// G: Image included, no paper provided
	// H: Image included, no paper provided, image upon request
	// I: Image included, paper provided separately
	// J: Image included, paper provided separately, image upon request
	// K: No image provided, no paper provided
	// L: No image provided, no paper provided, image upon request
	DocumentationTypeIndicator string `json:"documentationTypeIndicator"`
	// AccountTypeCode is a code that indicates the type of account to which this CreditItem is associated.
	// Values:
	// 0: Unknown
	// 1: DDA account
	// 2: General Ledger account
	// 3: Savings account
	// 4: Money Market account
	// 5: Other account
	AccountTypeCode string `json:"accountTypeCode"`
	// SourceWorkCode is a code used to identify the source of the work associated with this CreditItem.
	// Values:
	// 00: Unknown
	// 01: Internal–ATM
	// 02: Internal–Branch
	// 03: Internal–Other
	// 04: External–Bank to Bank (Correspondent)
	// 05: External–Business to Bank (Customer)
	// 06: External–Business to Bank Remote Capture
	// 07: External–Processor to Bank
	// 08: External–Bank to Processor
	// 09: Lockbox
	// 10: International–Internal
	// 11: International–External
	// 21–50: User Defined
	SourceWorkCode string `json:"sourceWorkCode"`
	// UserField is a field used at the discretion of users of the standard.
	UserField string `json:"userField"`
	// contains filtered or unexported fields
}

CreditItem Record

func NewCreditItem

func NewCreditItem() *CreditItem

NewCreditItem returns a new CreditItem with default values for non exported fields

func (*CreditItem) AccountTypeCodeField

func (ci *CreditItem) AccountTypeCodeField() string

AccountTypeCodeField gets the AccountTypeCode field

func (*CreditItem) AuxiliaryOnUsField

func (ci *CreditItem) AuxiliaryOnUsField() string

AuxiliaryOnUsField gets the AuxiliaryOnUs field

func (*CreditItem) CreditItemSequenceNumberField

func (ci *CreditItem) CreditItemSequenceNumberField() string

CreditItemSequenceNumberField gets the CreditItemSequenceNumber field

func (*CreditItem) DocumentationTypeIndicatorField

func (ci *CreditItem) DocumentationTypeIndicatorField() string

DocumentationTypeIndicatorField gets the DocumentationTypeIndicator field

func (*CreditItem) ExternalProcessingCodeField

func (ci *CreditItem) ExternalProcessingCodeField() string

ExternalProcessingCodeField gets the ExternalProcessingCode field

func (*CreditItem) ItemAmountField

func (ci *CreditItem) ItemAmountField() string

ItemAmountField gets the temAmount field

func (*CreditItem) OnUsField

func (ci *CreditItem) OnUsField() string

OnUsField gets the OnUs field

func (*CreditItem) Parse

func (ci *CreditItem) Parse(record string)

Parse takes the input record string and parses the CreditItem values

func (*CreditItem) PostingBankRoutingNumberField

func (ci *CreditItem) PostingBankRoutingNumberField() string

PostingBankRoutingNumberField gets the PostingBankRoutingNumber field

func (*CreditItem) SourceWorkCodeField

func (ci *CreditItem) SourceWorkCodeField() string

SourceWorkCodeField gets the SourceWorkCode field

func (*CreditItem) String

func (ci *CreditItem) String() string

String writes the CreditItem struct to a variable length string.

func (*CreditItem) UnmarshalJSON added in v0.5.0

func (ci *CreditItem) UnmarshalJSON(data []byte) error

func (*CreditItem) UserFieldField

func (ci *CreditItem) UserFieldField() string

UserFieldField gets the UserField field

func (*CreditItem) Validate

func (ci *CreditItem) Validate() error

Validate performs imagecashletter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type CustomerReturnCode

type CustomerReturnCode struct {
	Code, Abbreviation, Description string
}

CustomerReturnCode are customer return reason codes as defined in Part 6.2 of the ANSI X9.100-188-2018 Return Reasons for Check Image Exchange and IRDs

type DecodeLineFn added in v0.5.0

type DecodeLineFn func(lineIn string) (lineOut string)

DecodeLineFn is used to decode a scanned line into desired encoding. Depending on X9 spec, cashletter could be encoded as ASCII or EBCDIC

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 {
	// ID is a client defined string used as a reference to this record
	ID string `json:"id"`
	// FileHeader is an imagecashletter FileHeader
	Header FileHeader `json:"fileHeader"`
	// CashLetters are imagecashletter Cash Letters
	CashLetters []CashLetter `json:"cashLetters,omitempty"`
	// Bundles are imagecashletter Bundles
	Bundles []Bundle `json:"bundle,omitempty"`
	// FileControl is an imagecashletter FileControl
	Control FileControl `json:"fileControl"`
}

File is an imagecashletter file

func FileFromJSON added in v0.3.0

func FileFromJSON(bs []byte) (*File, error)

FileFromJSON attempts to return a *File object assuming the input is valid JSON.

Callers should always check for a nil-error before using the returned file.

The File returned may not be valid and callers should confirm with Validate(). Invalid files may be rejected by other Financial Institutions or ICL tools.

func NewFile

func NewFile() *File

NewFile constructs a file template with a FileHeader and FileControl.

func (*File) AddCashLetter

func (f *File) AddCashLetter(cashLetter CashLetter) []CashLetter

AddCashLetter appends a CashLetter to the imagecashletter.File

func (*File) CashLetterIDUnique

func (f *File) CashLetterIDUnique() error

CashLetterIDUnique verifies multiple CashLetters in a file have a unique CashLetterID

func (*File) Create

func (f *File) Create() error

Create creates a valid imagecashletter File

func (*File) SetHeader

func (f *File) SetHeader(h FileHeader) *File

SetHeader allows for header to be built.

func (*File) Validate

func (f *File) Validate() error

Validate validates an ICL File

type FileControl

type FileControl struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// CashLetterCount identifies the total number of cash letters within the file.
	CashLetterCount int `json:"cashLetterCount"`
	// TotalRecordCount identifies the total number of records of all types sent in the file, including the FileControl.
	TotalRecordCount int `json:"totalRecordCount"`
	// TotalItemCount identifies the total number of Items sent within the file.
	TotalItemCount int `json:"totalItemCount"`
	// FileTotalAmount identifies the total Item amount of the complete file.
	FileTotalAmount int `json:"fileTotalAmount"`
	// ImmediateOriginContactName identifies contact at the institution that creates the ECE file.
	ImmediateOriginContactName string `json:"immediateOriginContactName"`
	// ImmediateOriginContactPhoneNumber is the phone number of the contact at the institution that creates the
	// file.
	ImmediateOriginContactPhoneNumber string `json:"immediateOriginContactPhoneNumber"`
	// CreditTotalIndicator isa code that indicates whether Credits Items are included in this record’s totals.
	// If so they will be included in TotalItemCount and FileTotal Amount.
	// TotalRecordCount includes all records of all types regardless of the value of this field.
	// Values:
	// 	0: Credit Items are not included in totals
	//  1: Credit Items are included in totals
	CreditTotalIndicator int `json:"creditTotalIndicator"`
	// contains filtered or unexported fields
}

FileControl Record

func NewFileControl

func NewFileControl() FileControl

NewFileControl returns a new FileControl with default values for non exported fields

func (*FileControl) CashLetterCountField

func (fc *FileControl) CashLetterCountField() string

CashLetterCountField gets a string of the CashLetterCount zero padded

func (*FileControl) CreditTotalIndicatorField

func (fc *FileControl) CreditTotalIndicatorField() string

CreditTotalIndicatorField gets a string of the CreditTotalIndicator field

func (*FileControl) FileTotalAmountField

func (fc *FileControl) FileTotalAmountField() string

FileTotalAmountField gets a string of FileTotalAmount zero padded

func (*FileControl) ImmediateOriginContactNameField

func (fc *FileControl) ImmediateOriginContactNameField() string

ImmediateOriginContactNameField gets the ImmediateOriginContactName field padded

func (*FileControl) ImmediateOriginContactPhoneNumberField

func (fc *FileControl) ImmediateOriginContactPhoneNumberField() string

ImmediateOriginContactPhoneNumberField gets the ImmediateOriginContactPhoneNumber field 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 string.

func (*FileControl) TotalItemCountField

func (fc *FileControl) TotalItemCountField() string

TotalItemCountField gets a string of TotalItemCount zero padded

func (*FileControl) TotalRecordCountField

func (fc *FileControl) TotalRecordCountField() string

TotalRecordCountField gets a string of the TotalRecordCount zero padded

func (*FileControl) UnmarshalJSON added in v0.5.0

func (fc *FileControl) UnmarshalJSON(data []byte) error

func (*FileControl) Validate

func (fc *FileControl) Validate() error

Validate performs image cash letter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type FileError

type FileError struct {
	FieldName string
	Value     string
	Msg       string
}

FileError is an error describing issues validating a file

func (*FileError) Error

func (e *FileError) Error() string

type FileHeader

type FileHeader struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// standardLevel identifies the standard level of the file.
	// Values: 03, 30, 35
	// 03: DSTU X9.37 - 2003
	// 30: X9.100-187-2008
	// 35: X9.100-187-2013 and 2016
	StandardLevel string `json:"standardLevel"`
	// TestFileIndicator identifies whether the file is a test or production file.
	// Values:
	// T: Test File
	// P: Production File
	TestFileIndicator string `json:"testIndicator"`
	// ImmediateDestination contains the routing and transit number of the Federal Reserve Bank
	// (FRB) or receiver to which the file is being sent.  Format: TTTTAAAAC, where:
	//  TTTT Federal Reserve Prefix
	//  AAAA ABA Institution Identifier
	//  C Check Digit
	//  For a number that identifies a non-financial institution: NNNNNNNNN
	ImmediateDestination string `json:"immediateDestination"`
	// ImmediateOrigin contains the routing and transit number of the Federal Reserve Bank
	// (FRB) or receiver from which the file is being sent.  Format: TTTTAAAAC, where:
	// TTTT Federal Reserve Prefix
	// AAAA ABA Institution Identifier
	// C Check Digit
	// For a number that identifies a non-financial institution: NNNNNNNNN
	ImmediateOrigin string `json:"immediateOrigin"`
	// FileCreationDate is the date that the immediate origin institution creates the file.  Default time shall be in
	// Eastern Time zone format. Other time zones may be used under clearing arrangements.
	// Format: YYYYMMDD, where: YYYY year, MM month, DD day
	// Values:
	// YYYY 1993 through 9999
	// MM 01 through 12
	// DD 01 through 31
	FileCreationDate time.Time `json:"fileCreationDate"`
	// FileCreationTime is the time the immediate origin institution creates the file. Default time shall be in
	// Eastern Time zone format. Other time zones may be used under clearing arrangements.
	// Format: hhmm, where: hh hour, mm minute
	// Values:
	// hh '00' through '23'
	// mm '00' through '59'
	FileCreationTime time.Time `json:"fileCreationTime"`
	// ResendIndicator indicates whether the file has been previously transmitted.
	// Values:
	// Y: Yes
	// N: No
	ResendIndicator string `json:"ResendIndicator"`
	// ImmediateDestinationName identifies the short name of the institution that receives the file.
	ImmediateDestinationName string `json:"immediateDestinationName"`
	// ImmediateOriginName identifies the short name of the institution that sends the file.
	ImmediateOriginName string `json:"ImmediateOriginName"`
	// FileIDModifier is a code that permits multiple files, created on the same date, same time and between the
	// same institutions, to be distinguished one from another. If all of the following fields in a previous file are
	// equal to the same fields in this file: FileHeader ImmediateDestination, ImmediateOrigin, FileCreationDate, and
	// FileCreationTime, it must be defined.
	FileIDModifier string `json:"fileIDModifier"`
	// CountryCode is a 2-character code as approved by the International Organization for Standardization (ISO) used
	// to identify the country in which the payer bank is located.
	// Example: US = United States
	// Values for other countries can be found on the International Organization for Standardization
	// website: www.iso.org.
	CountryCode string `json:"countryCode"`
	// UserField identifies a field used at the discretion of users of the standard.
	UserField string `json:"userField"`
	// CompanionDocumentIndicator identifies a field used to indicate the Companion Document being used.
	// Shall be present only under clearing arrangements. Companion Document usage and values
	// defined by clearing arrangements.
	// Values:
	// 0–9 Reserved for United States use
	// A–J Reserved for Canadian use
	// Other - as defined by clearing arrangements.
	CompanionDocumentIndicator string `json:"companionDocumentIndicator"`
	// contains filtered or unexported fields
}

FileHeader Record is mandatory

func NewFileHeader

func NewFileHeader() FileHeader

NewFileHeader returns a new FileHeader with default values for non exported fields

func (*FileHeader) CompanionDocumentIndicatorField

func (fh *FileHeader) CompanionDocumentIndicatorField() string

CompanionDocumentIndicatorField gets the CompanionDocumentIndicator field

func (*FileHeader) CountryCodeField

func (fh *FileHeader) CountryCodeField() string

CountryCodeField gets the CountryCode field

func (*FileHeader) FileCreationDateField

func (fh *FileHeader) FileCreationDateField() string

FileCreationDateField gets the FileCreationDate field in YYYYMMDD format

func (*FileHeader) FileCreationTimeField

func (fh *FileHeader) FileCreationTimeField() string

FileCreationTimeField gets the FileCreationTime in HHMM format

func (*FileHeader) FileIDModifierField

func (fh *FileHeader) FileIDModifierField() string

FileIDModifierField gets the FileIDModifier field

func (*FileHeader) ImmediateDestinationField

func (fh *FileHeader) ImmediateDestinationField() string

ImmediateDestinationField gets the ImmediateDestination routing number field

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 ImmediateOrigin routing number field

func (*FileHeader) ImmediateOriginNameField

func (fh *FileHeader) ImmediateOriginNameField() string

ImmediateOriginNameField gets the ImmediateOriginName field padded

func (*FileHeader) Parse

func (fh *FileHeader) Parse(record string)

Parse takes the input record string and parses the FileHeader values

func (*FileHeader) ResendIndicatorField

func (fh *FileHeader) ResendIndicatorField() string

ResendIndicatorField gets the TestFileIndicator field

func (*FileHeader) StandardLevelField

func (fh *FileHeader) StandardLevelField() string

StandardLevelField gets the StandardLevel field

func (*FileHeader) String

func (fh *FileHeader) String() string

String writes the FileHeader struct to a string.

func (*FileHeader) TestFileIndicatorField

func (fh *FileHeader) TestFileIndicatorField() string

TestFileIndicatorField gets the TestFileIndicator field

func (*FileHeader) UnmarshalJSON added in v0.5.0

func (fh *FileHeader) UnmarshalJSON(data []byte) error

func (*FileHeader) UserFieldField

func (fh *FileHeader) UserFieldField() string

UserFieldField gets the UserField field

func (*FileHeader) Validate

func (fh *FileHeader) Validate() error

Validate performs imagecashletter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type FileRecord added in v0.5.0

type FileRecord interface {
	String() string
	// contains filtered or unexported methods
}

type ImageViewAnalysis

type ImageViewAnalysis struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// GlobalImageQuality is a code that indicates whether the image view was tested for any of the conditions related
	// to image quality defined in the Image Quality Information.
	// Values:
	// 0: The image was not tested for any of the image quality conditions
	// 1: The image was tested and one or more image quality conditions were reported
	// 2: The image was tested and no image quality conditions were reported
	GlobalImageQuality int `json:"globalImageQuality"`
	// GlobalImageUsability is a code that indicates whether the image view was tested for any of the conditions
	// related to image usability defined in the Image Usability Information.
	// Values:
	// 0: The image was not tested for any of the image usability conditions
	// 1: The image was tested and one or more image usability conditions were reported
	// 2: The image was tested and no image usability conditions were reported
	GlobalImageUsability int `json:"globalImageUsability"`
	// ImagingBankSpecificTest designates the capture institution may be able to perform specific tests that can
	// indicate a potentially problematic image view caused by conditions other than those listed in the Image Quality
	// and Image Usability Information fields. By mutual agreement, clearing partners can use the UserField to report
	// the presence or absence of additional image conditions found through tests that are particular to the specific
	// imaging institution. The meaning and interpretation of the User Field data must be understood and agreed upon
	// between participants.
	// Values:
	// 0: No user-defined tests were made for other image quality/usability conditions
	// 1: Other user-defined image conditions were tested and one or more are reported in the UserField
	// 2: Other user-defined image conditions were tested and none are reported in the UserField
	ImagingBankSpecificTest int `json:"imagingBankSpecificTest"`
	// PartialImage is a code that indicates if only a portion of the image view is represented digitally while the
	// other portion is suspected to be missing or corrupt.
	// Values:
	// 0: Test not done
	// 1: Condition present
	// 2: Condition not present
	PartialImage int `json:"partialImage"`
	// ExcessiveImageSkew is a code that indicates if the image view skew exceeds an acceptable value. This value is
	// specific to the imaging institution’s own defined requirements and/or constraints.
	// Values:
	// 0: Test not done
	// 1: Condition present
	// 2: Condition not present
	ExcessiveImageSkew int `json:"excessiveImageSkew"`
	// PiggybackImage is A code that indicates if a “piggyback” condition has been detected. With a “piggyback”
	// condition, the intended image view may be extended, obscured, or replaced by image(s) of additional document(s).
	// A piggyback occurs when two or more documents are fed together and captured as one document when only a single
	// document should have been fed and captured.
	// Values:
	// 0: Test not done
	// 1: Condition present
	// 2: Condition not present
	PiggybackImage int `json:"piggybackImage"`
	// TooLightOrTooDark is a code that indicates if the image view is too light or too dark. The value is specific to
	// the imaging institution’s own defined requirements and/or constraints.
	// Values:
	// 0: Test not done
	// 1: Condition present
	// 2: Condition not present
	TooLightOrTooDark int `json:"tooLightOrTooDark"`
	// StreaksAndOrBands is a A code that indicates if the image view is likely corrupted due to streaks and/or bands.
	// Streaks and bands can be caused by such problems as dirt, dust, ink, or debris on a lens or in the optical path,
	// and failures in the imaging equipment scanner.
	// Values:
	// 0: Test not done
	// 1: Condition present
	// 2: Condition not present
	StreaksAndOrBands int `json:"streaksAndOrBands"`
	// BelowMinimumImageSize is a code that indicates if the size of the compressed image view is below an acceptable
	// value. The value is specific to the imaging institution’s own defined requirements and/or constraints.
	// Values:
	// 0: Test not done
	// 1: Condition present
	// 2: Condition not present
	BelowMinimumImageSize int `json:"belowMinimumImageSize"`
	// ExceedsMaximumImageSize is a code that indicates if the size of the compressed image view is above an
	// acceptable value. The value is specific to the imaging institution’s own defined requirements and/or
	// constraints.
	// Values:
	// 0: Test not done
	// 1: Condition present
	// 2: Condition not present
	ExceedsMaximumImageSize int `json:"exceedsMaximumImageSize"`

	// ImageEnabledPOD is a code that indicates if the image view was used within an image-enabled POD
	// (Proof of Deposit) application.
	// Values:
	// 0: It is unknown whether the image was used within an image-enabled POD application.
	// 1: Image was not used within an image-enabled POD application.
	// 2: Image was used within an image-enabled POD application.
	ImageEnabledPOD int `json:"imageEnabledPOD"`
	// SourceDocumentBad is a code that indicates if it is possible to obtain a better image from the source document
	// when it is known that the current image of the document is unusable.
	// Values:
	// 0: Test not done
	// 1: Image is unusable. It is not possible to obtain a better image since the source document is bad.
	// 2: Image is unusable. It is likely possible to obtain a better image since the source document is good.
	SourceDocumentBad int `json:"sourceDocumentBad"`
	// DateUsability is a code that indicates if the date Area of Interest is usable and readable from the image. The
	// definition of the Area of Interest for image usability testing purposes is specific to the imaging institution's
	// own defined requirements and/or constraints.
	// Values:
	// 0: Test not done
	// 1: From the image the date is unusable and unreadable
	// 2: From the image the date is usable and readable
	DateUsability int `json:"dateUsability"`
	// PayeeUsability is a code that indicates if the payee name Area of Interest is usable and readable from the
	// image. The definition of the Area of Interest for image usability testing purposes is specific to the imaging
	// institution's own defined requirements and/or constraints.
	// Values:
	// 0: Test not done
	// 1: From the image the payee is unusable and unreadable
	// 2: From the image the payee is usable and readable
	PayeeUsability int `json:"payeeUsability"`
	// ConvenienceAmountUsability is a code that indicates if the convenience amount Area of Interest is usable and
	// readable from the image. The definition of the Area of Interest for image usability testing purposes is
	// specific to the imaging institution's own defined requirements and/or constraints.
	// Values:
	// 0: Test not done
	// 1: From the image the convenience amount is unusable and unreadable
	// 2: From the image the convenience amount is usable and readable
	ConvenienceAmountUsability int `json:"convenienceAmountUsability"`
	// AmountInWordsUsability is a code that indicates if the amount in words (legal amount) Area of Interest is usable
	// and readable from the image. The definition of the Area of Interest for image usability testing purposes is
	// specific to the imaging institution's own defined requirements and/or constraints.
	// Values:
	// 0: Test not done
	// 1: From the image the amount in words is unusable and unreadable
	// 2: From the image the amount in words is usable and readable
	AmountInWordsUsability int `json:"amountInWordsUsability"`
	// SignatureUsability is a code that indicates if the signature Area of Interest is usable and readable from the
	// image. The definition of the Area of Interest for image usability testing purposes is specific to the imaging
	// institution's own defined requirements and/or constraints.
	// Values:
	// 0 Test not done
	// 1 From the image the signature(s) is/are unusable and unreadable
	// 2 From the image the signature(s) is/are usable and readable
	SignatureUsability int `json:"signatureUsability"`
	// PayorNameAddressUsability is a code that indicates if the payor name and address Area of Interest is usable and
	// readable from the image. The definition of the Area of Interest for image usability testing purposes is specific
	// to the imaging institution's own defined requirements and/or constraints.
	// Values:
	// 0: Test not done
	// 1: From the image the payor name and address is unusable and unreadable
	// 2: From the image the payor name and address is usable and readable
	PayorNameAddressUsability int `json:"payorNameAddressUsability"`
	// MICRLineUsability is a code that indicates if the MICR line Area of Interest is usable and readable from the
	// image. The definition of the Area of Interest for image usability testing purposes is specific to the imaging
	// institution's own defined requirements and/or constraints.
	// Values:
	// 0: Test not done
	// 1: From the image the MICR line is unusable and unreadable
	// 2: From the image the MICR line is usable and readable
	MICRLineUsability int `json:"micrLineUsability"`
	// MemoLineUsability is code that indicates if the memo line Area of Interest is usable and readable from the
	// image. The definition of the Area of Interest for image usability testing purposes is specific to the imaging
	// institution's own defined requirements and/or constraints.
	// Values:
	// 0: Test not done
	// 1: From the image the memo line is unusable and unreadable
	// 2: From the image the memo line is usable and readable
	MemoLineUsability int `json:"memoLineUsability"`
	// PayorBankNameAddressUsability is a code that indicates if the payor bank name and address Area of Interest is
	// usable and readable from the image. The definition of the Area of Interest for image usability testing purposes
	// is specific to the imaging institution's own defined requirements and/or constraints.
	// Values:
	// 0: Test not done
	// 1: From the image the payor bank name and address is unusable and unreadable
	// 2: From the image the payor bank name and address is usable and readable
	PayorBankNameAddressUsability int `json:"payorBankNameAddressUsability"`
	// PayeeEndorsementUsability is a code that indicates if the payee endorsement Area of Interest is usable and
	// readable from the image. The definition of the Area of Interest for image usability testing purposes is specific
	// to the imaging institution's own defined requirements and/or constraints.
	// Values:
	// 0: Test not done
	// 1: From the image the payor bank name and address is unusable and unreadable
	// 2: From the image the payor bank name and address is usable and readable
	PayeeEndorsementUsability int `json:"payeeEndorsementUsability"`
	// BOFDEndorsementUsability is a code that indicates if the Bank of First Deposit (BOFD) endorsement Area of
	// Interest is usable and readable from the image. The definition of the Area of Interest for image usability
	// testing purposes is specific to the imaging institution's own defined requirements and/or constraints.
	// 0: Test not done
	// 1: From the image the BOFD endorsement is unusable and unreadable
	// 2: From the image the BOFD endorsement is usable and readable
	BOFDEndorsementUsability int `json:"bofdEndorsementUsability"`
	// TransitEndorsementUsability is a code that indicates if the transit endorsement Area of Interest is usable and
	// readable from the image. The definition of the Area of Interest for image usability testing purposes is specific
	// to the imaging institution's own defined requirements and/or constraints.
	// Values:Values:
	// 0: Test not done
	// 1: From the image the transit endorsement(s) is/are unusable and unreadable
	// 2: From the image the transit endorsement(s) is/are usable and readable
	TransitEndorsementUsability int `json:"transitEndorsementUsability"`

	// UserField identifies a field used at the discretion of users of the standard.
	UserField string `json:"userField"`
	// contains filtered or unexported fields
}

ImageViewAnalysis Record

func NewImageViewAnalysis

func NewImageViewAnalysis() ImageViewAnalysis

NewImageViewAnalysis returns a new ImageViewAnalysis with default values for non exported fields

func (*ImageViewAnalysis) AmountInWordsUsabilityField

func (ivAnalysis *ImageViewAnalysis) AmountInWordsUsabilityField() string

AmountInWordsUsabilityField gets a string of the AmountInWordsUsability field

func (*ImageViewAnalysis) BOFDEndorsementUsabilityField

func (ivAnalysis *ImageViewAnalysis) BOFDEndorsementUsabilityField() string

BOFDEndorsementUsabilityField gets a string of the BOFDEndorsementUsability field

func (*ImageViewAnalysis) BelowMinimumImageSizeField

func (ivAnalysis *ImageViewAnalysis) BelowMinimumImageSizeField() string

BelowMinimumImageSizeField gets a string of the BelowMinimumImageSize field

func (*ImageViewAnalysis) ConvenienceAmountUsabilityField

func (ivAnalysis *ImageViewAnalysis) ConvenienceAmountUsabilityField() string

ConvenienceAmountUsabilityField gets a string of the ConvenienceAmountUsability field

func (*ImageViewAnalysis) DateUsabilityField

func (ivAnalysis *ImageViewAnalysis) DateUsabilityField() string

DateUsabilityField gets a string of the DateUsability field

func (*ImageViewAnalysis) ExceedsMaximumImageSizeField

func (ivAnalysis *ImageViewAnalysis) ExceedsMaximumImageSizeField() string

ExceedsMaximumImageSizeField gets a string of the ExceedsMaximumImageSize field

func (*ImageViewAnalysis) ExcessiveImageSkewField

func (ivAnalysis *ImageViewAnalysis) ExcessiveImageSkewField() string

ExcessiveImageSkewField gets a string of the ExcessiveImageSkew field

func (*ImageViewAnalysis) GlobalImageQualityField

func (ivAnalysis *ImageViewAnalysis) GlobalImageQualityField() string

GlobalImageQualityField gets a string of the GlobalImageQuality field

func (*ImageViewAnalysis) GlobalImageUsabilityField

func (ivAnalysis *ImageViewAnalysis) GlobalImageUsabilityField() string

GlobalImageUsabilityField gets a string of the GlobalImageUsability field

func (*ImageViewAnalysis) ImageEnabledPODField

func (ivAnalysis *ImageViewAnalysis) ImageEnabledPODField() string

ImageEnabledPODField gets a string of the ImageEnabledPOD field

func (*ImageViewAnalysis) ImagingBankSpecificTestField

func (ivAnalysis *ImageViewAnalysis) ImagingBankSpecificTestField() string

ImagingBankSpecificTestField gets a string of the ImagingBankSpecificTest field

func (*ImageViewAnalysis) MICRLineUsabilityField

func (ivAnalysis *ImageViewAnalysis) MICRLineUsabilityField() string

MICRLineUsabilityField gets a string of the MICRLineUsability field

func (*ImageViewAnalysis) MemoLineUsabilityField

func (ivAnalysis *ImageViewAnalysis) MemoLineUsabilityField() string

MemoLineUsabilityField gets a string of the MemoLineUsability field

func (*ImageViewAnalysis) Parse

func (ivAnalysis *ImageViewAnalysis) Parse(record string)

Parse takes the input record string and parses the ImageViewAnalysis values

func (*ImageViewAnalysis) PartialImageField

func (ivAnalysis *ImageViewAnalysis) PartialImageField() string

PartialImageField gets a string of the PartialImage field

func (*ImageViewAnalysis) PayeeEndorsementUsabilityField

func (ivAnalysis *ImageViewAnalysis) PayeeEndorsementUsabilityField() string

PayeeEndorsementUsabilityField gets a string of the PayeeEndorsementUsability field

func (*ImageViewAnalysis) PayeeUsabilityField

func (ivAnalysis *ImageViewAnalysis) PayeeUsabilityField() string

PayeeUsabilityField gets a string of the PayeeUsability field

func (*ImageViewAnalysis) PayorBankNameAddressUsabilityField

func (ivAnalysis *ImageViewAnalysis) PayorBankNameAddressUsabilityField() string

PayorBankNameAddressUsabilityField gets a string of the PayorBankNameAddressUsability field

func (*ImageViewAnalysis) PayorNameAddressUsabilityField

func (ivAnalysis *ImageViewAnalysis) PayorNameAddressUsabilityField() string

PayorNameAddressUsabilityField gets a string of the PayorNameAddressUsability field

func (*ImageViewAnalysis) PiggybackImageField

func (ivAnalysis *ImageViewAnalysis) PiggybackImageField() string

PiggybackImageField gets a string of the PiggybackImage field

func (*ImageViewAnalysis) SignatureUsabilityField

func (ivAnalysis *ImageViewAnalysis) SignatureUsabilityField() string

SignatureUsabilityField gets a string of the SignatureUsability field

func (*ImageViewAnalysis) SourceDocumentBadField

func (ivAnalysis *ImageViewAnalysis) SourceDocumentBadField() string

SourceDocumentBadField gets a string of the SourceDocumentBad field

func (*ImageViewAnalysis) StreaksAndOrBandsField

func (ivAnalysis *ImageViewAnalysis) StreaksAndOrBandsField() string

StreaksAndOrBandsField gets a string of the StreaksAndOrBands field

func (*ImageViewAnalysis) String

func (ivAnalysis *ImageViewAnalysis) String() string

String writes the ImageViewAnalysis struct to a string.

func (*ImageViewAnalysis) TooLightOrTooDarkField

func (ivAnalysis *ImageViewAnalysis) TooLightOrTooDarkField() string

TooLightOrTooDarkField gets a string of the TooLightOrTooDark field

func (*ImageViewAnalysis) TransitEndorsementUsabilityField

func (ivAnalysis *ImageViewAnalysis) TransitEndorsementUsabilityField() string

TransitEndorsementUsabilityField gets a string of the TransitEndorsementUsability field

func (*ImageViewAnalysis) UnmarshalJSON added in v0.5.0

func (ivAnalysis *ImageViewAnalysis) UnmarshalJSON(data []byte) error

func (*ImageViewAnalysis) UserFieldField

func (ivAnalysis *ImageViewAnalysis) UserFieldField() string

UserFieldField gets the UserField field

func (*ImageViewAnalysis) Validate

func (ivAnalysis *ImageViewAnalysis) Validate() error

Validate performs ImageCashLetterformat rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type ImageViewData

type ImageViewData struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// EceInstitutionRoutingNumber contains the routing and transit number of the institution that that creates the
	// bundle header.  Format: TTTTAAAAC, where:
	// TTTT Federal Reserve Prefix
	// AAAA ABA Institution Identifier
	// C Check Digit
	// For a number that identifies a non-financial institution: NNNNNNNNN
	EceInstitutionRoutingNumber string `json:"eceInstitutionRoutingNumber"`
	// BundleBusinessDate is the business date of the bundle.
	// Values:
	// YYYY 1993 through 9999
	// MM 01 through 12
	// DD 01 through 31
	BundleBusinessDate time.Time `json:"bundleBusinessDate"`
	// CycleNumber is a code assigned by the institution that creates the bundle.  Denotes the cycle under which
	// the bundle is created.
	CycleNumber string `json:"cycleNumber"`
	// EceInstitutionItemSequenceNumber is a number assigned by the institution that creates the CheckDetail Record or
	// Return.  This number is imported from the CheckDetail.ECEInstitutionItemSequenceNumber or
	// Return.ECEInstitutionItemSequenceNumber associated with the image view conveyed in this Image View Data Record.
	// The ECE institution must construct the sequence number to guarantee uniqueness for a given routing number,
	// business day, and cycle number. Must contain a numeric value.
	EceInstitutionItemSequenceNumber string `json:"eceInstitutionItemSequenceNumber"`
	// SecurityOriginatorName is a unique name that creates the Digital Signature for data to be exchanged.
	// Shall be present only under clearing arrangements and when ImageViewDetail.DigitalSignatureIndicator is 1
	// Shall not be present when ImageViewDetail.ImageIndicator is 0.
	SecurityOriginatorName string `json:"securityOriginatorName"`
	// SecurityAuthenticatorName is the unique name that performs authentication on received data.
	// Shall be present only under clearing arrangements and when ImageViewDetail.DigitalSignatureIndicator is 1
	// Shall not be present when ImageViewDetail.ImageIndicator is 0.
	SecurityAuthenticatorName string `json:"securityAuthenticatorName"`
	// SecurityKeyName is a name or character sequence used by the signer (originator) to communicate a key identifier
	// to the recipient (authenticator) so the recipient can obtain the key needed to validate the signature. The name
	// is typically used as an identifier related to the key pair used to sign the image. The name is mutually known to
	// the security originator and the security authenticator and is unique to this relationship.
	// Shall be present only under clearing arrangements and when ImageViewDetail.DigitalSignatureIndicator is 1
	// Shall not be present when ImageViewDetail.ImageIndicator is 0.
	SecurityKeyName string `json:"securityKeyName"`
	// ClippingOrigin is a code that defines the corner of the conveyed image view that is taken as the reference point
	// for the clipping coordinates. Top, bottom, left, and right references apply to a view that presents a visually
	// correct orientation. When clipping information is present, the nature of the Area of Interest defined by the
	// clipping rectangle is determined by the value of the ImageViewDetail.ViewDescriptor. Primary front and rear
	// views shall only have a Defined Value of 0.  Can be blank.
	// Values:
	// 0: Clipping information is not present–full view present
	// 1: Clipping origin is top left corner of image view
	// 2: Clipping origin is top right corner of image view
	// 3: Clipping origin is bottom right corner of image view
	// 4: Clipping origin is bottom left corner of image view
	ClippingOrigin int `json:"clippingOrigin"`
	// ClippingCoordinateH1 is a number that represents the horizontal offset in pixels from the clipping origin to the
	// nearest vertical side of the clipping rectangle. The clipping coordinates (h1, h2, v1, v2) convey the clipping
	// rectangle’s offsets in both horizontal (h) and vertical (v) directions. The offset values collectively establish
	// the boundary sides of the clipping rectangle. Pixels on the boundary of the clipping rectangle are included in
	// the selected array of pixels. That is, the first pixel of the selected array is at offset (h1, v1) and the last
	// pixel of the selected array is at offset (h2, v2). The corner pixel at the origin of the image view is assumed
	// to have the offset value (0, 0).
	// Shall be present if Image View Data.ClippingOrigin is present and non-zero.
	// Shall not be present when ImageViewDetail.ImageIndicator is 0.
	// Values: 0000–9999
	ClippingCoordinateH1 string `json:"clippingCoordinateH1"`
	// ClippingCoordinateH2 is a number that represents the horizontal offset in pixels from the clipping origin to the
	// furthermost vertical side of the clipping rectangle.
	// Shall be present if Image View Data.ClippingOrigin is present and non-zero.
	// Shall not be present when ImageViewDetail.ImageIndicator is 0.
	// Values: 0000–9999
	ClippingCoordinateH2 string `json:"clippingCoordinateH2"`
	// ClippingCoordinateV1 is a number that represents the vertical offset in pixels from the clipping origin to the
	// nearest horizontal side of the clipping rectangle.
	// Shall be present if Image View Data.ClippingOrigin is present and non-zero.
	// Shall not be present when ImageViewDetail.ImageIndicator is 0.
	// Values: 0000–9999
	ClippingCoordinateV1 string `json:"clippingCoordinateV1"`
	// ClippingCoordinateV2 is number that represents the vertical offset in pixels from the clipping origin to the
	// furthermost horizontal side of the clipping rectangle.
	// Shall be present if Image View Data.ClippingOrigin is present and non-zero.
	// Shall not be present when ImageViewDetail.ImageIndicator is 0.
	// Values: 0000–9999
	ClippingCoordinateV2 string `json:"clippingCoordinateV2"`
	// LengthImageReferenceKey is the number of characters in the ImageViewData.ImageReferenceKey.
	// Shall not be present when ImageViewDetail.ImageIndicator is 0.
	// Values: 0000	ImageReferenceKey is not present
	// 0001–9999: Valid when ImageReferenceKey is present
	LengthImageReferenceKey string `json:"lengthImageReferenceKey"`
	// ImageReferenceKey is assigned by the ECE institution that creates the CheckDetail or Return, and the related
	// Image View Records. This designator, when used, shall uniquely identify the item image to the ECE institution.
	// This designator is a special key with significance to the creating institution. It is intended to be used to
	// locate within an archive the unique image associated with the item. The designator could be a full access path
	// and name that would allow direct look up and access to the image, for example a URL. This shall match
	// CheckDetailAddendumB.ImageReferenceKey, or ReturnAddendumCImageReferenceKey Record, if used.
	// Size: 0 – 9999
	ImageReferenceKey string `json:"imageReferenceKey"`
	// LengthDigitalSignature is the number of bytes in the Image View Data.DigitalSignature.
	// Shall not be present when ImageViewDetail.ImageIndicator is 0.
	LengthDigitalSignature string `json:"lengthDigitalSignature"`
	// DigitalSignature is created by applying the cryptographic algorithm and private/secret key against the data to
	// be protected. The Digital Signature provides user authentication and data integrity.
	// Shall be present only under clearing arrangements and when ImageViewDetail.DigitalSignatureIndicator is 1
	// Shall not be present when ImageViewDetail.ImageIndicator is 0.
	// Size: 0-99999
	DigitalSignature []byte `json:"digitalSignature"`
	// LengthImageData is the number of bytes in the ImageViewData.ImageData.
	// Shall be present when ImageViewDetail.ImageIndicator is NOT 0
	// Values: 0000001–99999999
	LengthImageData string `json:"lengthImageData"`
	// ImageData contains the image view. The Image Data generally consists of an image header and the image raster
	// data. The image header provides information that is required to interpret the image raster data. The image
	// raster data contains the scanned image of the physical item in raster (line by line) format. Each scan line
	// comprises a set of concatenated pixels. The image comprises a set of scan lines. The image raster data is
	// typically compressed to reduce the number of bytes needed to transmit and store the image. The header/image
	// format type is defined by the ImageViewDetail.ImageViewFormatIndicator . The syntax and semantics of the image
	// header/image format are understood by referring to the appropriate image format specification. The compression
	// scheme used to compress the image raster data is specified in the
	// ImageViewDetail.ImageViewCompressionAlgorithmIdentifier and in the image header portion of the Image Data or by
	// association with the selected image format.
	// Shall be present when ImageViewDetail.ImageIndicator Record is NOT 0.
	// Size: 0-9999999
	ImageData []byte `json:"imageData"`
	// contains filtered or unexported fields
}

ImageViewData Record

func NewImageViewData

func NewImageViewData() ImageViewData

NewImageViewData returns a new ImageViewData with default values for non exported fields

func (*ImageViewData) BundleBusinessDateField

func (ivData *ImageViewData) BundleBusinessDateField() string

BundleBusinessDateField gets the BundleBusinessDate field

func (*ImageViewData) ClippingCoordinateH1Field

func (ivData *ImageViewData) ClippingCoordinateH1Field() string

ClippingCoordinateH1Field gets the ClippingCoordinateH1 field

func (*ImageViewData) ClippingCoordinateH2Field

func (ivData *ImageViewData) ClippingCoordinateH2Field() string

ClippingCoordinateH2Field gets the ClippingCoordinateH2 field

func (*ImageViewData) ClippingCoordinateV1Field

func (ivData *ImageViewData) ClippingCoordinateV1Field() string

ClippingCoordinateV1Field gets the ClippingCoordinateV1 field

func (*ImageViewData) ClippingCoordinateV2Field

func (ivData *ImageViewData) ClippingCoordinateV2Field() string

ClippingCoordinateV2Field gets the ClippingCoordinateH2 field

func (*ImageViewData) ClippingOriginField

func (ivData *ImageViewData) ClippingOriginField() string

ClippingOriginField gets the ClippingOrigin field

func (*ImageViewData) CycleNumberField

func (ivData *ImageViewData) CycleNumberField() string

CycleNumberField gets the CycleNumber field

func (*ImageViewData) DecodeImageData added in v0.5.0

func (ivData *ImageViewData) DecodeImageData() ([]byte, error)

DecodeImageData attempts to read ImageData as a base64 blob. Other formats may be supported in the future.

func (*ImageViewData) DigitalSignatureField

func (ivData *ImageViewData) DigitalSignatureField() string

DigitalSignatureField gets the DigitalSignature field []byte to string

func (*ImageViewData) EceInstitutionItemSequenceNumberField

func (ivData *ImageViewData) EceInstitutionItemSequenceNumberField() string

EceInstitutionItemSequenceNumberField gets a string of the EceInstitutionItemSequenceNumber field

func (*ImageViewData) EceInstitutionRoutingNumberField

func (ivData *ImageViewData) EceInstitutionRoutingNumberField() string

EceInstitutionRoutingNumberField gets the EceInstitutionRoutingNumber field

func (*ImageViewData) ImageDataField

func (ivData *ImageViewData) ImageDataField() string

ImageDataField gets the ImageData field []byte to string

func (*ImageViewData) ImageReferenceKeyField

func (ivData *ImageViewData) ImageReferenceKeyField() string

ImageReferenceKeyField gets the ImageReferenceKey field

func (*ImageViewData) LengthDigitalSignatureField

func (ivData *ImageViewData) LengthDigitalSignatureField() string

LengthDigitalSignatureField gets the LengthDigitalSignature field

func (*ImageViewData) LengthImageDataField

func (ivData *ImageViewData) LengthImageDataField() string

LengthImageDataField gets the LengthImageData field

func (*ImageViewData) LengthImageReferenceKeyField

func (ivData *ImageViewData) LengthImageReferenceKeyField() string

LengthImageReferenceKeyField gets the LengthImageReferenceKey field

func (*ImageViewData) Parse

func (ivData *ImageViewData) Parse(record string)

Parse takes the input record string and parses the ImageViewData values

func (*ImageViewData) ParseAndDecode added in v0.5.0

func (ivData *ImageViewData) ParseAndDecode(record string, decode DecodeLineFn)

ParseAndDecode takes the input record string, decodes all except image and parses the ImageViewData values

func (*ImageViewData) SecurityAuthenticatorNameField

func (ivData *ImageViewData) SecurityAuthenticatorNameField() string

SecurityAuthenticatorNameField gets the SecurityAuthenticatorName field

func (*ImageViewData) SecurityKeyNameField

func (ivData *ImageViewData) SecurityKeyNameField() string

SecurityKeyNameField gets the SecurityKeyName field

func (*ImageViewData) SecurityOriginatorNameField

func (ivData *ImageViewData) SecurityOriginatorNameField() string

SecurityOriginatorNameField gets the SecurityOriginatorName field

func (*ImageViewData) String

func (ivData *ImageViewData) String() string

String writes the ImageViewData struct to a string.

func (*ImageViewData) UnmarshalJSON added in v0.5.0

func (ivData *ImageViewData) UnmarshalJSON(data []byte) error

func (*ImageViewData) Validate

func (ivData *ImageViewData) Validate() error

Validate performs image cash letter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type ImageViewDetail

type ImageViewDetail struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// ImageIndicator is a code that indicates the presence and disposition of an image view conveyed in the related
	// ImageViewData.  When an image view is not present (0) then certain conditional fields in this ImageViewDetail and
	// the related ImageViewData shall not be present and will be filled with blank space.
	// Values:
	// 0: Image view not present
	// 1: Image view present, actual check
	// 2: Image view present, not actual check
	// 3: Image view present, unable to determine if value is 1 or 2
	ImageIndicator int `json:"imageIndicator"`
	// ImageCreatorRoutingNumber identifies the financial institution that created the image view
	// in ImageViewData.ImageData.  Format: TTTTAAAAC, where:
	//	TTTT Federal Reserve Prefix
	//	AAAA ABA Institution Identifier
	//	C Check Digit
	//	For a number that identifies a non-financial institution: NNNNNNNNN
	ImageCreatorRoutingNumber string `json:"imageCreatorRoutingNumber"`
	// ImageCreatorDate is the date assigned by the image creator for the image view conveyed in the related
	// ImageViewData.ImageData.
	ImageCreatorDate time.Time `json:"imageCreatorDate"`
	// ImageViewFormatIndicator is a code that identifies the type of image format used in the related
	// ImageViewData.ImageData. The image format type is also commonly specified by reference to the file extension
	// used when image data is saved as an image file.
	// Values:
	// Agreement not required:
	// 00: TIFF 6; Extension: TIF
	// Agreement required:
	// 01: IOCA FS 11; Extension: ICA
	// 20: PNG (Portable Network Graphics); Extension: PNG ‘21’	JFIF (JPEG File Interchange Format); Extension: JPG
	// 22: SPIFF (Still Picture Interchange File Format) (ITU-T Rec. T.84 Annex F); Extension: SPF
	// 23: JBIG data stream (ITU-T Rec. T.82/ISO/IEC 11544:1993);
	// Extension: JBG ‘24’	JPEG 2000 (ISO/IEC 15444-1:2000);
	// Extension: JP2
	ImageViewFormatIndicator string `json:"imageViewFormatIndicator"`
	// ImageViewCompressionAlgorithm is a code that identifies the algorithm or method used to compress the Image Data
	// in the related ImageViewData.ImageData.
	// Values:
	// Agreement not required:
	// 00: Group 4 facsimile compression (ITU-T Rec. T.563/CCITT Rec. T.6)
	// Agreement required:
	// 01: JPEG Baseline (JPEG Interchange Format) (ITU-T Rec. T.81/ISO/IEC 10918)
	// 02: ABIC
	// 21: PNG (Portable Network Graphics)
	// 22: JBIG (ITU-T Rec. T.82/ISO/IEC 11544:1993)
	// 23: JPEG 2000 (ISO/IEC 15444–1:2000)
	ImageViewCompressionAlgorithm string `json:"imageViewCompressionAlgorithm"`
	// ImageViewDataSize is the total number of bytes in ImageViewData.ImageData.  Use of this field is NOT recommended.
	// If data is present it shall be ignored, and ImageViewData.ImageDataLength shall take precedence.
	ImageViewDataSize string `json:"imageViewDataSize"`
	// ViewSideIndicator is a code that indicates the image view conveyed in the related ImageViewData
	// Record.ImageData An image view may be a full view of the item (i.e., the entire full face of the document)
	// or may be a partial view (snippet) as determined by ImageViewDetail.ViewDescriptor.
	// Values:
	// 0: Front image view
	// 1: Rear image view
	ViewSideIndicator int `json:"viewSideIndicator"`
	// ViewDescriptor is a code that indicates the nature of the image view based on ImageViewData.ImageData.
	// Values:
	// 00: Full view
	// 01: Partial view–unspecified Area of Interest
	// 02: Partial view–date Area of Interest
	// 03: Partial view–payee Area of Interest
	// 04: Partial view–convenience amount Area of Interest
	// 05: Partial view–amount in words (legal amount) Area of Interest
	// 06: Partial view–signature Area(s) of Interest
	// 07: Partial view–payor name and address Area of Interest
	// 08: Partial view–MICR line Area of Interest
	// 09: Partial view–memo line Area of Interest
	// 10: Partial view–payor bank name and address Area of Interest
	// 11: Partial view–payee endorsement Area of Interest
	// 12: Partial view–Bank Of First Deposit (BOFD) endorsement Area of Interest
	// 13: Partial view–transit endorsement Area of Interest
	// 14 - 99: Reserved for ImageCashLetter
	ViewDescriptor string `json:"viewDescriptor"`
	// DigitalSignatureIndicator is a code that indicates the presence or absence of a digital signature for the image
	// view contained in ImageViewData.ImageData. If present, the Digital Signature is conveyed in the related
	// ImageViewData.DigitalSignature.
	// Values:
	// 0: Digital Signature is not present
	// 1: Digital Signature is present
	DigitalSignatureIndicator int `json:"digitalSignatureIndicator"`
	// DigitalSignatureMethod is a code that identifies the cryptographic algorithm used to generate and validate the
	// Digital Signature in ImageViewData.DigitalSignature.
	// Values:
	// 00: Digital Signature Algorithm (DSA) with SHA1 (ANSI X9.30)
	// 01: RSA with MD5 (ANSI X9.31)
	// 02: RSA with MDC2 (ANSI X9.31)
	// 03: RSA with SHA1 (ANSI X9.31)
	// 04: Elliptic Curve DSA (ECDSA) with SHA1 (ANSI X9.62)
	// 05 - 99: Reserved for emerging cryptographic algorithms.
	DigitalSignatureMethod string `json:"digitalSignatureMethod"`
	// SecurityKeySize is the length in bits of the cryptographic algorithm key used to create the Digital Signature
	// in ImageViewData.DigitalSignature.
	// Values: 00001–99999
	SecurityKeySize int `json:"securityKeySize"`
	// ProtectedDataStart is a number that represents the offset in bytes from the first byte (counted as byte 1)
	// of the image data in ImageViewData.ImageData to the first byte of the image data protected by the
	// digital signature.
	// Values:
	// 0000000: Digital Signature is applied to the entire image data
	// 0000001–9999999: Valid offset values
	ProtectedDataStart int `json:"protectedDataStart"`
	// ProtectedDataLength is number of contiguous bytes of image data in the related ImageViewData.ImageData
	// protected by the digital signature starting with the byte indicated by the value of the ProtectedDataStart in
	// this ImageViewDetail. The ProtectedDataLength value shall not exceed the ImageViewData.ImageDataLength.
	// Defined Values:
	// 0000000: Digital Signature is applied to entire image data
	// 0000001–9999999: 	Valid length values
	ProtectedDataLength int `json:"protectedDataLength"`
	// ImageRecreateIndicator is a code that indicates whether the sender has the ability to recreate the image view
	// conveyed in the related ImageViewData.ImageData.
	// Values:
	// 0: Sender can recreate the image view for the duration of the agreed upon retention time frames.
	// 1: Sender cannot recreate image view.
	ImageRecreateIndicator int `json:"imageRecreateIndicator"`
	// UserField identifies a field used at the discretion of users of the standard.
	UserField string `json:"userField"`

	// OverrideIndicator is a code that indicates to a receiving exchange partner that this image view has a detected
	// image test failure that cannot be corrected and that this view shall be accepted regardless of any image test
	// failures.
	// Values:
	// "": blank/space indicates no observed image test failure present
	// 0: No override information for this view or not applicable
	// 1: Imperfect image
	// A: IQA Fail–Image view reviewed and deemed usable—no alternate format
	// B: IQA Fail–Image view reviewed and deemed usable—alternate format included in this file
	// C: IQA Fail–Image view reviewed and deemed usable–alternate format included in this file and original document
	// available
	// D: IQA Fail–Image view reviewed and deemed usable–alternate format available
	// E: IQA Fail–Image view reviewed and
	// deemed usable–original document available
	// F: IQA Fail–Image view reviewed and deemed usable–original document and alternate format available
	// G: IQA Fail–Image view reviewed and deemed unusable–no alternate format
	// H: IQA Fail–Image view reviewed and deemed unusable–alternate format included in this file
	// I: IQA Fail–Image view reviewed and deemed unusable–alternate format included in this file and original document
	// available
	// J: IQA Fail–Image view reviewed and deemed unusable–alternate format available
	// K: IQA Fail–Image view reviewed and deemed unusable–original document available
	// L: IQA Fail–Image view reviewed and deemed unusable–original document and alternate format available
	// M: IQA Fail–Image view not reviewed–no alternate format
	// N: IQA Fail–Image view not reviewed–alternate format included in this file
	// O: IQA Fail–Image view not reviewed–alternate format included in this file and original
	OverrideIndicator string `json:"overrideIndicator"`
	// contains filtered or unexported fields
}

ImageViewDetail Record

func NewImageViewDetail

func NewImageViewDetail() ImageViewDetail

NewImageViewDetail returns a new ImageViewDetail with default values for non exported fields

func (*ImageViewDetail) DigitalSignatureIndicatorField

func (ivDetail *ImageViewDetail) DigitalSignatureIndicatorField() string

DigitalSignatureIndicatorField gets a string of the DigitalSignatureIndicator field

func (*ImageViewDetail) DigitalSignatureMethodField

func (ivDetail *ImageViewDetail) DigitalSignatureMethodField() string

DigitalSignatureMethodField gets the DigitalSignatureMethod field

func (*ImageViewDetail) ImageCreatorDateField

func (ivDetail *ImageViewDetail) ImageCreatorDateField() string

ImageCreatorDateField gets the ImageCreatorDate field, format YYYYMMDD

func (*ImageViewDetail) ImageCreatorRoutingNumberField

func (ivDetail *ImageViewDetail) ImageCreatorRoutingNumberField() string

ImageCreatorRoutingNumberField gets the ImageCreatorRoutingNumber field

func (*ImageViewDetail) ImageIndicatorField

func (ivDetail *ImageViewDetail) ImageIndicatorField() string

ImageIndicatorField gets a string of the ImageIndicator field

func (*ImageViewDetail) ImageRecreateIndicatorField

func (ivDetail *ImageViewDetail) ImageRecreateIndicatorField() string

ImageRecreateIndicatorField gets a string of the ImageRecreateIndicator field

func (*ImageViewDetail) ImageViewCompressionAlgorithmField

func (ivDetail *ImageViewDetail) ImageViewCompressionAlgorithmField() string

ImageViewCompressionAlgorithmField gets the ImageViewCompressionAlgorithm field

func (*ImageViewDetail) ImageViewDataSizeField

func (ivDetail *ImageViewDetail) ImageViewDataSizeField() string

ImageViewDataSizeField gets the ImageViewDataSize field

func (*ImageViewDetail) ImageViewFormatIndicatorField

func (ivDetail *ImageViewDetail) ImageViewFormatIndicatorField() string

ImageViewFormatIndicatorField gets the ImageViewFormatIndicator field

func (*ImageViewDetail) OverrideIndicatorField

func (ivDetail *ImageViewDetail) OverrideIndicatorField() string

OverrideIndicatorField gets the OverrideIndicator field

func (*ImageViewDetail) Parse

func (ivDetail *ImageViewDetail) Parse(record string)

Parse takes the input record string and parses the ImageViewDetail values

func (*ImageViewDetail) ProtectedDataLengthField

func (ivDetail *ImageViewDetail) ProtectedDataLengthField() string

ProtectedDataLengthField gets the ProtectedDataLength field

func (*ImageViewDetail) ProtectedDataStartField

func (ivDetail *ImageViewDetail) ProtectedDataStartField() string

ProtectedDataStartField gets the ProtectedDataStart field

func (*ImageViewDetail) SecurityKeySizeField

func (ivDetail *ImageViewDetail) SecurityKeySizeField() string

SecurityKeySizeField gets the SecurityKeySize field

func (*ImageViewDetail) String

func (ivDetail *ImageViewDetail) String() string

String writes the ImageViewDetail struct to a string.

func (*ImageViewDetail) UnmarshalJSON added in v0.5.0

func (ivDetail *ImageViewDetail) UnmarshalJSON(data []byte) error

func (*ImageViewDetail) UserFieldField

func (ivDetail *ImageViewDetail) UserFieldField() string

UserFieldField gets the UserField field

func (*ImageViewDetail) Validate

func (ivDetail *ImageViewDetail) Validate() error

Validate performs ImageCashLetter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

func (*ImageViewDetail) ViewDescriptorField

func (ivDetail *ImageViewDetail) ViewDescriptorField() string

ViewDescriptorField gets the ViewDescriptor field

func (*ImageViewDetail) ViewSideIndicatorField

func (ivDetail *ImageViewDetail) ViewSideIndicatorField() string

ViewSideIndicatorField gets a string of the ViewSideIndicator field

type ParseError

type ParseError struct {
	Line   int    // Line number where the error occurred
	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.

func NewReader

func NewReader(r io.Reader, opts ...ReaderOption) *Reader

NewReader returns a new ACH Reader that reads from r.

func (*Reader) ImageViewAnalysis

func (r *Reader) ImageViewAnalysis() error

ImageViewAnalysis takes the input record string and parses ImageViewAnalysis for a check

func (*Reader) ImageViewData

func (r *Reader) ImageViewData() error

ImageViewData takes the input record string and parses ImageViewData for a check

func (*Reader) ImageViewDetail

func (r *Reader) ImageViewDetail() error

ImageViewDetail takes the input record string and parses ImageViewDetail for a check

func (*Reader) Read

func (r *Reader) Read() (File, error)

Read reads each line of the imagecashletter file and defines which parser to use based on the first character of each line. It also enforces imagecashletter formatting rules and returns the appropriate error if issues are found.

type ReaderOption added in v0.5.0

type ReaderOption func(*Reader)

ReaderOption can be used to change default behavior of Reader

func BufferSizeOption added in v0.7.4

func BufferSizeOption(size int) ReaderOption

BufferSizeOption creates a byte slice of the specified size and uses it as the buffer for the Reader's internal scanner. You may need to set this when processing files that contain check details exceeding bufio.MaxScanTokenSize (64 kB).

func ReadEbcdicEncodingOption added in v0.5.0

func ReadEbcdicEncodingOption() ReaderOption

ReadEbcdicEncodingOption allows Reader to decode scanned lines from EBCDIC to UTF-8

func ReadVariableLineLengthOption added in v0.5.0

func ReadVariableLineLengthOption() ReaderOption

ReadVariableLineLengthOption allows Reader to split imagecashletter files based on encoded line lengths

type ReturnDetail

type ReturnDetail struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// PayorBankRoutingNumber identifies a number that identifies the institution by or through which the item is
	// payable. Must be a valid routing and transit number issued by the ABA’s Routing Number Registrar. Shall
	// represent the first 8 digits of a 9-digit routing number or 8 numeric digits of a 4 dash 4 routing number.
	// A valid routing number consists of 2 fields: the eight- digit Payor Bank Routing Number  and the
	// one-digit Payor Bank Routing Number Check Digit.
	// Format: TTTTAAAA, where:
	// TTTT: Federal Reserve Prefix
	// AAAA: ABA Institution Identifier
	PayorBankRoutingNumber string `json:"payorBankRoutingNumber"`
	// PayorBankCheckDigit identifies a digit representing the routing number check digit. The combination of Payor
	// Bank Routing Number and payor Bank Routing Number Check Digit  must be a mod-checked routing number with a
	// valid check digit.
	PayorBankCheckDigit string `json:"payorBankCheckDigit"`
	// OnUs identifies data specified by the payor bank. On-Us data usually consists of the payor’s account number,
	// a serial number or transaction code, or both.
	OnUs string `json:"onUs"`
	// Amount identifies the amount of the check.  All amounts fields have two implied decimal points.
	// e.g., 100000 is $1,000.00
	ItemAmount int `json:"itemAmount"`
	// ReturnReason is a code that indicates the reason for non-payment.
	ReturnReason string `json:"returnReason"`
	// AddendumCount is a number of Return Record Addenda to follow. This represents the number of
	// ReturnDetailAddendumA, ReturnDetailAddendumB, ReturnDetailAddendumC and ReturnDetailAddendumD types.
	// It matches the total number of addendum records associated with this item. The standard supports up to 99
	// addendum records.
	AddendumCount int `json:"addendumCount"`
	// DocumentationTypeIndicator identifies a code that indicates the type of documentation that supports the check
	// record.
	// This field is superseded by the Cash Letter Documentation Type Indicator in the Cash Letter Header
	// Record (Type 10) for all Defined Values except ‘Z’ Not Same Type. In the case of Defined Value of ‘Z’, the
	// Documentation Type Indicator in this record takes precedent.
	//
	// Shall be present when Cash Letter Documentation Type Indicator (Field 9) in the Cash Letter Header Record
	// (Type 10) is Defined Value of ‘Z’.
	//
	// Values:
	// A: No image provided, paper provided separately
	// B: No image provided, paper provided separately, image upon request
	// C:	Image provided separately, no paper provided
	// D: Image provided separately, no paper provided, image upon request
	// E:	Image and paper provided separately
	// F: Image and paper provided separately, image upon request
	// G: Image included, no paper provided
	// H: Image included, no paper provided, image upon request
	// I:	Image included, paper provided separately
	// J: Image included, paper provided separately, image upon request
	// K:	No image provided, no paper provided
	// L: No image provided, no paper provided, image upon request
	// M: No image provided, Electronic Check provided separately
	DocumentationTypeIndicator string `json:"documentationTypeIndicator"`
	// ForwardBundleDate represents for electronic check exchange items, the year, month, and day that designates the
	// business date of the original forward bundle. This data is transferred from the BundleHeader.BundleBusinessDate.
	// For items presented in paper cash letters, the year, month, and day that the cash letter was created.
	// Values:
	// YYYY 1993 through 9999
	// MM 01 through 12
	// DD 01 through 31
	ForwardBundleDate time.Time `json:"bundleBusinessDate"`
	// EceInstitutionItemSequenceNumber identifies a number assigned by the institution that creates the Return.
	// Field must contain a numeric value. It cannot be all blanks.
	EceInstitutionItemSequenceNumber string `json:"eceInstitutionItemSequenceNumber"`
	// ExternalProcessingCode identifies a code used for special purposes as authorized by the Accredited
	// Standards Committee X9. Also known as Position 44.
	ExternalProcessingCode string `json:"externalProcessingCode"`
	// ReturnNotificationIndicator is a A code that identifies the type of notification. The
	// CashLetterHeader.CollectionTypeIndicator and the BundleHeader.CollectionTypeIndicator when equal 05 or 06
	// takes precedence over this field.
	// Values:
	// 1: Preliminary notification
	// 2: Final notification
	ReturnNotificationIndicator string `json:"returnNotificationIndicator"`
	// ArchiveTypeIndicator is a code that indicates the type of archive that supports this CheckDetail.
	// Access method, availability and time-frames shall be defined by clearing arrangements.
	// Values:
	// A: Microfilm
	// B: Image
	// C: Paper
	// D: Microfilm and image
	// E: Microfilm and paper
	// F: Image and paper
	// G: Microfilm, image and paper
	// H: Electronic Check Instrument
	// I: None
	ArchiveTypeIndicator string `json:"archiveTypeIndicator"`
	// TimesReturned is code used to indicate the number of times the paying bank has returned this item.
	// Values:
	// 0: The item has been returned an unknown number of times
	// 1: The item has been returned once
	// 2: The item has been returned twice
	// 3: The item has been returned three times
	TimesReturned int `json:"timesReturned"`

	// ReturnDetailAddendumA
	ReturnDetailAddendumA []ReturnDetailAddendumA `json:"returnDetailAddendumA"`
	// ReturnDetailAddendumB
	ReturnDetailAddendumB []ReturnDetailAddendumB `json:"returnDetailAddendumB"`
	// ReturnDetailAddendumC
	ReturnDetailAddendumC []ReturnDetailAddendumC `json:"returnDetailAddendumC"`
	// ReturnDetailAddendumD
	ReturnDetailAddendumD []ReturnDetailAddendumD `json:"returnDetailAddendumD"`
	// ImageViewDetail
	ImageViewDetail []ImageViewDetail `json:"imageViewDetail"`
	// ImageViewData
	ImageViewData []ImageViewData `json:"imageViewData"`
	// ImageViewAnalysis
	ImageViewAnalysis []ImageViewAnalysis `json:"imageViewAnalysis"`
	// contains filtered or unexported fields
}

ReturnDetail Record

func NewReturnDetail

func NewReturnDetail() *ReturnDetail

NewReturnDetail returns a new ReturnDetail with default values for non exported fields

func (*ReturnDetail) AddImageViewAnalysis

func (rd *ReturnDetail) AddImageViewAnalysis(ivAnalysis ImageViewAnalysis) []ImageViewAnalysis

AddImageViewAnalysis appends an ImageViewAnalysis to the ReturnDetail

func (*ReturnDetail) AddImageViewData

func (rd *ReturnDetail) AddImageViewData(ivData ImageViewData) []ImageViewData

AddImageViewData appends an ImageViewData to the ReturnDetail

func (*ReturnDetail) AddImageViewDetail

func (rd *ReturnDetail) AddImageViewDetail(ivDetail ImageViewDetail) []ImageViewDetail

AddImageViewDetail appends an ImageViewDetail to the ReturnDetail

func (*ReturnDetail) AddReturnDetailAddendumA

func (rd *ReturnDetail) AddReturnDetailAddendumA(rdAddendaA ReturnDetailAddendumA) []ReturnDetailAddendumA

AddReturnDetailAddendumA appends an AddendumA to the ReturnDetail

func (*ReturnDetail) AddReturnDetailAddendumB

func (rd *ReturnDetail) AddReturnDetailAddendumB(rdAddendaB ReturnDetailAddendumB) []ReturnDetailAddendumB

AddReturnDetailAddendumB appends an AddendumA to the ReturnDetail

func (*ReturnDetail) AddReturnDetailAddendumC

func (rd *ReturnDetail) AddReturnDetailAddendumC(rdAddendaC ReturnDetailAddendumC) []ReturnDetailAddendumC

AddReturnDetailAddendumC appends an AddendumC to the ReturnDetail

func (*ReturnDetail) AddReturnDetailAddendumD

func (rd *ReturnDetail) AddReturnDetailAddendumD(rdAddendaD ReturnDetailAddendumD) []ReturnDetailAddendumD

AddReturnDetailAddendumD appends an AddendumD to the ReturnDetail

func (*ReturnDetail) AddendumCountField

func (rd *ReturnDetail) AddendumCountField() string

AddendumCountField gets a string of the AddendumCount field

func (*ReturnDetail) ArchiveTypeIndicatorField

func (rd *ReturnDetail) ArchiveTypeIndicatorField() string

ArchiveTypeIndicatorField gets the ArchiveTypeIndicator field

func (*ReturnDetail) DocumentationTypeIndicatorField

func (rd *ReturnDetail) DocumentationTypeIndicatorField() string

DocumentationTypeIndicatorField gets the DocumentationTypeIndicator field

func (*ReturnDetail) EceInstitutionItemSequenceNumberField

func (rd *ReturnDetail) EceInstitutionItemSequenceNumberField() string

EceInstitutionItemSequenceNumberField gets a string of the EceInstitutionItemSequenceNumber field

func (*ReturnDetail) ExternalProcessingCodeField

func (rd *ReturnDetail) ExternalProcessingCodeField() string

ExternalProcessingCodeField gets the ExternalProcessingCode field - Also known as Position 44

func (*ReturnDetail) ForwardBundleDateField

func (rd *ReturnDetail) ForwardBundleDateField() string

ForwardBundleDateField gets the ForwardBundleDate in YYYYMMDD format

func (*ReturnDetail) GetImageViewAnalysis

func (rd *ReturnDetail) GetImageViewAnalysis() []ImageViewAnalysis

GetImageViewAnalysis returns a slice of ImageViewAnalysis for the ReturnDetail

func (*ReturnDetail) GetImageViewData

func (rd *ReturnDetail) GetImageViewData() []ImageViewData

GetImageViewData returns a slice of ImageViewData for the ReturnDetail

func (*ReturnDetail) GetImageViewDetail

func (rd *ReturnDetail) GetImageViewDetail() []ImageViewDetail

GetImageViewDetail returns a slice of ImageViewDetail for the ReturnDetail

func (*ReturnDetail) GetReturnDetailAddendumA

func (rd *ReturnDetail) GetReturnDetailAddendumA() []ReturnDetailAddendumA

GetReturnDetailAddendumA returns a slice of AddendumA for the ReturnDetail

func (*ReturnDetail) GetReturnDetailAddendumB

func (rd *ReturnDetail) GetReturnDetailAddendumB() []ReturnDetailAddendumB

GetReturnDetailAddendumB returns a slice of AddendumB for the ReturnDetail

func (*ReturnDetail) GetReturnDetailAddendumC

func (rd *ReturnDetail) GetReturnDetailAddendumC() []ReturnDetailAddendumC

GetReturnDetailAddendumC returns a slice of AddendumC for the ReturnDetail

func (*ReturnDetail) GetReturnDetailAddendumD

func (rd *ReturnDetail) GetReturnDetailAddendumD() []ReturnDetailAddendumD

GetReturnDetailAddendumD returns a slice of AddendumD for the ReturnDetail

func (*ReturnDetail) ItemAmountField

func (rd *ReturnDetail) ItemAmountField() string

ItemAmountField gets the ItemAmount right justified and zero padded

func (*ReturnDetail) OnUsField

func (rd *ReturnDetail) OnUsField() string

OnUsField gets the OnUs field

func (*ReturnDetail) Parse

func (rd *ReturnDetail) Parse(record string)

Parse takes the input record string and parses the ReturnDetail values

func (*ReturnDetail) PayorBankCheckDigitField

func (rd *ReturnDetail) PayorBankCheckDigitField() string

PayorBankCheckDigitField gets the PayorBankCheckDigit field

func (*ReturnDetail) PayorBankRoutingNumberField

func (rd *ReturnDetail) PayorBankRoutingNumberField() string

PayorBankRoutingNumberField gets the PayorBankRoutingNumber field

func (*ReturnDetail) ReturnNotificationIndicatorField

func (rd *ReturnDetail) ReturnNotificationIndicatorField() string

ReturnNotificationIndicatorField gets a string of the ReturnNotificationIndicator field

func (*ReturnDetail) ReturnReasonField

func (rd *ReturnDetail) ReturnReasonField() string

ReturnReasonField gets the ReturnReason field

func (*ReturnDetail) SetEceInstitutionItemSequenceNumber

func (rd *ReturnDetail) SetEceInstitutionItemSequenceNumber(seq int) string

SetEceInstitutionItemSequenceNumber sets EceInstitutionItemSequenceNumber

func (*ReturnDetail) String

func (rd *ReturnDetail) String() string

String writes the ReturnDetail struct to a variable length string.

func (*ReturnDetail) TimesReturnedField

func (rd *ReturnDetail) TimesReturnedField() string

TimesReturnedField gets a string of the TimesReturned field

func (*ReturnDetail) UnmarshalJSON added in v0.5.0

func (rd *ReturnDetail) UnmarshalJSON(data []byte) error

func (*ReturnDetail) Validate

func (rd *ReturnDetail) Validate() error

Validate performs image cash letter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type ReturnDetailAddendumA

type ReturnDetailAddendumA struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// RecordNumber represents the chronological order (oldest to newest) in which each ReturnDetailAddendumA was
	// created. The ReturnDetailAddendumA shall be in sequential order according to this field. ReturnDetailAddendumA
	// RecordNumber9s) shall be in sequential order starting with 1, indicating the oldest addendum, and incrementing
	// by 1 for each subsequent addendum.
	RecordNumber int `json:"recordNumber"`
	// RoutingNumber (Return Location Routing Number) is valid routing and transit number indicating where returns,
	// final return notifications, and preliminary return notifications are sent, usually the BOFD.
	// Format: TTTTAAAAC, where:
	// TTTT Federal Reserve Prefix
	// AAAA ABA Institution Identifier
	// C Check Digit
	// For a number that identifies a non-financial institution: NNNNNNNNN
	ReturnLocationRoutingNumber string `json:"returnLocationRoutingNumber"`
	// BOFDEndorsementDate is the date of endorsement.
	// Format: YYYYMMDD, where: YYYY year, MM month, DD day
	// Values:
	// YYYY 1993 through 9999
	// MM 01 through 12
	// DD 01 through 31
	BOFDEndorsementDate time.Time `json:"bofdEndorsementDate"`
	// BOFDItemSequenceNumber is a number that identifies the item in the CheckDetailAddendumA.
	// According to spec version of x9.100-187-2016, this field is conditional. It is required if creating
	// a new Check Detail Addendum A Record, otherwise conditional.
	BOFDItemSequenceNumber string `json:"bofdItemSequenceNumber"`
	// BOFDAccountNumber is a number that identifies the depository account at the Bank of First Deposit.
	BOFDAccountNumber string `json:"bofdAccountNumber"`
	// BOFDBranchCode is a code that identifies the branch at the Bank of First Deposit.
	BOFDBranchCode string `json:"bofdBranchCode"`
	// PayeeName is the name of the payee from the check.
	PayeeName string `json:"payeeName"`
	// TruncationIndicator identifies if the institution truncated the original check item.
	// Values: Y: Yes this institution truncated this original check item and this is first endorsement
	// for the institution.
	// N: No this institution did not truncate the original check or, this is not the first endorsement for the
	// institution or, this item is an IRD not an original check item (EPC equals 4).
	TruncationIndicator string `json:"truncationIndicator"`
	// BOFDConversionIndicator is a code that indicates the conversion within the processing institution between
	// original paper check, image and IRD. The indicator is specific to the action of institution that created
	// this record.
	//Values:
	// 0: Did not convert physical document
	// 1: Original paper converted to IRD
	// 2: Original paper converted to image
	// 3: IRD converted to another IRD
	// 4: IRD converted to image of IRD
	// 5: Image converted to an IRD
	// 6: Image converted to another image (e.g., transcoded)
	// 7: Did not convert image (e.g., same as source)
	// 8: Undetermined
	BOFDConversionIndicator string `json:"bofdConversionIndicator"`
	// BOFDCorrectionIndicator identifies whether and how the MICR line of this item was repaired by the
	// creator of this CheckDetailAddendumA Record for fields other than Payor Bank Routing Number and Amount.
	// Values:
	// 0: No Repair
	// 1: Repaired (form of repair unknown)
	// 2: Repaired without Operator intervention
	// 3: Repaired with Operator intervention
	// 4: Undetermined if repair has been done or not
	BOFDCorrectionIndicator int `json:"bofdCorrectionIndicator"`
	// UserField identifies a field used at the discretion of users of the standard.
	UserField string `json:"userField"`
	// contains filtered or unexported fields
}

ReturnDetailAddendumA Record

func NewReturnDetailAddendumA

func NewReturnDetailAddendumA() ReturnDetailAddendumA

NewReturnDetailAddendumA returns a new ReturnDetailAddendumA with default values for non exported fields

func (*ReturnDetailAddendumA) BOFDAccountNumberField

func (rdAddendumA *ReturnDetailAddendumA) BOFDAccountNumberField() string

BOFDAccountNumberField gets the BOFDAccountNumber field

func (*ReturnDetailAddendumA) BOFDBranchCodeField

func (rdAddendumA *ReturnDetailAddendumA) BOFDBranchCodeField() string

BOFDBranchCodeField gets the BOFDBranchCode field

func (*ReturnDetailAddendumA) BOFDConversionIndicatorField

func (rdAddendumA *ReturnDetailAddendumA) BOFDConversionIndicatorField() string

BOFDConversionIndicatorField gets the BOFDConversionIndicator field

func (*ReturnDetailAddendumA) BOFDCorrectionIndicatorField

func (rdAddendumA *ReturnDetailAddendumA) BOFDCorrectionIndicatorField() string

BOFDCorrectionIndicatorField gets a string of the BOFDCorrectionIndicator field

func (*ReturnDetailAddendumA) BOFDEndorsementDateField

func (rdAddendumA *ReturnDetailAddendumA) BOFDEndorsementDateField() string

BOFDEndorsementDateField gets the BOFDEndorsementDate in YYYYMMDD format

func (*ReturnDetailAddendumA) BOFDItemSequenceNumberField

func (rdAddendumA *ReturnDetailAddendumA) BOFDItemSequenceNumberField() string

BOFDItemSequenceNumberField gets a string of the BOFDItemSequenceNumber field zero padded

func (*ReturnDetailAddendumA) Parse

func (rdAddendumA *ReturnDetailAddendumA) Parse(record string)

Parse takes the input record string and parses the ReturnDetailAddendumA values

func (*ReturnDetailAddendumA) PayeeNameField

func (rdAddendumA *ReturnDetailAddendumA) PayeeNameField() string

PayeeNameField gets the PayeeName field

func (*ReturnDetailAddendumA) RecordNumberField

func (rdAddendumA *ReturnDetailAddendumA) RecordNumberField() string

RecordNumberField gets a string of the RecordNumber field

func (*ReturnDetailAddendumA) ReturnLocationRoutingNumberField

func (rdAddendumA *ReturnDetailAddendumA) ReturnLocationRoutingNumberField() string

ReturnLocationRoutingNumberField gets a string of the ReturnLocationRoutingNumber field

func (*ReturnDetailAddendumA) SetBOFDItemSequenceNumber

func (rdAddendumA *ReturnDetailAddendumA) SetBOFDItemSequenceNumber(seq int) string

SetBOFDItemSequenceNumber sets BOFDItemSequenceNumber

func (*ReturnDetailAddendumA) String

func (rdAddendumA *ReturnDetailAddendumA) String() string

String writes the ReturnDetailAddendumA struct to a string.

func (*ReturnDetailAddendumA) TruncationIndicatorField

func (rdAddendumA *ReturnDetailAddendumA) TruncationIndicatorField() string

TruncationIndicatorField gets the TruncationIndicator field

func (*ReturnDetailAddendumA) UnmarshalJSON added in v0.5.0

func (rdAddendumA *ReturnDetailAddendumA) UnmarshalJSON(data []byte) error

func (*ReturnDetailAddendumA) UserFieldField

func (rdAddendumA *ReturnDetailAddendumA) UserFieldField() string

UserFieldField gets the UserField field

func (*ReturnDetailAddendumA) Validate

func (rdAddendumA *ReturnDetailAddendumA) Validate() error

Validate performs image cash letter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type ReturnDetailAddendumB

type ReturnDetailAddendumB struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// PayorBankName is short name of the institution by or through which the item is payable.
	PayorBankName string `json:"payorBankName"`
	// AuxiliaryOnUs identifies a code used on commercial checks at the discretion of the payor bank.
	AuxiliaryOnUs string `json:"auxiliaryOnUs"`
	// PayorBankSequenceNumber is a number that identifies the item at the payor bank.
	PayorBankSequenceNumber string `json:"payorBankSequenceNumber"`
	// PayorBankBusinessDate is The year, month, and day the payor bank processed the Return Record.
	// Format: YYYYMMDD, where: YYYY year, MM month, DD day
	// Values:
	// YYYY 1993 through 9999
	// MM 01 through 12
	// DD 01 through 31
	PayorBankBusinessDate time.Time `json:"payorBankBusinessDate"`
	// PayorAccountName is the account name from payor bank records.
	PayorAccountName string `json:"payorAccountName"`
	// contains filtered or unexported fields
}

ReturnDetailAddendumB Record

func NewReturnDetailAddendumB

func NewReturnDetailAddendumB() ReturnDetailAddendumB

NewReturnDetailAddendumB returns a new ReturnDetailAddendumB with default values for non exported fields

func (*ReturnDetailAddendumB) AuxiliaryOnUsField

func (rdAddendumB *ReturnDetailAddendumB) AuxiliaryOnUsField() string

AuxiliaryOnUsField gets the AuxiliaryOnUs field

func (ReturnDetailAddendumB) MarshalJSON added in v0.6.2

func (rdAddendumB ReturnDetailAddendumB) MarshalJSON() ([]byte, error)

func (*ReturnDetailAddendumB) Parse

func (rdAddendumB *ReturnDetailAddendumB) Parse(record string)

Parse takes the input record string and parses the ReturnDetailAddendumB values

func (*ReturnDetailAddendumB) PayorAccountNameField

func (rdAddendumB *ReturnDetailAddendumB) PayorAccountNameField() string

PayorAccountNameField gets the PayorAccountName field

func (*ReturnDetailAddendumB) PayorBankBusinessDateField

func (rdAddendumB *ReturnDetailAddendumB) PayorBankBusinessDateField() string

PayorBankBusinessDateField gets the PayorBankBusinessDate in YYYYMMDD format

func (*ReturnDetailAddendumB) PayorBankNameField

func (rdAddendumB *ReturnDetailAddendumB) PayorBankNameField() string

PayorBankNameField gets the PayorBankName field

func (*ReturnDetailAddendumB) PayorBankSequenceNumberField

func (rdAddendumB *ReturnDetailAddendumB) PayorBankSequenceNumberField() string

PayorBankSequenceNumberField gets the PayorBankSequenceNumber field

func (*ReturnDetailAddendumB) String

func (rdAddendumB *ReturnDetailAddendumB) String() string

String writes the ReturnDetailAddendumB struct to a string.

func (*ReturnDetailAddendumB) UnmarshalJSON added in v0.5.0

func (rdAddendumB *ReturnDetailAddendumB) UnmarshalJSON(data []byte) error

func (*ReturnDetailAddendumB) Validate

func (rdAddendumB *ReturnDetailAddendumB) Validate() error

Validate performs imagecashletter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type ReturnDetailAddendumC

type ReturnDetailAddendumC struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// validator is composed for imagecashletter data validation
	// ImageReferenceKeyIndicator identifies whether ImageReferenceKeyLength contains a variable value within the
	// allowable range, or contains a defined value and the content is ItemReferenceKey.
	// Values:
	// 0: ImageReferenceKeyIndicator has Defined Value of 0034 and ImageReferenceKey contains the Image Reference Key.
	// 1: ImageReferenceKeyIndicator contains a value other than Value 0034;
	// or ImageReferenceKeyIndicator contains Value 0034, which is not a Defined Value, and the content of
	// ImageReferenceKey has no special significance with regards to an Image Reference Key;
	// or ImageReferenceKeyIndicator is 0000, meaning the ImageReferenceKey is not present.
	ImageReferenceKeyIndicator int `json:"imageReferenceKeyIndicator"`
	// MicrofilmArchiveSequenceNumber A number that identifies the item in the microfilm archive system;
	// it may be different than the Check Detail.ECEInstitutionItemSequenceNumber and from the ImageReferenceKey.
	MicrofilmArchiveSequenceNumber string `json:"microfilmArchiveSequenceNumber"`
	// ImageReferenceKeyLength is the number of characters in the ImageReferenceKey
	// Values:
	// 0034: ImageReferenceKey contains the ImageReferenceKey (ImageReferenceKeyIndicator is 0).
	// 0000: ImageReferenceKey not present (ImageReferenceKeyIndicator is 1).
	// 0001 - 9999: May include Value 0034, and ImageReferenceKey has no special significance to
	// Image Reference Key (ImageReferenceKey is 1).
	LengthImageReferenceKey string `json:"imageReferenceKeyLength"`
	// ImageReferenceKey  is used to find the image of the item in the image data system.
	ImageReferenceKey string `json:"imageReferenceKey"`
	// Description describes the transaction
	Description string `json:"description"`
	// UserField identifies a field used at the discretion of users of the standard.
	UserField string `json:"userField"`
	// contains filtered or unexported fields
}

ReturnDetailAddendumC Record

func NewReturnDetailAddendumC

func NewReturnDetailAddendumC() ReturnDetailAddendumC

NewReturnDetailAddendumC returns a new ReturnDetailAddendumC with default values for non exported fields

func (*ReturnDetailAddendumC) DescriptionField

func (rdAddendumC *ReturnDetailAddendumC) DescriptionField() string

DescriptionField gets the Description field

func (*ReturnDetailAddendumC) ImageReferenceKeyField

func (rdAddendumC *ReturnDetailAddendumC) ImageReferenceKeyField() string

ImageReferenceKeyField gets the ImageReferenceKey field

func (*ReturnDetailAddendumC) ImageReferenceKeyIndicatorField

func (rdAddendumC *ReturnDetailAddendumC) ImageReferenceKeyIndicatorField() string

ImageReferenceKeyIndicatorField gets a string of the ImageReferenceKeyIndicator field

func (*ReturnDetailAddendumC) LengthImageReferenceKeyField

func (rdAddendumC *ReturnDetailAddendumC) LengthImageReferenceKeyField() string

LengthImageReferenceKeyField gets the LengthImageReferenceKey field

func (*ReturnDetailAddendumC) MicrofilmArchiveSequenceNumberField

func (rdAddendumC *ReturnDetailAddendumC) MicrofilmArchiveSequenceNumberField() string

MicrofilmArchiveSequenceNumberField gets the MicrofilmArchiveSequenceNumber field

func (*ReturnDetailAddendumC) Parse

func (rdAddendumC *ReturnDetailAddendumC) Parse(record string)

Parse takes the input record string and parses the ReturnDetailAddendumC values

func (*ReturnDetailAddendumC) String

func (rdAddendumC *ReturnDetailAddendumC) String() string

String writes the ReturnDetailAddendumC struct to a string.

func (*ReturnDetailAddendumC) UnmarshalJSON added in v0.5.0

func (rdAddendumC *ReturnDetailAddendumC) UnmarshalJSON(data []byte) error

func (*ReturnDetailAddendumC) UserFieldField

func (rdAddendumC *ReturnDetailAddendumC) UserFieldField() string

UserFieldField gets the UserField field

func (*ReturnDetailAddendumC) Validate

func (rdAddendumC *ReturnDetailAddendumC) Validate() error

Validate performs imagecashletter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type ReturnDetailAddendumD

type ReturnDetailAddendumD struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// RecordNumber is a number representing the order in which each ReturnDetailAddendumD was created.
	// ReturnDetailAddendumD shall be in sequential order starting with 1.  Maximum 99,
	RecordNumber int `json:"recordNumber"`
	// RoutingNumber (Endorsing Bank Routing Number) is valid routing and transit number indicating the bank that
	// endorsed the check.
	// Format: TTTTAAAAC, where:
	// TTTT Federal Reserve Prefix
	// AAAA ABA Institution Identifier
	// C Check Digit
	// For a number that identifies a non-financial institution: NNNNNNNNN
	EndorsingBankRoutingNumber string `json:"endorsingBankRoutingNumber"`
	// BOFDEndorsementBusinessDate is the business date the check was endorsed.
	// Format: YYYYMMDD, where: YYYY year, MM month, DD day
	// Values:
	// YYYY 1993 through 9999
	// MM 01 through 12
	// DD 01 through 31
	BOFDEndorsementBusinessDate time.Time `json:"bofdEndorsementBusinessDate"`
	// EndorsingItemSequenceNumber is a number that identifies the item at the endorsing bank.
	// This field is optional in earlier version of the specs.
	EndorsingBankItemSequenceNumber string `json:"endorsingBankItemSequenceNumber"`
	// TruncationIndicator identifies if the institution truncated the original check item.
	// Values: Y: Yes this institution truncated this original check item and this is first endorsement
	// for the institution.
	// N: No this institution did not truncate the original check or, this is not the first endorsement for the
	// institution or, this item is an IRD not an original check item (EPC equals 4).
	TruncationIndicator string `json:"truncationIndicator"`
	// EndorsingConversionIndicator is a code that indicates the conversion within the processing institution among
	// original paper check, image and IRD. The indicator is specific to the action of institution identified in the
	// Endorsing Bank RoutingNumber.
	// Values:
	// 0: Did not convert physical document
	// 1: Original paper converted to IRD
	// 2: Original paper converted to image
	// 3: IRD converted to another IRD
	// 4: IRD converted to image of IRD
	// 5: Image converted to an IRD
	// 6: Image converted to another image (e.g., transcoded)
	// 7: Did not convert image (e.g., same as source)
	// 8: Undetermined
	EndorsingBankConversionIndicator string `json:"endorsingBankConversionIndicator"`
	// EndorsingCorrectionIndicator identifies whether and how the MICR line of this item was repaired by the
	// creator of this ReturnDetailAddendumD Record for fields other than Payor Bank Routing Number and Amount.
	// Values:
	// 0: No Repair
	// 1: Repaired (form of repair unknown)
	// 2: Repaired without Operator intervention
	// 3: Repaired with Operator intervention
	// 4: Undetermined if repair has been done or no
	EndorsingBankCorrectionIndicator int `json:"endorsingBankCorrectionIndicator"`
	// ReturnReason is a code that indicates the reason for non-payment.
	ReturnReason string `json:"returnReason"`
	// UserField identifies a field used at the discretion of users of the standard.
	UserField string `json:"userField"`
	// EndorsingBankIdentifier
	// Values:
	// 0: Depository Bank (BOFD) - this value is used when the ReturnDetailAddendumD Record reflects the Return
	// Processing Bank in lieu of BOFD.
	// 1: Other Collecting Bank
	// 2: Other Returning Bank
	// 3: Payor Bank
	EndorsingBankIdentifier int `json:"endorsingBankIdentifier"`
	// contains filtered or unexported fields
}

ReturnDetailAddendumD Record

func NewReturnDetailAddendumD

func NewReturnDetailAddendumD() ReturnDetailAddendumD

NewReturnDetailAddendumD returns a new ReturnDetailAddendumD with default values for non exported fields

func (*ReturnDetailAddendumD) BOFDEndorsementBusinessDateField

func (rdAddendumD *ReturnDetailAddendumD) BOFDEndorsementBusinessDateField() string

BOFDEndorsementBusinessDateField gets the BOFDEndorsementBusinessDate in YYYYMMDD format

func (*ReturnDetailAddendumD) EndorsingBankConversionIndicatorField

func (rdAddendumD *ReturnDetailAddendumD) EndorsingBankConversionIndicatorField() string

EndorsingBankConversionIndicatorField gets the EndorsingBankConversionIndicator field

func (*ReturnDetailAddendumD) EndorsingBankCorrectionIndicatorField

func (rdAddendumD *ReturnDetailAddendumD) EndorsingBankCorrectionIndicatorField() string

EndorsingBankCorrectionIndicatorField gets a string of the EndorsingBankCorrectionIndicator field

func (*ReturnDetailAddendumD) EndorsingBankIdentifierField

func (rdAddendumD *ReturnDetailAddendumD) EndorsingBankIdentifierField() string

EndorsingBankIdentifierField gets the EndorsingBankIdentifier field

func (*ReturnDetailAddendumD) EndorsingBankItemSequenceNumberField

func (rdAddendumD *ReturnDetailAddendumD) EndorsingBankItemSequenceNumberField() string

EndorsingBankItemSequenceNumberField gets the EndorsingBankItemSequenceNumber field

func (*ReturnDetailAddendumD) EndorsingBankRoutingNumberField

func (rdAddendumD *ReturnDetailAddendumD) EndorsingBankRoutingNumberField() string

EndorsingBankRoutingNumberField gets a string of the EndorsingBankRoutingNumber field

func (*ReturnDetailAddendumD) Parse

func (rdAddendumD *ReturnDetailAddendumD) Parse(record string)

Parse takes the input record string and parses the ReturnDetailAddendumD values

func (*ReturnDetailAddendumD) RecordNumberField

func (rdAddendumD *ReturnDetailAddendumD) RecordNumberField() string

RecordNumberField gets a string of the RecordNumber field

func (*ReturnDetailAddendumD) ReturnReasonField

func (rdAddendumD *ReturnDetailAddendumD) ReturnReasonField() string

ReturnReasonField gets the ReturnReason field

func (*ReturnDetailAddendumD) SetEndorsingBankItemSequenceNumber

func (rdAddendumD *ReturnDetailAddendumD) SetEndorsingBankItemSequenceNumber(seq int) string

SetEndorsingBankItemSequenceNumber sets EndorsingBankItemSequenceNumber

func (*ReturnDetailAddendumD) String

func (rdAddendumD *ReturnDetailAddendumD) String() string

String writes the ReturnDetailAddendumD struct to a string.

func (*ReturnDetailAddendumD) TruncationIndicatorField

func (rdAddendumD *ReturnDetailAddendumD) TruncationIndicatorField() string

TruncationIndicatorField gets the TruncationIndicator field

func (*ReturnDetailAddendumD) UnmarshalJSON added in v0.5.0

func (rdAddendumD *ReturnDetailAddendumD) UnmarshalJSON(data []byte) error

func (*ReturnDetailAddendumD) UserFieldField

func (rdAddendumD *ReturnDetailAddendumD) UserFieldField() string

UserFieldField gets the UserField field

func (*ReturnDetailAddendumD) Validate

func (rdAddendumD *ReturnDetailAddendumD) Validate() error

Validate performs image cash letter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type RoutingNumberSummary

type RoutingNumberSummary struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// CashLetterRoutingNumber
	CashLetterRoutingNumber string `json:"cashLetterRoutingNumber"`
	// RoutingNumberTotalAmount
	RoutingNumberTotalAmount int `json:"routingNumberTotalAmount"`
	// RoutingNumberItemCount
	RoutingNumberItemCount int `json:"routingNumberItemCount"`
	// UserField identifies a field used at the discretion of users of the standard.
	UserField string `json:"userField"`
	// contains filtered or unexported fields
}

RoutingNumberSummary Record

func NewRoutingNumberSummary

func NewRoutingNumberSummary() *RoutingNumberSummary

NewRoutingNumberSummary returns a new RoutingNumberSummary with default values for non exported fields

func (*RoutingNumberSummary) CashLetterRoutingNumberField

func (rns *RoutingNumberSummary) CashLetterRoutingNumberField() string

CashLetterRoutingNumberField gets the CashLetterRoutingNumber routing number field

func (*RoutingNumberSummary) Parse

func (rns *RoutingNumberSummary) Parse(record string)

Parse takes the input record string and parses the ImageViewDetail values

func (*RoutingNumberSummary) RoutingNumberItemCountField

func (rns *RoutingNumberSummary) RoutingNumberItemCountField() string

RoutingNumberItemCountField gets a string of RoutingNumberItemCount zero padded

func (*RoutingNumberSummary) RoutingNumberTotalAmountField

func (rns *RoutingNumberSummary) RoutingNumberTotalAmountField() string

RoutingNumberTotalAmountField gets a string of RoutingNumberTotalAmount zero padded

func (*RoutingNumberSummary) String

func (rns *RoutingNumberSummary) String() string

String writes the ImageViewDetail struct to a string.

func (*RoutingNumberSummary) UnmarshalJSON added in v0.5.0

func (rns *RoutingNumberSummary) UnmarshalJSON(data []byte) error

func (*RoutingNumberSummary) UserFieldField

func (rns *RoutingNumberSummary) UserFieldField() string

UserFieldField gets the UserField field

func (*RoutingNumberSummary) Validate

func (rns *RoutingNumberSummary) Validate() error

Validate performs imagecashletter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type UserGeneral

type UserGeneral struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// OwnerIdentifierIndicator indicates the type of number represented in OwnerIdentifier
	// Values:
	// 0: Not Used
	// 1: Routing Number
	// 2: DUNS Number
	// 3: Federal Tax Identification Number
	// 4: X9 Assignment
	// 5: Other
	OwnerIdentifierIndicator int `json:"ownerIdentifierIndicator"`
	// OwnerIdentifier is a number used by the organization that controls the definition and formatting of this record.
	// Format: Routing Number formats:
	// Applicable when OwnerIdentifierIndicator has Defined Value = 1:
	// TTTTAAAAC where:
	// TTTT: Federal Reserve Prefix
	// AAAA: ABA Institution Identifier
	// C: Check digit
	//
	// DUNS Number format:
	// Applicable when OwnerIdentifierIndicator has Defined Value = 2:
	// XXXXXXXXX where "X" is a numeric value
	//
	// Federal Tax Identification Number format:
	// Applicable when OwnerIdentifierIndicator has Defined Value = 3:
	// XXXXXXXXX where "X" is a numeric value.  The "dash" in the Federal Tax Identification Number
	// (XX-XXXXXXX) is dropped.
	//
	// X9 Assignment
	// Applicable when OwnerIdentifierIndicator has Defined Value = 4: Indicates a Predefined Used Record
	// as defined by X9 within this standard.
	//
	// Other:
	// Applicable when OwnerIdentifierIndicator has Defined Value = 5:
	// Any combination of Alphanumeric special characters agreed to by the exchange partners.
	OwnerIdentifier string `json:"ownerIdentifier"`
	// OwnerIdentifierModifier is a modifier which uniquely identifies the owner within the owning organization.
	OwnerIdentifierModifier string `json:"ownerIdentifierModifier"`
	// UserRecordFormatType uniquely identifies the particular format used to parse and interrogate this record.
	// Provides a means for differentiating user record data layouts. This field shall not be populated with 001
	// since this is reserved for the UserRecordFormatType 001 PayeeEndorsement.
	UserRecordFormatType string `json:"userRecordFormatType"`
	// FormatTypeVersionLevel is a code identifies the version of the UserRecordFormatType. Provides a means for
	// identifying different versions of a record layout.
	FormatTypeVersionLevel string `json:"formatTypeVersionLevel"`
	// LengthUserData is the number of characters or bytes contained in the UserData and must be greater than 0.
	LengthUserData string `json:"LengthUserData"`
	// UserData This field shall be used at the discretion of the owner and exchange partners. The format and structure
	// of this field shall be identified according to OwnerIdentifier, OwnerIdentifierModifier , UserRecordFormatType
	// and FormatTypeVersionLevel.
	UserData string `json:"UserData"`
	// contains filtered or unexported fields
}

UserGeneral Record

func NewUserGeneral

func NewUserGeneral() *UserGeneral

NewUserGeneral returns a new UserGeneral with default values for non exported fields

func (*UserGeneral) FormatTypeVersionLevelField

func (ug *UserGeneral) FormatTypeVersionLevelField() string

FormatTypeVersionLevelField gets the FormatTypeVersionLevel field

func (*UserGeneral) LengthUserDataField

func (ug *UserGeneral) LengthUserDataField() string

LengthUserDataField gets the LengthUserData field

func (*UserGeneral) OwnerIdentifierField

func (ug *UserGeneral) OwnerIdentifierField() string

OwnerIdentifierField gets the OwnerIdentifier field

func (*UserGeneral) OwnerIdentifierIndicatorField

func (ug *UserGeneral) OwnerIdentifierIndicatorField() string

OwnerIdentifierIndicatorField gets the OwnerIdentifierIndicator field

func (*UserGeneral) OwnerIdentifierModifierField

func (ug *UserGeneral) OwnerIdentifierModifierField() string

OwnerIdentifierModifierField gets the OwnerIdentifierModifier field

func (*UserGeneral) Parse

func (ug *UserGeneral) Parse(record string)

Parse takes the input record string and parses the UserGeneral values

func (*UserGeneral) String

func (ug *UserGeneral) String() string

String writes the UserGeneral struct to a variable length string.

func (*UserGeneral) UnmarshalJSON added in v0.5.0

func (ug *UserGeneral) UnmarshalJSON(data []byte) error

func (*UserGeneral) UserDataField

func (ug *UserGeneral) UserDataField() string

UserDataField gets the UserData field

func (*UserGeneral) UserRecordFormatTypeField

func (ug *UserGeneral) UserRecordFormatTypeField() string

UserRecordFormatTypeField gets the UserRecordFormatType field

func (*UserGeneral) Validate

func (ug *UserGeneral) Validate() error

Validate performs image cash letter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type UserPayeeEndorsement

type UserPayeeEndorsement struct {
	// ID is a client defined string used as a reference to this record.
	ID string `json:"id"`

	// OwnerIdentifierIndicator indicates the type of number represented in OwnerIdentifier
	OwnerIdentifierIndicator int `json:"ownerIdentifierIndicator"`
	// OwnerIdentifier is a number used by the organization that controls the definition and formatting of this record.
	OwnerIdentifier string `json:"ownerIdentifier"`
	// OwnerIdentifierModifier is a modifier which uniquely identifies the owner within the owning organization.
	OwnerIdentifierModifier string `json:"ownerIdentifierModifier"`
	// UserRecordFormatType uniquely identifies the particular format used to parse and interrogate this record.
	// Provides a means for differentiating user record data layouts. This field shall not be populated with 001
	// since this is reserved for the UserRecordFormatType 001 PayeeEndorsement.
	UserRecordFormatType string `json:"userRecordFormatType"`
	// FormatTypeVersionLevel is a code identifies the version of the UserRecordFormatType. Provides a means for
	// identifying different versions of a record layout.
	FormatTypeVersionLevel string `json:"formatTypeVersionLevel"`
	// LengthUserData is the number of characters or bytes contained in the UserData and must be greater than 0.
	LengthUserData string `json:"LengthUserData"`
	// PayeeName is the payee name to which the check is written.
	PayeeName string `json:"payeeName"`
	// EndorsementDate The year, month, and day that the immediate origin institution creates the file which
	// shall be in Eastern Time zone format. Other time zones may be used under clearing arrangements.
	// Format: YYYYMMDD, where: YYYY year, MM month, DD day
	// Values:
	// YYYY 1993 through 9999
	// MM 01 through 12
	// DD 01 through 31
	EndorsementDate time.Time `json:"endorsementDate"`
	// BankRoutingNumber is a number that identifies the institution or the organization where the item is being
	// deposited. (note: should be the routing number associated with the BankAccountNumber.
	// Format: TTTTAAAAC, where:
	// TTTT Federal Reserve Prefix
	// AAAA ABA Institution Identifier
	// C Check Digit
	// For a number that identifies a non-financial institution: NNNNNNNNN
	BankRoutingNumber string `json:"bankRoutingNumber"`
	// BankAccountNumber is the Bank Account Number of the endorsing organization.
	BankAccountNumber string `json:"bankAccountNumber"`
	// CustomerIdentifier is a number or code identifying the customer of the endorser (e.g., driver’s license number
	// or shopper number, etc.).
	CustomerIdentifier string `json:"customerIdentifier"`
	// CustomerContactInformation is Customer contact information (e.g., phone number, e-mail, addresses, etc).
	// Unique field data shall be separated by commas.
	CustomerContactInformation string `json:"customerContactInformation"`
	// StoreMerchantProcessingSiteNumber is a number or code identifying the merchant, store or processing site.
	StoreMerchantProcessingSiteNumber string `json:"storeMerchantProcessingSiteNumber"`
	// InternalControlSequenceNumber is a number or code defined by the customer for audit proposes
	// (i.e., this can include item sequence, pocket, pass information).
	InternalControlSequenceNumber string `json:"internalControlSequenceNumber"`
	// Time is the time associated with this transaction. The default time shall be in Eastern Time zone format. The
	// local time zone or a specific time zone may be used under clearing arrangements.
	// Format: hhmm, where: hh hour, mm minute
	// Values:
	// hh '00' through '23'
	// mm '00' through '59'
	Time time.Time `json:"time"`
	// OperatorNameInitials is the name or initials of the operator or clerk processing the item.
	OperatorName string `json:"operatorName"`
	// OperatorNumber is a number or code identifying the operator or clerk processing the item.
	OperatorNumber string `json:"operatorNumber"`
	// ManagerName is The name or initials of the manager or supervisor approving the transaction.
	ManagerName string `json:"managerName"`
	// ManagerNumber is a number or code identifying the manager or supervisor approving the transaction.
	ManagerNumber string `json:"managerNumber"`
	// EquipmentNumber is  number or code of the equipment/system used to process this transaction.
	EquipmentNumber string `json:"equipmentNumber"`
	// EndorsementIndicator is an indicator to identify the type of electronic payee endorsement associated with
	// this transaction.
	// Values:
	// 0: Endorsed in Blank–Instrument becomes payable to bearer
	// 1: For Deposit Only
	// 2: For Collection Only
	// 3: Anomalous Endorsement–Endorsement made by person who is not holder of instrument
	// 4: Restrictive Endorsement–Limiting to a particular person or situation
	// 5: Guaranteed Endorsement–Deposit to the account of within named payee absence of endorsement guaranteed by
	// the bank whose Routing Number appears in BankRoutingNumber
	// 9: Other
	EndorsementIndicator int `json:"endorsementIndicator"`
	// UserField is a field used at the discretion of users of this record.
	UserField string `json:"userField"`
	// contains filtered or unexported fields
}

UserPayeeEndorsement Record

func NewUserPayeeEndorsement

func NewUserPayeeEndorsement() *UserPayeeEndorsement

NewUserPayeeEndorsement returns a new UserPayeeEndorsement with default values for non exported fields

func (*UserPayeeEndorsement) BankAccountNumberField

func (upe *UserPayeeEndorsement) BankAccountNumberField() string

BankAccountNumberField gets the BankAccountNumber field

func (*UserPayeeEndorsement) BankRoutingNumberField

func (upe *UserPayeeEndorsement) BankRoutingNumberField() string

BankRoutingNumberField gets the BankRoutingNumber field

func (*UserPayeeEndorsement) CustomerContactInformationField

func (upe *UserPayeeEndorsement) CustomerContactInformationField() string

CustomerContactInformationField gets the CustomerContactInformation field

func (*UserPayeeEndorsement) CustomerIdentifierField

func (upe *UserPayeeEndorsement) CustomerIdentifierField() string

CustomerIdentifierField gets the CustomerIdentifier field

func (*UserPayeeEndorsement) EndorsementDateField

func (upe *UserPayeeEndorsement) EndorsementDateField() string

EndorsementDateField gets the EndorsementDate field

func (*UserPayeeEndorsement) EndorsementIndicatorField

func (upe *UserPayeeEndorsement) EndorsementIndicatorField() string

EndorsementIndicatorField gets the EndorsementIndicator field

func (*UserPayeeEndorsement) EquipmentNumberField

func (upe *UserPayeeEndorsement) EquipmentNumberField() string

EquipmentNumberField gets the EquipmentNumber field

func (*UserPayeeEndorsement) FormatTypeVersionLevelField

func (upe *UserPayeeEndorsement) FormatTypeVersionLevelField() string

FormatTypeVersionLevelField gets the FormatTypeVersionLevel field

func (*UserPayeeEndorsement) InternalControlSequenceNumberField

func (upe *UserPayeeEndorsement) InternalControlSequenceNumberField() string

InternalControlSequenceNumberField gets the InternalControlSequenceNumber field

func (*UserPayeeEndorsement) LengthUserDataField

func (upe *UserPayeeEndorsement) LengthUserDataField() string

LengthUserDataField gets the LengthUserData field

func (*UserPayeeEndorsement) ManagerNameField

func (upe *UserPayeeEndorsement) ManagerNameField() string

ManagerNameField gets the ManagerName field

func (*UserPayeeEndorsement) ManagerNumberField

func (upe *UserPayeeEndorsement) ManagerNumberField() string

ManagerNumberField gets the ManagerNumber field

func (*UserPayeeEndorsement) OperatorNameField

func (upe *UserPayeeEndorsement) OperatorNameField() string

OperatorNameField gets the OperatorName field

func (*UserPayeeEndorsement) OperatorNumberField

func (upe *UserPayeeEndorsement) OperatorNumberField() string

OperatorNumberField gets the OperatorNumber field

func (*UserPayeeEndorsement) OwnerIdentifierField

func (upe *UserPayeeEndorsement) OwnerIdentifierField() string

OwnerIdentifierField gets the OwnerIdentifier field

func (*UserPayeeEndorsement) OwnerIdentifierIndicatorField

func (upe *UserPayeeEndorsement) OwnerIdentifierIndicatorField() string

OwnerIdentifierIndicatorField gets the OwnerIdentifierIndicator field

func (*UserPayeeEndorsement) OwnerIdentifierModifierField

func (upe *UserPayeeEndorsement) OwnerIdentifierModifierField() string

OwnerIdentifierModifierField gets the OwnerIdentifierModifier field

func (*UserPayeeEndorsement) Parse

func (upe *UserPayeeEndorsement) Parse(record string)

Parse takes the input record string and parses the UserPayeeEndorsement values

func (*UserPayeeEndorsement) PayeeNameField

func (upe *UserPayeeEndorsement) PayeeNameField() string

PayeeNameField gets the PayeeName field

func (*UserPayeeEndorsement) StoreMerchantProcessingSiteNumberField

func (upe *UserPayeeEndorsement) StoreMerchantProcessingSiteNumberField() string

StoreMerchantProcessingSiteNumberField gets the StoreMerchantProcessingSiteNumber field

func (*UserPayeeEndorsement) String

func (upe *UserPayeeEndorsement) String() string

String writes the UserPayeeEndorsement struct to a variable length string.

func (*UserPayeeEndorsement) TimeField

func (upe *UserPayeeEndorsement) TimeField() string

TimeField gets the Time field

func (*UserPayeeEndorsement) UnmarshalJSON added in v0.5.0

func (upe *UserPayeeEndorsement) UnmarshalJSON(data []byte) error

func (*UserPayeeEndorsement) UserFieldField

func (upe *UserPayeeEndorsement) UserFieldField() string

UserFieldField gets the UserField field

func (*UserPayeeEndorsement) UserRecordFormatTypeField

func (upe *UserPayeeEndorsement) UserRecordFormatTypeField() string

UserRecordFormatTypeField gets the UserRecordFormatType field

func (*UserPayeeEndorsement) Validate

func (upe *UserPayeeEndorsement) Validate() error

Validate performs imagecashletter format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

type Writer

type Writer struct {
	VariableLineLength bool
	EbcdicEncoding     bool
	// contains filtered or unexported fields
}

Writer writes an ImageCashLetter/X9 File to an encoded format.

Callers should use NewWriter to create a new instance and apply WriterOptions as needed to properly encode files for their usecase.

func NewWriter

func NewWriter(w io.Writer, opts ...WriterOption) *Writer

NewWriter returns a new Writer that writes to w.

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.

func (*Writer) Write

func (w *Writer) Write(file *File) error

Writer writes a single imagecashletter.file record to w

type WriterOption added in v0.5.0

type WriterOption func(w *Writer)

WriterOption allows Writer to be configured to write in different formats

func WriteEbcdicEncodingOption added in v0.5.0

func WriteEbcdicEncodingOption() WriterOption

WriteEbcdicEncodingOption allows Writer to write file in EBCDIC Follows DSTU microformat as defined https://www.frbservices.org/assets/financial-services/check/setup/frb-x937-standards-reference.pdf

func WriteVariableLineLengthOption added in v0.5.0

func WriteVariableLineLengthOption() WriterOption

WriteVariableLineLengthOption allows Writer to write control bytes ahead of record to describe how long the line is Follows DSTU microformat as defined https://www.frbservices.org/assets/financial-services/check/setup/frb-x937-standards-reference.pdf

Directories

Path Synopsis
cmd
examples
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL