Skip to content

Commit 89c0b69

Browse files
committed
Add the organization country property
1 parent a660e63 commit 89c0b69

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/Model/Organization/Organization.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88
use Platformsh\Client\Model\Organization\Invitation\OrganizationInvitation;
99
use Platformsh\Client\Model\Ref\UserRef;
1010
use Platformsh\Client\Model\ResourceWithReferences;
11-
use Platformsh\Client\Model\Subscription;
1211
use Platformsh\Client\Model\Result;
12+
use Platformsh\Client\Model\Subscription;
1313

1414
/**
15-
* @property-read string $id
16-
* @property-read string $owner_id
15+
* @property-read string $id The organization ID
16+
* @property-read string $owner_id The user ID of the organization owner
17+
* @property-read string $name The organization's machine name (used in URLs)
18+
* @property-read string $label The organization's "human-readable" name
19+
* @property-read string $country ISO 2-letter country code
1720
* @property-read string $namespace
18-
* @property-read string $name
19-
* @property-read string $label
2021
* @property-read string $created_at
2122
* @property-read string $updated_at
2223
*/

src/PlatformClient.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,16 +589,17 @@ public function getOrganizationById($id)
589589
*
590590
* @param string $name
591591
* @param string $label
592+
* @param string $country An ISO 2-letter country code.
592593
*
593594
* @return Organization
594595
*/
595-
public function createOrganization($name, $label = '')
596+
public function createOrganization($name, $label = '', $country = '')
596597
{
597598
if (!$this->connector->getApiUrl()) {
598599
throw new \RuntimeException('No API URL configured');
599600
}
600601
$url = '/organizations';
601-
$values = ['name' => $name, 'label' => $label];
602+
$values = ['name' => $name, 'label' => $label, 'country' => $country];
602603
return Organization::create($values, $url, $this->connector->getClient());
603604
}
604605
}

0 commit comments

Comments
 (0)