$rule =
new LineItemUnitPriceRule();
$rule->
assign(['amount' =>
$minPrice, 'operator' => LineItemUnitPriceRule::OPERATOR_GTE
]);
return $rule;
} /**
* Gets a minimum quantity rule for the provided line item Id.
*/
private function getMinQuantityRule(string
$itemID, int
$quantity): LineItemWithQuantityRule
{ $rule =
new LineItemWithQuantityRule();
$rule->
assign(['id' =>
$itemID, 'quantity' =>
$quantity, 'operator' => LineItemWithQuantityRule::OPERATOR_GTE
]);
return $rule;
} /**
* @param array<mixed> $itemIDs
*/
private function getProductsRule(array
$itemIDs): LineItemRule
{ $rule =
new LineItemRule();