public function __construct(
float $unitPrice,
float $totalPrice,
CalculatedTaxCollection $calculatedTaxes,
TaxRuleCollection $taxRules,
int $quantity = 1,
?ReferencePrice $referencePrice = null,
?ListPrice $listPrice = null,
?RegulationPrice $regulationPrice = null
) {
$this->unitPrice = FloatComparator::cast($unitPrice);
$this->totalPrice = FloatComparator::cast($totalPrice);
$this->calculatedTaxes = $calculatedTaxes;
$this->taxRules = $taxRules;
$this->quantity = $quantity;
$this->referencePrice = $referencePrice;
$this->listPrice = $listPrice;
$this->regulationPrice = $regulationPrice;
}
public function getTotalPrice(): float
{