Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add lago_invoice_id to WalletTransactionResponse - #379

Merged
annvelents merged 2 commits into
mainfrom
add-lago-invoice-id-to-wallet-transaction
Mar 6, 2026
Merged

annvelents merged 2 commits into
mainfrom
add-lago-invoice-id-to-wallet-transaction

Conversation

@anassg-lago

Copy link
Copy Markdown
Contributor

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

@anassg-lago
anassg-lago requested a review from annvelents March 3, 2026 17:35
@annvelents
annvelents merged commit 2b393c5 into main Mar 6, 2026
7 checks passed
@annvelents
annvelents deleted the add-lago-invoice-id-to-wallet-transaction branch March 6, 2026 12:14
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]>
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