protected function getResponseValue($propertyName, $class = null, AriClient $client = null)
    {
        if (property_exists($this->response, $propertyName)) {
            if ($class !== null) {
                if ($client instanceof AriClient) {
                    return new $class($client, $this->response->{$propertyName});
                } else {
                    return new $class($this->response->{$propertyName});
                }
            } else {
                return $this->response->{$propertyName};
            }
        } else {
            return null;
        }
    }