Skip to content

fix: preserve receipt subscription ids#172

Merged
brendanjryan merged 1 commit into
tempoxyz:mainfrom
Osraka:osraka/preserve-receipt-subscription-id
Jul 13, 2026
Merged

fix: preserve receipt subscription ids#172
brendanjryan merged 1 commit into
tempoxyz:mainfrom
Osraka:osraka/preserve-receipt-subscription-id

Conversation

@Osraka

@Osraka Osraka commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add optional Receipt.subscription_id support for subscriptionId receipt metadata.
  • Preserve subscriptionId when parsing receipts produced by another SDK and when formatting receipts back to Payment-Receipt.
  • Add regression coverage for optional-field roundtrip and foreign receipt parsing.

This aligns pympp with the Rust SDK receipt behavior, where subscription receipts keep subscriptionId as a first-class optional field instead of silently dropping it.

Tests

  • PYTHONPATH=/tmp/pympp-test-deps:src python3 -m pytest tests/test_parsing.py -q
  • PYTHONPATH=/tmp/pympp-test-deps:src python3 -m ruff check src/mpp/__init__.py src/mpp/_parsing.py tests/test_parsing.py
  • PYTHONPATH=/tmp/pympp-test-deps:src python3 -m py_compile src/mpp/__init__.py src/mpp/_parsing.py tests/test_parsing.py
  • git diff --check

@brendanjryan

Copy link
Copy Markdown
Collaborator

Thank you! Can you just add a changelog for this change? @Osraka

@Osraka

Osraka commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

The requested changelog is already present in this PR at .changelog/preserve-receipt-subscription-id.md with a pympp: patch bump, included in commit 2b29e62.\n\nThe failed changelog check did not reach changelog validation: it stopped during checkout because .github/workflows/changelog.yml checks out github.head_ref from tempoxyz/pympp, while this PR head is hosted in Osraka/pympp. The code, package, integration, conformance, and Python-version checks are passing. Please let me know if you would prefer any wording changes to the existing entry.

@brendanjryan

Copy link
Copy Markdown
Collaborator

ah good catch -- merging!

@brendanjryan brendanjryan merged commit 9b27b5b into tempoxyz:main Jul 13, 2026
13 of 14 checks 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.

2 participants