public __construct ( |
||
$id | ||
$orderItems | array | |
$billing | ||
$shipping |
public function __construct(OrderId $id, array $orderItems = [], Address $billing, Address $shipping)
{
$this->id = $id;
$this->orderItems = [];
$this->billing = $billing;
$this->shipping = $shipping;
foreach ($orderItems as $item) {
$this->addItem($item);
}
}