| 1 | <?php |
||
| 7 | abstract class WebhookCallEvent |
||
| 8 | { |
||
| 9 | /** @var string */ |
||
| 10 | public string $httpVerb; |
||
|
|
|||
| 11 | |||
| 12 | /** @var string */ |
||
| 13 | public string $webhookUrl; |
||
| 14 | |||
| 15 | /** @var array */ |
||
| 16 | public array $payload; |
||
| 17 | |||
| 18 | /** @var array */ |
||
| 19 | public array $headers; |
||
| 20 | |||
| 21 | /** @var array */ |
||
| 22 | public array $meta; |
||
| 23 | |||
| 24 | /** @var array */ |
||
| 25 | public array $tags; |
||
| 26 | |||
| 27 | /** @var int */ |
||
| 28 | public int $attempt; |
||
| 29 | |||
| 30 | /** @var \GuzzleHttp\Psr7\Response|null */ |
||
| 31 | public ?Response $response; |
||
| 32 | |||
| 33 | /** @var string */ |
||
| 34 | public ?string $errorType; |
||
| 35 | |||
| 36 | /** @var string */ |
||
| 37 | public ?string $errorMessage; |
||
| 38 | |||
| 39 | public function __construct( |
||
| 40 | string $httpVerb, |
||
| 41 | string $webhookUrl, |
||
| 42 | array $payload, |
||
| 43 | array $headers, |
||
| 44 | array $meta, |
||
| 45 | array $tags, |
||
| 46 | int $attempt, |
||
| 47 | ?Response $response, |
||
| 48 | ?string $errorType, |
||
| 49 | ?string $errorMessage |
||
| 50 | ) { |
||
| 51 | $this->httpVerb = $httpVerb; |
||
| 52 | $this->webhookUrl = $webhookUrl; |
||
| 53 | $this->payload = $payload; |
||
| 54 | $this->headers = $headers; |
||
| 55 | $this->meta = $meta; |
||
| 56 | $this->tags = $tags; |
||
| 57 | $this->attempt = $attempt; |
||
| 58 | $this->response = $response; |
||
| 59 | $this->errorType = $errorType; |
||
| 60 | $this->errorMessage = $errorMessage; |
||
| 61 | } |
||
| 62 | } |
||
| 63 |