| @@ 74-90 (lines=17) @@ | ||
| 71 | * @param SaleInterface $sale |
|
| 72 | * @param DateTime $time |
|
| 73 | */ |
|
| 74 | public function __construct( |
|
| 75 | $id, |
|
| 76 | TypeInterface $type, |
|
| 77 | TargetInterface $target, |
|
| 78 | QuantityInterface $quantity, |
|
| 79 | CustomerInterface $customer = null, |
|
| 80 | SaleInterface $sale = null, |
|
| 81 | DateTime $time = null |
|
| 82 | ) { |
|
| 83 | $this->id = $id; |
|
| 84 | $this->type = $type; |
|
| 85 | $this->target = $target; |
|
| 86 | $this->quantity = $quantity; |
|
| 87 | $this->customer = $customer; |
|
| 88 | $this->sale = $sale; |
|
| 89 | $this->time = $time; |
|
| 90 | } |
|
| 91 | ||
| 92 | /** |
|
| 93 | * {@inheritdoc} |
|
| @@ 80-98 (lines=19) @@ | ||
| 77 | */ |
|
| 78 | protected $charges = []; |
|
| 79 | ||
| 80 | public function __construct( |
|
| 81 | $id, |
|
| 82 | Type $type, |
|
| 83 | DateTime $time, |
|
| 84 | Money $sum, |
|
| 85 | Quantity $quantity, |
|
| 86 | Customer $customer = null, |
|
| 87 | Target $target = null, |
|
| 88 | Plan $plan = null |
|
| 89 | ) { |
|
| 90 | $this->id = $id; |
|
| 91 | $this->type = $type; |
|
| 92 | $this->time = $time; |
|
| 93 | $this->sum = $sum; |
|
| 94 | $this->quantity = $quantity; |
|
| 95 | $this->customer = $customer; |
|
| 96 | $this->target = $target; |
|
| 97 | $this->plan = $plan; |
|
| 98 | } |
|
| 99 | ||
| 100 | public function jsonSerialize() |
|
| 101 | { |
|
| @@ 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 | DateTime $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. |
|