Files
calendar/apps
MorganGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2a30ba9d3c feat: skip platform billing for non-platform-managed users in 2024-08-13 API (#27586)
* feat: skip platform billing for non-platform-managed users in 2024-08-13 API

- Add isPlatformManaged check in billBooking() to skip billing for regular users
- Add isPlatformManaged check in billRescheduledBooking() to skip billing for regular users
- Add isPlatformManagedUserBooking check in cancelBooking() to skip billing cancellation for regular users
- Add E2E tests to verify billing behavior for both regular and platform-managed users

Co-Authored-By: morgan@cal.com <morgan@cal.com>

* refactor: reuse booking data for isPlatformManaged instead of fetching user

- Capture isPlatformManagedUserBooking from raw booking data returned by regularBookingService.createBooking() and recurringBookingService.createBooking()
- Pass the flag through the output booking objects
- Update billBooking() and billRescheduledBooking() to use the flag instead of fetching user from database
- Matches the pattern used in 2024-04-15 controller

Co-Authored-By: morgan@cal.com <morgan@cal.com>

* fix: skip platform billing in booking service for non platform

* fix: use double negation for boolean type safety in isPlatformManagedUserBooking

Co-Authored-By: morgan@cal.com <morgan@cal.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-02-04 10:26:38 -03:00
..