Files
newwalls.pl/modules/mailchimppro/controllers/admin/AdminMailchimpProAutomationsController.php
2024-12-17 13:43:22 +01:00

49 lines
1.0 KiB
PHP

<?php
/**
* PrestaChamps
*
* NOTICE OF LICENSE
*
* This source file is subject to the Commercial License
* you can't distribute, modify or sell this code
*
* DISCLAIMER
*
* Do not edit or add to this file
* If you need help please contact leo@prestachamps.com
*
* @author Mailchimp
* @copyright PrestaChamps
* @license commercial
*/
/**
* Class AdminMailchimpProBatchesController
*/
class AdminMailchimpProAutomationsController extends \PrestaChamps\MailchimpPro\Controllers\BaseMCObjectController
{
public $entityPlural = 'automations';
public $entitySingular = 'workflow';
protected function getListApiEndpointUrl()
{
return '/automations';
}
protected function getSingleApiEndpointUrl($entityId)
{
return "automations/{$entityId}";
}
protected function deleteEntity($id)
{
$this->mailchimp->delete($this->getSingleApiEndpointUrl($id));
if ($this->mailchimp->success()) {
return true;
}
return false;
}
}