public function processResourceRequestResponse(ResponseInterface $request)
    {
        $response = json_decode($request->getBody()->getContents());

        if (Response::HTTP_OK !== $request->getStatusCode() && Response::HTTP_CREATED !== $request->getStatusCode()) {
            return ExceptionHandler::handle(get_class($this), $response, $request->getStatusCode());
        }

        return (isset($response->data)) ? json_decode(json_encode($response->data), true) : json_decode(json_encode($response), true);
    }