-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathConnectWebview.php
More file actions
39 lines (35 loc) · 1.18 KB
/
ConnectWebview.php
File metadata and controls
39 lines (35 loc) · 1.18 KB
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
<?php
namespace Seam\Objects;
class ConnectWebview
{
public static function from_json(mixed $json): ConnectWebview|null
{
if (!$json) {
return null;
}
return new self(
connect_webview_id: $json->connect_webview_id,
workspace_id: $json->workspace_id,
url: $json->url,
connected_account_id: $json->connected_account_id ?? null,
created_at: $json->created_at,
status: $json->status,
custom_redirect_url: $json->custom_redirect_url ?? null,
custom_redirect_failure_url: $json->custom_redirect_failure_url ?? null,
error: SeamError::from_json($json->error ?? null)
);
}
public function __construct(
public string $connect_webview_id,
public string $workspace_id,
public string $url,
public string|null $connected_account_id,
/* Can be "pending", "authorized" or "error" */
public string $status,
public string|null $custom_redirect_url,
public string|null $custom_redirect_failure_url,
public string $created_at,
public SeamError|null $error
) {
}
}