Skip to content

LITE-33042 Support monthly_trial billing period#246

Merged
pcaro merged 1 commit into
masterfrom
LITE-33042-support-monthly-trial-billing-period
Jun 25, 2026
Merged

LITE-33042 Support monthly_trial billing period#246
pcaro merged 1 commit into
masterfrom
LITE-33042-support-monthly-trial-billing-period

Conversation

@pcaro

@pcaro pcaro commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add monthly_trial to the BILLING_PERIOD tuple in constants.py
  • Add monthly_trial: ('-',) to ALLOWED_COMMITMENTS (trial periods allow no long-term commitment)
  • Fix _get_billing_period() to pass monthly_trial through 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 pass
  • Updated test_validate_wrong_period_reservation expected error message to include monthly_trial
  • New test test_validate_monthly_trial_period_wrong_commitment covers commitment restriction
  • Manually clone a product with monthly_trial items and confirm 0 errors

Closes LITE-33042

🤖 Generated with Claude Code

@CLAassistant

CLAassistant commented Jun 22, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@pcaro pcaro self-assigned this Jun 25, 2026
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>
@pcaro pcaro force-pushed the LITE-33042-support-monthly-trial-billing-period branch from 1cf5db4 to 5fce86c Compare June 25, 2026 13:49
@sonarqubecloud

Copy link
Copy Markdown

@pcaro pcaro marked this pull request as ready for review June 25, 2026 13:59
@pcaro pcaro merged commit 0fce53b into master Jun 25, 2026
6 checks passed
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.

3 participants