diff --git a/src/Loadbalancers/Client.php b/src/Loadbalancers/Client.php index 05fbfc8b..717cfe3c 100644 --- a/src/Loadbalancers/Client.php +++ b/src/Loadbalancers/Client.php @@ -52,4 +52,9 @@ public function deployments() { return (new DeploymentClient($this->httpClient))->auth($this->token); } + + public function errorPages() + { + return (new ErrorPageClient($this->httpClient))->auth($this->token); + } } diff --git a/src/Loadbalancers/Entities/ErrorPage.php b/src/Loadbalancers/Entities/ErrorPage.php new file mode 100644 index 00000000..94a3c111 --- /dev/null +++ b/src/Loadbalancers/Entities/ErrorPage.php @@ -0,0 +1,18 @@ + 'id', + 'target_group_id' => 'targetGroupId', + 'status_codes' => 'statusCodes', + 'content' => 'content', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt', + ]; + } + + public function loadEntity($data) + { + return new ErrorPage( + $this->apiToFriendly($data, $this->getEntityMap()) + ); + } +}