Skip to content

Initialize effective enum when decoding subscription modify descriptors - #217

Closed
r4venrudy wants to merge 1 commit into
apple:mainfrom
r4venrudy:fix/modify-descriptors-effective
Closed

r4venrudy wants to merge 1 commit into
apple:mainfrom
r4venrudy:fix/modify-descriptors-effective

Conversation

@r4venrudy

Copy link
Copy Markdown

Deserializing AdvancedCommerceSubscriptionModifyDescriptors with effective: "IMMEDIATELY" or "NEXT_BILL_CYCLE" leaves effective as None, even though rawEffective contains a recognized value. The same happens when constructing the model with rawEffective, and an enum-valued model no longer compares equal after a serialization round trip.

Inherit AttrsRawValueAware, as the sibling period-change model does, so initialization synchronizes the enum and raw fields. Add coverage for both known values, round trips, unknown values, and later assignments.

Validation on Windows / Python 3.12: the fixture assertion and four regression subtests fail before the fix. Afterward, the full suite passes: 225 tests and 4 subtests (python -m pytest tests -q). git diff --check passes.

@alexanderjordanbaker

Copy link
Copy Markdown
Collaborator

Resolved via #218

@r4venrudy

r4venrudy commented Oct 20, 2026 •

Copy link
Copy Markdown
Author

you used my fix on your commit?

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