Example #1
0
 /**
  * @param  null|CustomersFilter $data
  * @return null|void
  */
 public function customers($data = null)
 {
     $action = 'customers';
     $postMainParameters = null;
     if ($data instanceof CustomersFilter) {
         $this->addMainParameter($data->getId());
         $this->addSecondaryParameter('search_string', $data->getSearchString());
         $this->addSecondaryParameter('search_field', $data->getSearchField());
         $this->addSecondaryParameter('page_size', $data->getPageSize());
         $this->addSecondaryParameter('page', $data->getPage());
         $this->addSecondaryParameter('sort_fields', $data->getSortFields());
         $this->addSecondaryParameter('columns', $data->getColumns());
         $this->addSecondaryParameter('extend', $data->getExtend());
     } elseif (is_int($data)) {
         $this->addMainParameter($data);
     }
     $response = $this->call($action, $postMainParameters);
     $result = $this->handleResponse($response);
     return $result;
 }