Skip to content

Commit

Permalink
fix: add record ids to create
Browse files Browse the repository at this point in the history
  • Loading branch information
Katalam committed Jun 18, 2024
1 parent af68e26 commit 6401126
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Query/ActivityBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
}
}

0 comments on commit 6401126

Please sign in to comment.