Add structured reference and instant payment support#71
Closed
vincestus wants to merge 2 commits into
Closed
Conversation
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit combines multiple feature additions and improvements:
Structured Description Support:
- Add structured_description field for ISO 11649 RF and Belgian BBA formats
- Implement validate_structured_description() with format validation
- _validate_bba_description() for Belgian BBA format (XXX/XXXX/XXXCC)
- _validate_iso11649_description() for ISO 11649 RF format
- Support structured_description_type parameter ('ISO' or 'BBA', defaults to 'ISO')
- Support structured_description_issuer parameter for customization
- Raise ValueError for invalid structured descriptions
- Comprehensive test coverage for both formats
Instant Payment Support:
- Add 'instant' flag to enable SEPA Instant Credit Transfer (SCT Inst)
- Set <LclInstrm><Cd>INST</Cd> for instant payments
- Support instant payments in both batch and non-batch modes
- Batch payments by (execution_date, instant) tuple
- Tests for instant payment scenarios
API Changes:
- Renamed structured_reference → structured_description
- Renamed structured_reference_type → structured_description_type
- Renamed structured_reference_issuer → structured_description_issuer
- Must use either 'description' or 'structured_description', not both
New PAIN Schema Support:
- pain.001.001.09, pain.001.001.10, pain.001.001.11
- pain.008.001.08, pain.008.001.09, pain.008.001.10
Bug Fixes:
- Fix XML ElementTree deprecation warnings
- Fix pytest return value warnings
- Improve XML element truth value testing
Documentation:
- Complete README update with structured description examples
- Document both ISO 11649 and Belgian BBA formats
- Add instant payment usage examples
- Update all inline comments and docstrings
All tests pass (45 tests total).
�� Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds two major features to python-sepaxml:
Structured Description Support
Adds support for structured creditor references in both SEPA Direct Debit and SEPA Credit Transfer transactions:
Usage:
Instant Payment Support
Adds support for SEPA Instant Credit Transfers (SCT Inst) with the instant_payment flag:
Usage:
Additional Improvements
All 45 tests passing.