protected function parseResponse($response, $setAttributes = true)
	{
		if ($response['code'] == 200)
		{
			$data = $this->api->parseResponse($response['response'], $response['format']);

			if ($response['format'] == 'xml') {
				$data = json_encode($data);
				$data = json_decode($data, true);
			}

			// print_r($data);

			if ($setAttributes && is_array($data))
				$this->setAttributes($data);

			return $data;
		}
		elseif ($response['code'] == 404)
		{
			return false;
		}
		else
		{
			throw new XeroGeneralException('Error from Xero: ' . $response['response']);
		}
	}