Skip to content

Commit 7c9600c

Browse files
committed
Support setting an organization owner
1 parent 14b4a81 commit 7c9600c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/PlatformClient.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,16 +590,20 @@ public function getOrganizationById($id)
590590
* @param string $name
591591
* @param string $label
592592
* @param string $country An ISO 2-letter country code.
593+
* @param string $owner The organization owner ID. Leave empty to use the current user.
593594
*
594595
* @return Organization
595596
*/
596-
public function createOrganization($name, $label = '', $country = '')
597+
public function createOrganization($name, $label = '', $country = '', $owner = '')
597598
{
598599
if (!$this->connector->getApiUrl()) {
599600
throw new \RuntimeException('No API URL configured');
600601
}
601602
$url = '/organizations';
602603
$values = ['name' => $name, 'label' => $label, 'country' => $country];
604+
if ($owner !== '') {
605+
$values['owner'] = $owner;
606+
}
603607
return Organization::create($values, $url, $this->connector->getClient());
604608
}
605609
}

0 commit comments

Comments
 (0)