From c7419e9bcb12f4dbc256cf3fe98823557954b3dd Mon Sep 17 00:00:00 2001 From: Jay Pounder Date: Mon, 4 Jul 2022 09:06:30 +0100 Subject: [PATCH] surfaces default resource tier --- src/eCloud/AvailabilityZoneClient.php | 7 +------ src/eCloud/Entities/AvailabilityZone.php | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/eCloud/AvailabilityZoneClient.php b/src/eCloud/AvailabilityZoneClient.php index 8ffdb7fd..5e61b98a 100644 --- a/src/eCloud/AvailabilityZoneClient.php +++ b/src/eCloud/AvailabilityZoneClient.php @@ -23,12 +23,7 @@ public function loadEntity($data) public function getEntityMap() { - return [ - 'id' => 'id', - 'name' => 'name', - 'code' => 'code', - 'datacentre_site_id' => 'datacentreSiteId' - ]; + return AvailabilityZone::$entityMap; } public function getProducts($id, $filters = []) diff --git a/src/eCloud/Entities/AvailabilityZone.php b/src/eCloud/Entities/AvailabilityZone.php index 0c2f4e5a..3109005d 100644 --- a/src/eCloud/Entities/AvailabilityZone.php +++ b/src/eCloud/Entities/AvailabilityZone.php @@ -4,7 +4,24 @@ use UKFast\SDK\Entity; +/** + * @property int $id + * @property string $name + * @property string $code + * @property string $datacentreSiteId + * @property string $resourceTierId + * @property string $createdAt + * @property string $updatedAt + */ class AvailabilityZone extends Entity { protected $dates = ['createdAt', 'updatedAt']; + + public static $entityMap = [ + 'id' => 'id', + 'name' => 'name', + 'code' => 'code', + 'datacentre_site_id' => 'datacentreSiteId', + 'resource_tier_id' => 'resourceTierId', + ]; }