| @@ 65-81 (lines=17) @@ | ||
| 62 | */ |
|
| 63 | protected $time; |
|
| 64 | ||
| 65 | public function __construct( |
|
| 66 | $id, |
|
| 67 | ActionInterface $action = null, |
|
| 68 | PriceInterface $price = null, |
|
| 69 | TargetInterface $target = null, |
|
| 70 | QuantityInterface $usage, |
|
| 71 | Money $sum, |
|
| 72 | DateTimeImmutable $time = null |
|
| 73 | ) { |
|
| 74 | $this->id = $id; |
|
| 75 | $this->action = $action; |
|
| 76 | $this->price = $price; |
|
| 77 | $this->target = $target; |
|
| 78 | $this->usage = $usage; |
|
| 79 | $this->sum = $sum; |
|
| 80 | $this->time = $time; |
|
| 81 | } |
|
| 82 | ||
| 83 | /** |
|
| 84 | * Returns charge that is sum of given charges. |
|
| @@ 80-98 (lines=19) @@ | ||
| 77 | * @param DateTimeImmutable $time |
|
| 78 | * @param ActionInterface $parent |
|
| 79 | */ |
|
| 80 | public function __construct( |
|
| 81 | $id, |
|
| 82 | TypeInterface $type, |
|
| 83 | TargetInterface $target, |
|
| 84 | QuantityInterface $quantity, |
|
| 85 | CustomerInterface $customer = null, |
|
| 86 | SaleInterface $sale = null, |
|
| 87 | DateTimeImmutable $time = null, |
|
| 88 | ActionInterface $parent = null |
|
| 89 | ) { |
|
| 90 | $this->id = $id; |
|
| 91 | $this->type = $type; |
|
| 92 | $this->target = $target; |
|
| 93 | $this->quantity = $quantity; |
|
| 94 | $this->customer = $customer; |
|
| 95 | $this->sale = $sale; |
|
| 96 | $this->time = $time; |
|
| 97 | $this->parent = $parent; |
|
| 98 | } |
|
| 99 | ||
| 100 | public function createSubaction(CustomerInterface $customer) |
|
| 101 | { |
|