/**
  * @param string $startDate
  * @param int|string $numDays
  * @param array $filters
  * @return CheckfrontAPIItemsResponse
  * @throws CheckfrontAPIErrorException|Exception
  */
 public function listItems($startDate = 'today', $numDays = CheckfrontModule::DefaultAvailabilityNumDays, array $filters = array())
 {
     $query = array_merge(array("start_date" => CheckfrontModule::checkfront_date($startDate), "end_date" => CheckfrontModule::checkfront_date($numDays)), $filters);
     return CheckfrontAPIItemsResponse::create($this()->api(new CheckfrontAPIRequest("item", $query)));
 }
 public function buildDates($startDate, $endDate)
 {
     $numDays = static::get_config_setting('default_num_days');
     return array('start_date' => CheckfrontModule::checkfront_date($startDate ?: static::get_config_setting('default_start_date')), 'end_date' => CheckfrontModule::checkfront_date($endDate ?: (static::get_config_setting('default_end_date') ?: "{$startDate} +{$numDays} day")));
 }