-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathModelWebhook.php
More file actions
43 lines (37 loc) · 868 Bytes
/
Copy pathModelWebhook.php
File metadata and controls
43 lines (37 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
declare(strict_types=1);
namespace Mindee\V2\Parsing\Search;
use Stringable;
/**
* Model webhook information.
*/
class ModelWebhook implements Stringable
{
/**
* @var string ID of the webhook.
*/
public string $id;
/**
* @var string Name of the webhook.
*/
public string $name;
/**
* @var string URL of the webhook.
*/
public string $url;
/**
* @param array<string, int|float|string|bool|null|array<array-key, mixed>> $rawResponse
*/
public function __construct(array $rawResponse)
{
$this->id = $rawResponse['id'];
$this->name = $rawResponse['name'];
$this->url = $rawResponse['url'];
}
public function __toString(): string
{
return ":Name: $this->name\n"
. ":ID: $this->id\n"
. ":URL: $this->url\n";
}
}