Bill all meet sessions per participant instead of per hour.
Deploy Ladill Meet / deploy (push) Successful in 46s

Meetings and webinars now share GHS 0.30 per peak participant, with usage UI and plan quotas updated to match.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-01 18:28:35 +00:00
co-authored by Cursor
parent d0a3361f37
commit 5c1affcca5
8 changed files with 38 additions and 127 deletions
+1 -5
View File
@@ -47,9 +47,7 @@ class UsageMeteringService
$summary = [];
foreach ($raw as $metric => $total) {
if ($metric === 'streaming_hours') {
$summary['streaming_hours'] = round(((int) $total) / 100, 2);
} elseif ($metric === 'participant_count') {
if ($metric === 'participant_count') {
$summary['participant_count'] = (int) $total;
} else {
$summary[$metric] = (int) $total;
@@ -61,13 +59,11 @@ class UsageMeteringService
public function estimatedCostGhs(array $summary): array
{
$streamingHours = (float) ($summary['streaming_hours'] ?? 0);
$participantCount = (int) ($summary['participant_count'] ?? 0);
$recordingBytes = (int) ($summary['recording_storage_bytes'] ?? 0);
$fileBytes = (int) ($summary['file_storage_bytes'] ?? 0);
return [
'streaming' => round($streamingHours * $this->billing->pricePerHourGhs(), 2),
'participants' => round($participantCount * $this->billing->pricePerParticipantGhs(), 2),
'recording_storage' => round($this->billing->storageGb($recordingBytes) * $this->billing->pricePerGbMonthGhs(), 2),
'file_storage' => round($this->billing->storageGb($fileBytes) * $this->billing->pricePerGbMonthGhs(), 2),