Skip to content

Commit

Permalink
Merge pull request #106 from rs2487/feature/variant-stock-query
Browse files Browse the repository at this point in the history
Added tracked flag to variant stock query
  • Loading branch information
niklasnatter authored Sep 25, 2020
2 parents 0616ff7 + 66a1d65 commit cfe88aa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ public function __invoke(LoadProductVariantStockQuery $query): void

$query->setOnHand($variantData['onHand']);
$query->setOnHold($variantData['onHold']);
$query->setTracked($variantData['tracked']);
}
}
17 changes: 17 additions & 0 deletions Model/Product/Query/LoadProductVariantStockQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ class LoadProductVariantStockQuery
*/
private $onHand;

/**
* @var bool|null
*/
private $tracked;

public function __construct(string $code, string $variantCode)
{
$this->code = $code;
Expand Down Expand Up @@ -74,4 +79,16 @@ public function setOnHand(?int $onHand): self

return $this;
}

public function isTracked(): ?bool
{
return $this->tracked;
}

public function setTracked(?bool $tracked): self
{
$this->tracked = $tracked;

return $this;
}
}

0 comments on commit cfe88aa

Please sign in to comment.