Pull Request Overview
Adds support for a resale origin on gifts and introduces a new next_transfer_date field across gift-related models.
- Extend
UniqueGiftInfoOriginwithRESALEand add corresponding fields (last_resale_star_count,next_transfer_date) - Update
UniqueGiftInfo,OwnedGiftUnique, and related JSON (de)serialization to handle the new fields - Enhance tests to cover the new fields and enum conversion
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file| File | Description |
|---|---|
| tests/test_uniquegift.py | Added assertions for last_resale_star_count and next_transfer_date, plus an enum type test |
| tests/test_ownedgift.py | Added next_transfer_date assertions and removed unused import |
| src/telegram/constants.py | Introduced RESALE in UniqueGiftInfoOrigin |
| src/telegram/_uniquegift.py | Added last_resale_star_count & next_transfer_date handling |
| src/telegram/_ownedgift.py | Added next_transfer_date handling for OwnedGiftUnique |
src/telegram/constants.py:3215
- [nitpick] Consider adding a period at the end of this docstring description for consistency with other enum entries.
""":obj:`str` gift bought from other users
tests/test_uniquegift.py:390
- Add a dedicated test case for the RESALE origin to verify
last_resale_star_countis parsed and serialized correctly when origin is RESALE.
last_resale_star_count=UniqueGiftInfoTestBase.last_resale_star_count,