Skip to content

Commit

Permalink
Add unitPrice and unitCost properties to Product
Browse files Browse the repository at this point in the history
  • Loading branch information
inserve-paul committed Apr 10, 2024
1 parent 6394881 commit 883519b
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions src/Models/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class Product
protected ?array $prices = null;
/** @var Price[]|null */
protected ?array $costs = null;
protected ?Price $unitPrice = null;
protected ?Price $unitCost = null;
protected ?Period $billingPeriod = null;
protected ?Period $subscriptionPeriod = null;
protected ?string $billingModel = null;
Expand Down Expand Up @@ -103,6 +105,22 @@ public function getCosts(): ?array
return $this->costs;
}

/**
* @return Price|null
*/
public function getUnitPrice(): ?Price
{
return $this->unitPrice;
}

/**
* @return Price|null
*/
public function getUnitCost(): ?Price
{
return $this->unitCost;
}

/**
* @return Period|null
*/
Expand Down Expand Up @@ -247,6 +265,30 @@ public function setCosts(?array $costs): self
return $this;
}

/**
* @param Price|null $unitPrice
*
* @return self
*/
public function setUnitPrice(?Price $unitPrice): self
{
$this->unitPrice = $unitPrice;

return $this;
}

/**
* @param Price|null $unitCost
*
* @return self
*/
public function setUnitCost(?Price $unitCost): self
{
$this->unitCost = $unitCost;

return $this;
}

/**
* @param Period|null $billingPeriod
*
Expand Down

0 comments on commit 883519b

Please sign in to comment.