achx

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package achx suppliments moov-io/ach to create files and other field data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ABA8

func ABA8(rtn string) string

ABA8 returns the first 8 digits of an ABA routing number. If the input is invalid then an empty string is returned.

func ABACheckDigit

func ABACheckDigit(rtn string) string

ABACheckDigit returns the last digit of an ABA routing number. If the input is invalid then an empty string is returned.

func ConstructFile

func ConstructFile(id string, options Options, xfer *client.Transfer, source Source, destination Destination) (*ach.File, error)

func TraceNumber

func TraceNumber(routingNumber string) string

TraceNumber returns a trace number from a given routing number and uses a hidden random generator. These values are not expected to be cryptographically secure.

Types

type Destination

type Destination struct {
	Customer customers.Customer
	Account  customers.Account

	// AccountNumber contains the decrypted account number from the customers service
	AccountNumber string
}

type Options

type Options struct {
	ODFIRoutingNumber  string
	Gateway            config.Gateway
	FileConfig         config.FileConfig
	CutoffTimezone     *time.Location
	EffectiveEntryDate base.Time

	// CompanyIdentification is a string passed through to the Batch Header.
	// This value can be set from auth on the request and has a fallback from
	// the file config.
	// TODO(adam): Should this have another fallback of data from the Customer object?
	CompanyIdentification string
}

type Source

type Source struct {
	Customer customers.Customer
	Account  customers.Account

	// AccountNumber contains the decrypted account number from the customers service
	AccountNumber string
}

Jump to

Keyboard shortcuts

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