setApi($api); } /** * * create account in kerio, depends of product configuration * @param string $type * @return CreateAccount|CreateAccountCos|CreateAccountCosQuota */ public function createAccount($type = ClassOfServices::CUSTOM_ZIMBRA) { switch ($type) { case ClassOfServices::CUSTOM_ZIMBRA: $service = new CreateAccount($this->getApi()); break; case ClassOfServices::ZIMBRA_CONFIG_OPTIONS: $service = new CreateAccountCosQuota($this->getApi()); break; case ClassOfServices::CLASS_OF_SERVICE_QUOTA: $service = new CreateAccountCosQuota($this->getApi()); break; default: $service = new CreateAccountCosQuota($this->getApi()); break; } return $service; } /** * create alias for account in kerio * * @return CreateAccountAlias */ public function createAccountAlias() { return new CreateAccountAlias($this->getApi()); } /** * create distribution list (mailing list) * * @return CreateDistributionList */ public function createDistributionList() { return new CreateDistributionList($this->getApi()); } /** * create domain in kerio (main domain for account) * * * @return CreateDomain */ public function createDomain() { return new CreateDomain($this->getApi()); } /** * create alias domain for account * * @return CreateDomainAlias */ public function createDomainAlias() { return new CreateDomainAlias($this->getApi()); } /** * create ressource for account * * @return CreateRessource */ public function createRessource() { return new CreateRessource($this->getApi()); } /** * * change product package * * @return ChangePackage */ public function changePackages($type = ClassOfServices::CUSTOM_ZIMBRA) { switch ($type) { case ClassOfServices::CUSTOM_ZIMBRA: $service = new ChangePackage($this->getApi()); break; case ClassOfServices::ZIMBRA_CONFIG_OPTIONS: $service = new ChangePackageConfigOptions($this->getApi()); break; case ClassOfServices::CLASS_OF_SERVICE_QUOTA: $service = new ChangePackageCosQuota($this->getApi()); break; default: $service = new ChangePackageDedicatedCos($this->getApi()); break; } return $service; } /** * update account in panel * * @param string $type * @return UpdateAccount|UpdateAccountCosQuota */ public function updateAccount($type = ClassOfServices::CUSTOM_ZIMBRA) { switch ($type) { case ClassOfServices::CUSTOM_ZIMBRA: $service = new UpdateAccount($this->getApi()); break; case ClassOfServices::ZIMBRA_CONFIG_OPTIONS: $service = new UpdateAccount($this->getApi()); break; case ClassOfServices::CLASS_OF_SERVICE_QUOTA: $service = new UpdateAccountCosQuota($this->getApi()); break; default: $service = new UpdateAccount($this->getApi()); break; } return $service; } /** * update account status * * @return UpdateAccountStatus */ public function updateAccountStatus() { return new UpdateAccountStatus($this->getApi()); } /** * update ressource * * @return UpdateRessource */ public function updateRessource() { return new UpdateRessource($this->getApi()); } /** * update ressource status * * @return UpdateRessourceStatus */ public function updateRessourceStatus() { return new UpdateRessourceStatus($this->getApi()); } /** * change password service * * @return UpdateAccountPassword */ public function updateAccountPassword() { return new UpdateAccountPassword($this->getApi()); } /** * change password service * * @return UpdateRessourcePassword */ public function updateRessourcePassword() { return new UpdateRessourcePassword($this->getApi()); } /** * distribution (mailing) list update service * * @return UpdateDistributionList */ public function updateDistributionList() { return new UpdateDistributionList($this->getApi()); } /** * suspend domain in kerio * * @return SuspendDomain */ public function suspendDomain() { return new SuspendDomain($this->getApi()); } /** * unsuspend domain * * @return UnsuspendDomain */ public function unsuspendDomain() { return new UnsuspendDomain($this->getApi()); } /** * delete account in panel * * @return DeleteAccount */ public function deleteAccount() { return new DeleteAccount($this->getApi()); } /** * delete ressource in panel * * @return DeleteRessource */ public function deleteRessource() { return new DeleteRessource($this->getApi()); } /** * delete domain & each related things * * @return DeleteDomain */ public function deleteDomain() { return new DeleteDomain($this->getApi()); } /** * delete account alias * * @return DeleteAccountAlias */ public function deleteAccountAlias() { return new DeleteAccountAlias($this->getApi()); } /** * delete distribution list (mailing list) * * @return DeleteDistributionList */ public function deleteDistributionList() { return new DeleteDistributionList($this->getApi()); } /** * delete domain alias * * @return DeleteDomainAlias */ public function deleteDomainAlias() { return new DeleteDomainAlias($this->getApi()); } /** * * return sso token * @return ClientSingleSignOnToken */ public function clientSingleSignOnToken() { return new ClientSingleSignOnToken($this->getApi()); } }