CleanAddressService.CleanAddress interprets the vendor's return code and error codes into caller-facing classification flags, and derives a PostNet barcode from returned fields; CleanAddressBatchService.RunCleanAddressBatch maps a raw return code to a typed enum. These are rules this repository enforces around the call, not rules the remote service documents.
An address is classified as clean when outUSPSReturnCode is 1, or -1 without USPS error code "11"; classified as unmatched when the return code is -1, -99, or -999; otherwise classified as having multiple matches
Trigger
After every CleanAddress call, including the swallowed-failure path that forces the return code to -999
The PostNet barcode is built by concatenating ZIP, ZIP+4 (if 4 characters), delivery point code (if 2 characters), and a check digit; it is left empty when the check digit is not a single digit 0–9
Trigger
After every CleanAddress call
Enforcement
CleanAddressService.CleanAddress
Origin
call site
Outcome
Populates CleanedAddress.PostNetBarcode, or leaves it empty when the check digit is invalid