LITE-33042 Support monthly_trial billing period#246
Merged
Conversation
Add the `monthly_trial` billing period for product items:
- Add `monthly_trial` to the `BILLING_PERIOD` tuple in `constants.py`.
- Add `monthly_trial: ('-',)` to `ALLOWED_COMMITMENTS`; trial periods
allow no long-term commitment.
- Pass `monthly_trial` through `_get_billing_period()` as-is so it is not
treated as a multi-year period and split on whitespace.
Tests cover the happy path, the commitment restriction, and the
multi-year split branch to keep full coverage on the changed condition.
Closes LITE-33042
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1cf5db4 to
5fce86c
Compare
|
arnaugiralt
approved these changes
Jun 25, 2026
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
monthly_trialto theBILLING_PERIODtuple inconstants.pymonthly_trial: ('-',)toALLOWED_COMMITMENTS(trial periods allow no long-term commitment)_get_billing_period()to passmonthly_trialthrough as-is (prevents crash on space-split for multi-year conversion)Test plan
poetry run pytest tests/plugins/product/sync/test_items.py -x -q— all passtest_validate_wrong_period_reservationexpected error message to includemonthly_trialtest_validate_monthly_trial_period_wrong_commitmentcovers commitment restrictionmonthly_trialitems and confirm 0 errorsCloses LITE-33042
🤖 Generated with Claude Code