Exemplo n.º 1
0
 /**
  * @param Product $product
  *
  * @return bool
  */
 public function remove(Product $product)
 {
     if (null == $product->getId()) {
         throw new \ErrorException('Can not remove a non existent Product !');
     } else {
         $request = new DeleteJson($this->removeUrl($product));
     }
     $deleted = $request->makeRequest();
     return $deleted;
 }
 /**
  * @param CustomCollection $collection
  *
  * @return bool
  */
 public function remove(CustomCollection $collection)
 {
     if (null == $collection->getId()) {
         throw new \ErrorException('Can not remove a non existent Product !');
     } else {
         $request = new DeleteJson($this->removeUrl($collection), new CustomCollectionWrapper($collection));
     }
     $deleted = $request->makeRequest();
     return (bool) $deleted;
 }