RestService :: deleteProvider: Bitrix method

      
<?php 
//  Bitrix\Bizproc\RestService :: deleteProvider()
//  /dist/bitrix/modules/bizproc/lib/restservice.php:1165

    
public static function deleteProvider($params$n$server)
    {
        if (
Loader::includeModule('messageservice'))
        {
            return \
Bitrix\MessageService\RestService::deleteSender($params$n$server);
        }

        if(!
$server->getClientId())
        {
            throw new 
AccessException("Application context required");
        }

        
$params array_change_key_case($paramsCASE_UPPER);
        
self::checkAdminPermissions();
        
self::validateActivityCode($params['CODE']);
        
$params['APP_ID'] = $server->getClientId();

        
$iterator RestProviderTable::getList(array(
            
'select' => array('ID'),
            
'filter' => array(
                
'=APP_ID' => $params['APP_ID'],
                
'=CODE' => $params['CODE']
            )
        ));
        
$result $iterator->fetch();
        if (!
$result)
        {
            throw new 
RestException('Provider not found!'self::ERROR_ACTIVITY_NOT_FOUND);
        }
        
RestProviderTable::delete($result['ID']);

        return 
true;
    }