This commit is contained in:
@@ -12,6 +12,16 @@ from app.cities import cities_map
|
||||
# Provider name surfaced in unified DeliveryPrice/SystemDataTariff.
|
||||
CSE_PROVIDER_NAME = "cse"
|
||||
|
||||
# Keywords in a DeliveryType name/label that imply a pickup point (PVZ) is
|
||||
# required at registration (SenderPVZ/RecipientPVZ). PVZ is not yet supported,
|
||||
# so such schemes are excluded from price calculation.
|
||||
_PVZ_SCHEME_KEYWORDS = ("склад", "самовывоз", "почтов", "пвз")
|
||||
|
||||
|
||||
def delivery_type_requires_pvz(name: str, label: str) -> bool:
|
||||
haystack = f"{name} {label}".lower()
|
||||
return any(keyword in haystack for keyword in _PVZ_SCHEME_KEYWORDS)
|
||||
|
||||
# CSE returns currency short names (e.g. "RUR"); normalize to ISO-4217.
|
||||
_CURRENCY_NAME_TO_CODE = {
|
||||
"RUR": "RUB",
|
||||
|
||||
Reference in New Issue
Block a user