Skip to content

v2.0.0 - Modern API with Validation

Choose a tag to compare

@petre-c petre-c released this 05 Aug 06:06
· 7 commits to main since this release

Breaking Changes 🚨

  • Renamed TransferTypeRecordSpecific to BankTransferCommonDetails for clarity
  • Removed CreateGeorgian methods that auto-prefixed "GE" to IBANs

What's New ✨

πŸ›‘οΈ Validation-based API

New value objects with built-in validation using the Result pattern:

  • Iban - Validates IBAN format, length (15-34 chars), and structure
  • Currency - Validates ISO 4217 3-letter currency codes
  • BankAccount - Combines IBAN and currency with validation

πŸ“¦ Better Factory Methods

// Old style - no validation
var credentials = new TBCApiCredentials("user", "pass");

// New style - with validation
var credentialsResult = TBCApiCredentials.Create("user", "pass");
if (credentialsResult.IsFailure)
    return credentialsResult.Error;

πŸ”§ NuGet Package Fix

Fixed issue where AppifySheets.Immutable.BankIntegrationTypes was listed as a dependency while also being bundled. Now correctly bundles the DLL without listing as dependency.

Migration Guide πŸ“š

  1. Update Transfer Type Names

    • Replace TransferTypeRecordSpecific with BankTransferCommonDetails
  2. Consider New Value Objects (Old types marked [Obsolete] but still work)

    • BankAccountV β†’ Iban
    • CurrencyV β†’ Currency
    • BankAccountWithCurrencyV β†’ BankAccount
  3. Use Factory Methods for Validation

    // Create with validation
    var account = BankAccount.Create("GE31TB7467936080100003", "GEL");
    if (account.IsFailure)
        Console.WriteLine(account.Error);

Full Changelog

  • Fixed NuGet package bundling with PrivateAssets="all"
  • Added validation-based value objects
  • Improved API naming conventions
  • Maintained backward compatibility with [Obsolete] attributes
  • Updated demo and test projects to use new API

Collaboration by Claude