Skip to content

Add finance module (v0.5.0)#87

Merged
codegresscom merged 1 commit intomainfrom
feat/21-finance-module
Apr 21, 2026
Merged

Add finance module (v0.5.0)#87
codegresscom merged 1 commit intomainfrom
feat/21-finance-module

Conversation

@vhrcgcom
Copy link
Copy Markdown
Collaborator

@vhrcgcom vhrcgcom commented Apr 21, 2026

Summary

  • Add finance feature module with 9 validated value objects
  • CurrencyCode — ISO 4217 alpha-3, static lookup of ~170 active codes
  • MoneyDecimal amount + CurrencyCode, output: "10.50 EUR"
  • Iban — strips spaces, mod-97 checksum, accessors: country_code(), check_digits(), bban()
  • Bic — 8 or 11-char SWIFT code, structural validation, accessors: bank_code(), country_code(), location_code(), branch_code()
  • VatNumber — EU country prefix validation (28 prefixes), 2–13 alphanumeric suffix
  • Percentagef64 in 0.0..=100.0, finite check
  • ExchangeRate — positive Decimal, from ≠ to, output: "EUR/USD 1.0850"
  • CreditCardNumber — Luhn validation, masked Display (**** **** **** 0366), last_four()
  • CardExpiryDateMM/YY or MM/YYYY input, rejected if expired, accessors: month(), year()
  • Add finance = ["dep:rust_decimal", "dep:chrono"] feature to Cargo.toml
  • Add finance to full feature
  • Add docs/finance.md reference documentation
  • Update ROADMAP.md and README.md

Closes #21
Closes #22
Closes #23
Closes #24
Closes #25
Closes #26
Closes #28
Closes #29
Closes #30

Type of change

  • New value object / feature

Checklist

  • ValueObject trait (new / value / into_inner)
  • TryFrom<&str> (simple types)
  • Display
  • serde cfg_attr
  • Tests (93 passing)
  • cargo fmt + clippy clean
  • ROADMAP.md updated
  • README.md updated
  • docs/finance.md created

9 validated value objects: CurrencyCode (ISO 4217), Money, Iban (mod-97),
Bic (8/11-char SWIFT), VatNumber (EU prefixes), Percentage (0-100 f64),
ExchangeRate, CreditCardNumber (Luhn, masked display), CardExpiryDate (MM/YY).

Closes #21, #22, #23, #24, #25, #26, #28, #29, #30

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codegresscom codegresscom merged commit d2a4bd5 into main Apr 21, 2026
14 checks passed
@codegresscom codegresscom deleted the feat/21-finance-module branch April 21, 2026 06:24
vhrcgcom pushed a commit that referenced this pull request Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants