feat(backend): add volume and graduated tiers to metered prices

Merged
MA
2mo ago
+692-68

Summary

This PR adds volume and graduated pricing tiers to metered prices, behind a internal org feature flag.

Supersedes https://github.com/polarsource/polar/pull/13793 ; taking @frankie567 feedback into account.

Checklist

  • This PR addresses a single concern (one bug fix, one feature, one refactor)
  • The diff is reasonably sized and easy to review
  • New functionality is covered by tests
  • Linting and type checking pass (uv run task lint && uv run task lint_types)
  • No unrelated changes or drive-by fixes are included