add() public method

public add ( Product $product )
$product Product
Example #1
0
 /**
  * @param CreateProduct $createProduct
  *
  * @throws \Exception
  */
 public function handle(CreateProduct $createProduct)
 {
     $this->products->add(new Product(new SKU($createProduct->sku()), new Price($createProduct->amount(), $createProduct->currency(), $createProduct->precision()), $createProduct->isInStock()));
 }