From 15748d13ab69f7475dbf5f5e2f57e34197612dde Mon Sep 17 00:00:00 2001 From: Jay Pounder Date: Thu, 15 Sep 2022 11:14:48 +0100 Subject: [PATCH] surfaces software --- src/eCloud/Client.php | 8 ++++++++ src/eCloud/Entities/Software.php | 23 +++++++++++++++++++++++ src/eCloud/SoftwareClient.php | 26 ++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 src/eCloud/Entities/Software.php create mode 100644 src/eCloud/SoftwareClient.php diff --git a/src/eCloud/Client.php b/src/eCloud/Client.php index a72f7bfe..34b0b90b 100644 --- a/src/eCloud/Client.php +++ b/src/eCloud/Client.php @@ -375,4 +375,12 @@ public function resourceTiers() { return (new ResourceTierClient($this->httpClient))->auth($this->token); } + + /** + * @return BaseClient + */ + public function software() + { + return (new SoftwareClient($this->httpClient))->auth($this->token); + } } diff --git a/src/eCloud/Entities/Software.php b/src/eCloud/Entities/Software.php new file mode 100644 index 00000000..f120e4fc --- /dev/null +++ b/src/eCloud/Entities/Software.php @@ -0,0 +1,23 @@ + 'id', + 'name' => 'name', + 'platform' => 'platform', + 'license' => 'license', + ]; +} diff --git a/src/eCloud/SoftwareClient.php b/src/eCloud/SoftwareClient.php new file mode 100644 index 00000000..05676dc7 --- /dev/null +++ b/src/eCloud/SoftwareClient.php @@ -0,0 +1,26 @@ +apiToFriendly($data, $this->getEntityMap()) + ); + } + + public function getEntityMap() + { + return Software::$entityMap; + } +}