From 6401126cafa57ece9667480a716c5019dc1f536b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20G=C3=B6r=C3=9F?= Date: Tue, 18 Jun 2024 14:04:07 +0200 Subject: [PATCH] fix: add record ids to create --- src/Query/ActivityBuilder.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/Query/ActivityBuilder.php b/src/Query/ActivityBuilder.php index b147fee..a78b9fc 100644 --- a/src/Query/ActivityBuilder.php +++ b/src/Query/ActivityBuilder.php @@ -139,6 +139,10 @@ public function modify(int $id): bool */ public function create(array $data): bool { + $data = array_replace($data, [ + $this->estateOrAddress => $this->recordIds, + ]); + $response = $this->onOfficeService->requestApi( OnOfficeAction::Create, OnOfficeResourceType::Activity, @@ -161,4 +165,18 @@ public function address(): static return $this; } + + public function recordIdsAsEstate(): static + { + $this->estate(); + + return $this; + } + + public function recordIdsAsAddress(): static + { + $this->address(); + + return $this; + } }