Scalr\Api\Service\User\V1beta0\Controller\CostCenters::describeAction PHP Method

describeAction() public method

Retrieves the list of the cost centers
public describeAction ( ) : array
return array Returns describe result
    public function describeAction()
    {
        $this->checkPermissions(Acl::RESOURCE_ANALYTICS_ACCOUNT);
        $criteria = $this->getDefaultCriteria();
        if (empty($this->params('name')) && empty($this->params('billingCode'))) {
            $criteria[] = ['archived' => CostCentreEntity::NOT_ARCHIVED];
        }
        return $this->adapter('costCenter')->getDescribeResult($criteria);
    }