2023-08-30 10:37:08 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Service\Forms\Webhooks;
|
|
|
|
|
|
|
|
use App\Models\Forms\Form;
|
|
|
|
|
|
|
|
class ZapierHandler extends AbstractWebhookHandler
|
|
|
|
{
|
|
|
|
public function __construct(protected Form $form, protected array $data, protected string $webhookUrl)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function getProviderName(): ?string
|
|
|
|
{
|
|
|
|
return 'zapier';
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function getWebhookUrl(): string
|
|
|
|
{
|
|
|
|
return $this->webhookUrl;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function shouldRun(): bool
|
|
|
|
{
|
2024-02-23 10:54:12 +00:00
|
|
|
return ! is_null($this->getWebhookUrl());
|
2023-08-30 10:37:08 +00:00
|
|
|
}
|
|
|
|
}
|