018 add parcel type

This commit is contained in:
Раис Юсупалиев
2026-03-16 01:14:46 +03:00
parent 54160a0e38
commit c4175121a0
10 changed files with 346 additions and 11 deletions
+2
View File
@@ -48,6 +48,7 @@ class FilterAndSortPricesFn(Protocol):
prices: Iterable[object],
*,
price_multiplier: Decimal = DEFAULT_PROVIDER_PRICE_MULTIPLIER,
parcel_type: object | None = None,
) -> list[object]: ...
@@ -118,6 +119,7 @@ class AggregatorService:
filtered_and_sorted = self._filter_and_sort_prices(
successful_results,
price_multiplier=self._provider_price_multiplier,
parcel_type=request.parcel_type,
)
return [self._coerce_delivery_price(price) for price in filtered_and_sorted]