Add lago_invoice_id to WalletTransactionResponse - #379
Merged
Merged
Conversation
annvelents
approved these changes
Mar 5, 2026
This was referenced Jul 17, 2026
Closed
vincent-pochet
pushed a commit
that referenced
this pull request
Jul 21, 2026
The Lago API returns the invoice identifier under `lago_invoice_id`, but `CustomerUsageResponse` declared it as `invoice_id`. Because pydantic drops unknown fields by default, the value was silently discarded and the field was always null. Rename the field to `lago_invoice_id` to match the API payload (same fix applied to `WalletTransactionResponse` in #379), affecting both the `current_usage` and `past_usage` endpoints. Update the current-usage fixture and add assertions covering the field. Fixes #407 Co-authored-by: Ayush Kumar Sharaf <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
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.
Summary:
Adds lago_invoice_id as an optional field to WalletTransactionResponse, enabling tracing wallet transactions back to the invoice
Changes:
lago_python_client/models/wallet_transaction.py — Added lago_invoice_id: Optional[str] to WalletTransactionResponse
tests/fixtures/wallet_transaction.json — Updated fixture to include lago_invoice_id (with both populated and null values)
tests/test_wallet_transaction_client.py — Added test validating lago_invoice_id is correctly parsed from the response