<?php

declare(strict_types=1);

namespace App\Listeners\Academy;

use App\Services\Academy\AcademyStripeWebhookAuditService;
use Laravel\Cashier\Events\WebhookHandled;

final class HandleAcademyStripeWebhookHandled
{
    public function __construct(
        private readonly AcademyStripeWebhookAuditService $audit,
    ) {}

    public function handle(WebhookHandled $event): void
    {
        $this->audit->recordHandled($event->payload);
    }
}