Example #1
0
 /**
  * Creates a package.
  *
  * @param string $name
  * @param string $category
  * @param int    $amount
  * @param int    $price
  *
  * @throws NonExistentCategoryApiException
  */
 public function create($name, $category, $amount, $price)
 {
     try {
         $this->createPackageInternalWorker->create(uniqid(), $name, $category, $amount, $price);
     } catch (NonExistentCategoryInternalException $e) {
         throw new NonExistentCategoryApiException();
     }
 }
Example #2
0
 /**
  * Creates a package.
  *
  * @param string $id
  * @param string $name
  * @param string $category
  * @param int    $amount
  * @param int    $price
  */
 public function create($id, $name, $category, $amount, $price)
 {
     $this->createPackageInternalWorker->create($id, $name, $category, $amount, $price);
 }