laravel-shop/src/Services
Fabian @ Blax Software f6f8916bed feat(metrics): subscription MRR API on Shop facade
Add Shop::mrr(), activeSubscribers(), mrrByProduct(), subscriptionMetrics()
and subscriberStatuses() to ShopService. Counts active/past_due/trialing
subscribers (not `ends_at IS NULL`, which silently drops still-billing
cancel-at-period-end subs and under-reports MRR), normalizes every interval
to a monthly run-rate (year/12, quarter/3, week & day by the average
days-per-month constant so they match Stripe), and returns `unpriced_items`
so a stale or incomplete price mirror is surfaced, never a silent undercount.

Additive only: no existing method changed. Covered by MrrMetricsTest.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-28 13:38:42 +02:00
..
PaymentProvider feat: Enhance traits with strict types and improve method signatures 2026-05-15 20:26:24 +02:00
CartService.php feat: Enhance traits with strict types and improve method signatures 2026-05-15 20:26:24 +02:00
DenyAllEntitlementChecker.php feat(pricing): conditional prices via meta.requires + entitlement-checker resolver 2026-08-26 12:35:14 +02:00
SeatService.php feat(seats): assignable license seats — buy N, assign/reassign/reclaim per user 2026-07-29 10:07:58 +02:00
ShopService.php feat(metrics): subscription MRR API on Shop facade 2026-08-28 13:38:42 +02:00
StripeSyncService.php feat: Enhance traits with strict types and improve method signatures 2026-05-15 20:26:24 +02:00
TaxService.php feat(tax): configurable TaxService applied across every checkout path 2026-08-21 08:23:56 +02:00