src/PriceInfo/BasePrice.php 1 location
|
@@ 77-83 (lines=7) @@
|
74 |
|
* @param Udb3ModelTariff $tariff |
75 |
|
* @return BasePrice |
76 |
|
*/ |
77 |
|
public static function fromUdb3ModelTariff(Udb3ModelTariff $tariff) |
78 |
|
{ |
79 |
|
return new BasePrice( |
80 |
|
new Price($tariff->getPrice()->getAmount()), |
81 |
|
new Currency(CurrencyCode::fromNative($tariff->getPrice()->getCurrency()->getName())) |
82 |
|
); |
83 |
|
} |
84 |
|
} |
85 |
|
|
src/PriceInfo/Tariff.php 1 location
|
@@ 96-103 (lines=8) @@
|
93 |
|
* @param Udb3ModelTariff $udb3ModelTariff |
94 |
|
* @return Tariff |
95 |
|
*/ |
96 |
|
public static function fromUdb3ModelTariff(Udb3ModelTariff $udb3ModelTariff) |
97 |
|
{ |
98 |
|
return new Tariff( |
99 |
|
MultilingualString::fromUdb3ModelTranslatedValueObject($udb3ModelTariff->getName()), |
100 |
|
new Price($udb3ModelTariff->getPrice()->getAmount()), |
101 |
|
new Currency(CurrencyCode::fromNative($udb3ModelTariff->getPrice()->getCurrency()->getName())) |
102 |
|
); |
103 |
|
} |
104 |
|
} |
105 |
|
|