public static function fromHttpResponse(HttpResponse $httpResponse)
    {
        $result = json_decode($httpResponse->getResult());
        $primaryData = self::parsePrimaryData($result);
        $resultSet = new ResultSet();
        foreach ($primaryData as $primaryDataItem) {
            if ($primaryDataItem instanceof \stdClass) {
                $primaryDataItem = ArrayHelper::stdClassToArray($primaryDataItem);
            }
            $item = new ResultItem($primaryDataItem);
            $resultSet->append($item);
        }
        return $resultSet;
    }