diff --git a/app/Console/Commands/Connectors/Zoho/ZohoLeadsDownloadCommand.php b/app/Console/Commands/Connectors/Zoho/ZohoLeadsDownloadCommand.php new file mode 100644 index 000000000..b0d5541b0 --- /dev/null +++ b/app/Console/Commands/Connectors/Zoho/ZohoLeadsDownloadCommand.php @@ -0,0 +1,52 @@ +argument('app_id')); + $this->overwriteAppService($app); + $company = Companies::getById((int) $this->argument('company_id')); + $leadReceiver = LeadReceiver::getByIdFromCompanyApp((int) $this->argument('receiver_id'), $company, $app); + $page = (int) $this->argument('page'); + $leadsPerPage = (int) $this->argument('leadsPerPage'); + + $downloadAllLeads = new DownloadAllZohoLeadAction($app, $company, $leadReceiver); + $downloadAllLeads->execute($page, $leadsPerPage); + + $this->info($downloadAllLeads->getTotalLeadsProcessed() . ' leads downloaded from Zoho to ' . $leadReceiver->name); + + return; + } +}