* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ declare(strict_types=1); namespace PrestaShop\PrestaShop\Core\Domain\CustomerService\Command; use PrestaShop\PrestaShop\Core\Domain\CustomerService\Exception\CustomerServiceException; use PrestaShop\PrestaShop\Core\Domain\CustomerService\ValueObject\CustomerThreadId; class BulkDeleteCustomerThreadCommand { /** * @var CustomerThreadId[] */ private $customerThreadIds; /** * @param array $customerThreadIds * * @throws CustomerServiceException */ public function __construct(array $customerThreadIds) { $this->setCustomerThreadIds($customerThreadIds); } /** * @return CustomerThreadId[] */ public function getCustomerThreadIds(): array { return $this->customerThreadIds; } /** * @param array $customerThreadIds * * @throws CustomerServiceException */ private function setCustomerThreadIds(array $customerThreadIds): void { foreach ($customerThreadIds as $customerThreadId) { $this->customerThreadIds[] = new CustomerThreadId($customerThreadId); } } }