Skip to content

Commit 5cfbe45

Browse files
committed
ci: Generate code
1 parent f1ac527 commit 5cfbe45

File tree

4 files changed

+155
-46
lines changed

4 files changed

+155
-46
lines changed

src/Objects/AccessGrant.php

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Objects/DeviceProperties.php

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Objects/PartnerResource.php

Lines changed: 0 additions & 43 deletions
This file was deleted.

src/SeamClient.php

Lines changed: 146 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
use Seam\Objects\MagicLink;
2929
use Seam\Objects\NoiseThreshold;
3030
use Seam\Objects\Pagination;
31-
use Seam\Objects\PartnerResource;
3231
use Seam\Objects\Phone;
3332
use Seam\Objects\PhoneRegistration;
3433
use Seam\Objects\PhoneSession;
@@ -65,6 +64,7 @@ class SeamClient
6564
public ClientSessionsClient $client_sessions;
6665
public ConnectWebviewsClient $connect_webviews;
6766
public ConnectedAccountsClient $connected_accounts;
67+
public CustomersClient $customers;
6868
public DevicesClient $devices;
6969
public EventsClient $events;
7070
public LocksClient $locks;
@@ -107,6 +107,7 @@ public function __construct(
107107
$this->client_sessions = new ClientSessionsClient($this);
108108
$this->connect_webviews = new ConnectWebviewsClient($this);
109109
$this->connected_accounts = new ConnectedAccountsClient($this);
110+
$this->customers = new CustomersClient($this);
110111
$this->devices = new DevicesClient($this);
111112
$this->events = new EventsClient($this);
112113
$this->locks = new LocksClient($this);
@@ -990,6 +991,30 @@ public function list(
990991
$res->access_grants
991992
);
992993
}
994+
995+
public function update(
996+
string $access_grant_id,
997+
?string $ends_at = null,
998+
?string $starts_at = null
999+
): void {
1000+
$request_payload = [];
1001+
1002+
if ($access_grant_id !== null) {
1003+
$request_payload["access_grant_id"] = $access_grant_id;
1004+
}
1005+
if ($ends_at !== null) {
1006+
$request_payload["ends_at"] = $ends_at;
1007+
}
1008+
if ($starts_at !== null) {
1009+
$request_payload["starts_at"] = $starts_at;
1010+
}
1011+
1012+
$this->seam->request(
1013+
"POST",
1014+
"/access_grants/update",
1015+
json: (object) $request_payload
1016+
);
1017+
}
9931018
}
9941019

9951020
class AccessMethodsClient
@@ -2829,6 +2854,126 @@ public function update(
28292854
}
28302855
}
28312856

2857+
class CustomersClient
2858+
{
2859+
private SeamClient $seam;
2860+
2861+
public function __construct(SeamClient $seam)
2862+
{
2863+
$this->seam = $seam;
2864+
}
2865+
2866+
public function create_portal(
2867+
mixed $features = null,
2868+
?bool $is_embedded = null,
2869+
mixed $customer_data = null
2870+
): MagicLink {
2871+
$request_payload = [];
2872+
2873+
if ($features !== null) {
2874+
$request_payload["features"] = $features;
2875+
}
2876+
if ($is_embedded !== null) {
2877+
$request_payload["is_embedded"] = $is_embedded;
2878+
}
2879+
if ($customer_data !== null) {
2880+
$request_payload["customer_data"] = $customer_data;
2881+
}
2882+
2883+
$res = $this->seam->request(
2884+
"POST",
2885+
"/customers/create_portal",
2886+
json: (object) $request_payload
2887+
);
2888+
2889+
return MagicLink::from_json($res->magic_link);
2890+
}
2891+
2892+
public function push_data(
2893+
string $customer_key,
2894+
?array $access_grants = null,
2895+
?array $bookings = null,
2896+
?array $buildings = null,
2897+
?array $common_areas = null,
2898+
?array $facilities = null,
2899+
?array $guests = null,
2900+
?array $listings = null,
2901+
?array $properties = null,
2902+
?array $property_listings = null,
2903+
?array $reservations = null,
2904+
?array $residents = null,
2905+
?array $rooms = null,
2906+
?array $spaces = null,
2907+
?array $tenants = null,
2908+
?array $units = null,
2909+
?array $user_identities = null,
2910+
?array $users = null
2911+
): void {
2912+
$request_payload = [];
2913+
2914+
if ($customer_key !== null) {
2915+
$request_payload["customer_key"] = $customer_key;
2916+
}
2917+
if ($access_grants !== null) {
2918+
$request_payload["access_grants"] = $access_grants;
2919+
}
2920+
if ($bookings !== null) {
2921+
$request_payload["bookings"] = $bookings;
2922+
}
2923+
if ($buildings !== null) {
2924+
$request_payload["buildings"] = $buildings;
2925+
}
2926+
if ($common_areas !== null) {
2927+
$request_payload["common_areas"] = $common_areas;
2928+
}
2929+
if ($facilities !== null) {
2930+
$request_payload["facilities"] = $facilities;
2931+
}
2932+
if ($guests !== null) {
2933+
$request_payload["guests"] = $guests;
2934+
}
2935+
if ($listings !== null) {
2936+
$request_payload["listings"] = $listings;
2937+
}
2938+
if ($properties !== null) {
2939+
$request_payload["properties"] = $properties;
2940+
}
2941+
if ($property_listings !== null) {
2942+
$request_payload["property_listings"] = $property_listings;
2943+
}
2944+
if ($reservations !== null) {
2945+
$request_payload["reservations"] = $reservations;
2946+
}
2947+
if ($residents !== null) {
2948+
$request_payload["residents"] = $residents;
2949+
}
2950+
if ($rooms !== null) {
2951+
$request_payload["rooms"] = $rooms;
2952+
}
2953+
if ($spaces !== null) {
2954+
$request_payload["spaces"] = $spaces;
2955+
}
2956+
if ($tenants !== null) {
2957+
$request_payload["tenants"] = $tenants;
2958+
}
2959+
if ($units !== null) {
2960+
$request_payload["units"] = $units;
2961+
}
2962+
if ($user_identities !== null) {
2963+
$request_payload["user_identities"] = $user_identities;
2964+
}
2965+
if ($users !== null) {
2966+
$request_payload["users"] = $users;
2967+
}
2968+
2969+
$this->seam->request(
2970+
"POST",
2971+
"/customers/push_data",
2972+
json: (object) $request_payload
2973+
);
2974+
}
2975+
}
2976+
28322977
class DevicesClient
28332978
{
28342979
private SeamClient $seam;

0 commit comments

Comments
 (0)