diff --git a/CHANGELOG.md b/CHANGELOG.md index e191200..37eca66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ CHANGELOG ========= +6.53.0 +--- +* Add MailPackage API resources + 6.52.4 --- * Return correct results for querying on `resourceIdentifier` for Actions diff --git a/src/Entity/Email/MailPackage.php b/src/Entity/Email/MailPackage.php new file mode 100644 index 0000000..425617f --- /dev/null +++ b/src/Entity/Email/MailPackage.php @@ -0,0 +1,38 @@ +domain; + } + + public function setDomain(string $domain): void + { + $this->domain = $domain; + } + + public function getStatus(): string + { + return $this->status; + } + + public function setStatus(string $status): void + { + $this->status = $status; + } +} diff --git a/src/Repository/Email/MailPackageRepository.php b/src/Repository/Email/MailPackageRepository.php new file mode 100644 index 0000000..8ecf037 --- /dev/null +++ b/src/Repository/Email/MailPackageRepository.php @@ -0,0 +1,28 @@ +httpClient->get($this->getResourceUrl()); + $packagesArray = $this->getParameterFromResponse($response, 'packages'); + + return \array_map(static function (array $packageArray) { + return new MailPackage($packageArray); + }, $packagesArray); + } +} diff --git a/src/TransipAPI.php b/src/TransipAPI.php index 25d76b6..d23bb07 100644 --- a/src/TransipAPI.php +++ b/src/TransipAPI.php @@ -47,6 +47,7 @@ use Transip\Api\Library\Repository\Email\MailboxRepository; use Transip\Api\Library\Repository\Email\MailForwardRepository; use Transip\Api\Library\Repository\Email\MailListRepository; +use Transip\Api\Library\Repository\Email\MailPackageRepository; use Transip\Api\Library\Repository\Haip\CertificateRepository as HaipCertificateRepository; use Transip\Api\Library\Repository\Haip\IpAddressRepository as HaipIpAddressRepository; use Transip\Api\Library\Repository\Haip\PortConfigurationRepository; @@ -108,7 +109,7 @@ class TransipAPI { public const TRANSIP_API_ENDPOINT = "https://api.transip.nl/v6"; - public const TRANSIP_API_LIBRARY_VERSION = "6.52.4"; + public const TRANSIP_API_LIBRARY_VERSION = "6.53.0"; public const TRANSIP_API_DEMO_TOKEN = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImN3MiFSbDU2eDNoUnkjelM4YmdOIn0.eyJpc3MiOiJhcGkudHJhbnNpcC5ubCIsImF1ZCI6ImFwaS50cmFuc2lwLm5sIiwianRpIjoiY3cyIVJsNTZ4M2hSeSN6UzhiZ04iLCJpYXQiOjE1ODIyMDE1NTAsIm5iZiI6MTU4MjIwMTU1MCwiZXhwIjoyMTE4NzQ1NTUwLCJjaWQiOiI2MDQ0OSIsInJvIjpmYWxzZSwiZ2siOmZhbHNlLCJrdiI6dHJ1ZX0.fYBWV4O5WPXxGuWG-vcrFWqmRHBm9yp0PHiYh_oAWxWxCaZX2Rf6WJfc13AxEeZ67-lY0TA2kSaOCp0PggBb_MGj73t4cH8gdwDJzANVxkiPL1Saqiw2NgZ3IHASJnisUWNnZp8HnrhLLe5ficvb1D9WOUOItmFC2ZgfGObNhlL2y-AMNLT4X7oNgrNTGm-mespo0jD_qH9dK5_evSzS3K8o03gu6p19jxfsnIh8TIVRvNdluYC2wo4qDl5EW5BEZ8OSuJ121ncOT1oRpzXB0cVZ9e5_UVAEr9X3f26_Eomg52-PjrgcRJ_jPIUYbrlo06KjjX2h0fzMr21ZE023Gw"; /** @@ -605,6 +606,11 @@ public function mailLists(): MailListRepository return new MailListRepository($this->httpClient); } + public function mailPackages(): MailPackageRepository + { + return new MailPackageRepository($this->httpClient); + } + public function operatingSystemFilter(): OperatingSystemFilterRepository { return new OperatingSystemFilterRepository($this->httpClient);