Skip to main content

Crate use_ach

Crate use_ach 

Source
Expand description

§use-ach

Conservative ACH and NACHA-oriented primitives for RustUse finance crates.

use-ach provides small enums, identifiers, and lightweight entry metadata for local ACH vocabulary. It intentionally avoids full NACHA file parsing or payment-network workflow rules.

§Example

use use_ach::{
    AchEntry, AchStandardEntryClass, AchTraceNumber, AchTransactionCode, AchCompanyId,
    AchIndividualId,
};

let entry = AchEntry::new(
    AchStandardEntryClass::Ppd,
    AchTransactionCode::CheckingCredit,
    AchTraceNumber::new("123456780000001")?,
    AchCompanyId::new("1234567890")?,
    AchIndividualId::new("EMPLOYEE001")?,
);

assert_eq!(entry.standard_entry_class().as_str(), "PPD");
assert_eq!(entry.transaction_code().code(), 22);
assert_eq!(entry.trace_number().odfi_identification(), "12345678");

§Scope

Use this crate for ACH/NACHA vocabulary, identifiers, and entry metadata. It does not parse or generate full NACHA files, process payments, model returns or reversals, choose settlement windows, enforce same-day ACH operational rules, or implement ODFI/RDFI workflows.

§License

Licensed under either MIT or Apache-2.0.

Modules§

prelude
Common ACH primitives.

Structs§

AchCompanyId
A conservatively validated ACH company identifier.
AchEntry
Lightweight ACH entry metadata composed from validated primitives.
AchIndividualId
A conservatively validated ACH individual identifier.
AchTraceNumber
A validated 15-digit ACH trace number.

Enums§

AchAccountType
Broad ACH account type vocabulary.
AchAddendaIndicator
ACH addenda indicator vocabulary.
AchEntryDirection
ACH entry direction vocabulary.
AchError
Errors returned by ACH primitives.
AchStandardEntryClass
Conservative ACH Standard Entry Class vocabulary.
AchTransactionCode
Conservative ACH transaction-code vocabulary.