/** * Perform an 'item' request for the CheckfrontModule.package_category_id() category with 'packages' option set on. * * @param null $startDate * @param null $endDate * @param array $filters * @return CheckfrontAPIPackagesResponse */ public function listPackages($startDate = null, $endDate = null, array $filters = array()) { static $cache = array(); $cacheKey = md5(implode('|', array($startDate, $endDate, implode('|', $filters)))); if (!isset($cache[$cacheKey])) { $params = self::request_params(__FUNCTION__, array('category_id' => CheckfrontModule::package_category_id(), 'packages' => true), $this->buildDates($startDate, $endDate), $filters); $cache[$cacheKey] = CheckfrontAPIPackagesResponse::create($this()->api(new CheckfrontAPIRequest("item", $params))); } return $cache[$cacheKey]; }