Example #1
0
 /**
  * sets product
  *
  * @param Product|int $product
  *
  * @return $this
  */
 public function setProduct($product)
 {
     $this->productId = $product instanceof Product ? $product->getId() : intval($product);
     return $this;
 }
 /**
  * returns all subscriptions related to a product
  *
  * @param int|Product $product
  *
  * @return \Abobereich\ApiClient\Models\Subscription[]|array
  */
 public function allForProduct($product)
 {
     $productId = $product instanceof Product ? $product->getId() : $product;
     return $this->index('/api/subscriptions?product_id=' . intval($productId), 'subscriptions');
 }