44
55use hiqdev \billing \registry \behavior \BehaviorCollection ;
66use hiqdev \billing \registry \invoice \InvoiceRepresentationCollection ;
7+ use hiqdev \billing \registry \product \Aggregate ;
78use hiqdev \billing \registry \quantity \formatter \QuantityFormatterDefinition ;
89use hiqdev \billing \registry \quantity \formatter \QuantityFormatterFactory ;
910use hiqdev \billing \registry \quantity \FractionQuantityData ;
@@ -25,6 +26,8 @@ class PriceTypeDefinition
2526
2627 private BehaviorCollection $ behaviorCollection ;
2728
29+ private Aggregate $ aggregate ;
30+
2831 public function __construct (
2932 private readonly PriceTypesCollection $ parent ,
3033 private readonly TypeInterface $ type ,
@@ -54,6 +57,11 @@ public function description(string $description): self
5457 return $ this ;
5558 }
5659
60+ public function getDescription (): string
61+ {
62+ return $ this ->description ;
63+ }
64+
5765 /**
5866 * @param string $formatterClass
5967 * @param null|FractionUnit|string $fractionUnit
@@ -112,4 +120,23 @@ public function withBehaviors(): BehaviorCollection
112120 {
113121 return $ this ->behaviorCollection ;
114122 }
123+
124+ /**
125+ * це параметер визначає агрегатну функцію яка застосовується для щоденно записаних ресурсів щоб визнизначти
126+ * місячне споживання за яке потрібно пробілити клієнта
127+ *
128+ * @param Aggregate $aggregate
129+ * @return self
130+ */
131+ public function aggregation (Aggregate $ aggregate ): self
132+ {
133+ $ this ->aggregate = $ aggregate ;
134+
135+ return $ this ;
136+ }
137+
138+ public function getAggregate (): Aggregate
139+ {
140+ return $ this ->aggregate ;
141+ }
115142}
0 commit comments