public function handle(UpdateProductCommand $command)
 {
     $productDTO = $command->getProductDTO();
     $product = $this->productService->findOneById($productDTO->id);
     ProductDTOBuilder::setFromDTO($product, $productDTO);
     $this->productService->update($product);
 }
 public function getProductDTOWithAllData()
 {
     return $this->productDTOBuilder->withAllData($this->pricing)->build();
 }
 public function addProductDTOBuilder(ProductDTOBuilder $productDTOBuilder)
 {
     $this->productDTOs[] = $productDTOBuilder->withPrice($this->pricing)->build();
 }
 public function handle(CreateProductCommand $command)
 {
     $product = ProductDTOBuilder::createFromDTO($command->getProductId(), $command->getProductDTO());
     $this->productService->create($product);
 }