Skip to content

feat: Modern API with validation and improved naming (v2.0.0)#17

Merged
petre-c merged 1 commit intomainfrom
feat/modern-api-v2.0.0
Aug 5, 2025
Merged

feat: Modern API with validation and improved naming (v2.0.0)#17
petre-c merged 1 commit intomainfrom
feat/modern-api-v2.0.0

Conversation

@petre-c
Copy link
Contributor

@petre-c petre-c commented Aug 5, 2025

Summary

  • Fixed NuGet package structure to bundle BankIntegrationTypes DLL without listing it as a dependency
  • Introduced modern API with validation and better naming
  • Version bumped to 2.0.0 (major release due to breaking changes)

BREAKING CHANGES

  • TransferTypeRecordSpecific renamed to BankTransferCommonDetails
  • Removed CreateGeorgian methods that auto-prefixed "GE" to IBANs

Problem

The generated NuGet package was listing AppifySheets.Immutable.BankIntegrationTypes as a dependency even though the DLL was bundled inside the package. This caused restore failures in consuming projects.

Solution

Added PrivateAssets="all" to the ProjectReference to prevent it from being listed as a NuGet dependency while still bundling the DLL.

API Improvements

New value object types with validation:

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

Better naming:

  • TransferTypeRecordSpecificBankTransferCommonDetails
  • Removed confusing CreateGeorgian methods that auto-prefixed "GE"

Factory methods with Result pattern:

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

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

Migration Guide

  1. Replace TransferTypeRecordSpecific with BankTransferCommonDetails in your code
  2. Consider migrating to new types:
    • BankAccountVIban
    • CurrencyVCurrency
    • BankAccountWithCurrencyVBankAccount
  3. Original types are marked as [Obsolete] but still functional

Test Plan

  • Solution builds without errors
  • All tests pass
  • NuGet package bundles DLL correctly
  • Demo and test projects updated to use new API

Collaboration by Claude

@petre-c petre-c changed the title feat\!: Modern API with validation and improved naming (v2.0.0) feat: Modern API with validation and improved naming (v2.0.0) Aug 5, 2025
BREAKING CHANGES:
- BankTransferCommonDetails property renamed from TransferTypeRecordSpecific
- Removed CreateGeorgian methods that auto-prefixed "GE" to IBANs

Major improvements:
- Fixed NuGet package to bundle BankIntegrationTypes DLL without listing it as a dependency
- Added PrivateAssets="all" to prevent transitive dependency issues
- Introduced modern value object types with validation:
  - `Iban` (replaces BankAccountV) with IBAN format validation
  - `Currency` (replaces CurrencyV) with ISO 4217 validation
  - `BankAccount` (replaces BankAccountWithCurrencyV) combining IBAN and currency
- Added static factory methods with Result<T> pattern for all API classes
- Fixed broken documentation link for payment order status

Migration guide:
- Replace `TransferTypeRecordSpecific` with `BankTransferCommonDetails`
- Use new types: BankAccount.Create() instead of BankAccountWithCurrencyV
- Original types marked as [Obsolete] but still functional

*Collaboration by Claude*

Co-Authored-By: Claude <noreply@anthropic.com>
@petre-c petre-c force-pushed the feat/modern-api-v2.0.0 branch from b01d275 to 4f1421f Compare August 5, 2025 06:02
@petre-c petre-c merged commit bb77866 into main Aug 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments