from typing import (
    Dict,
    Optional,
    Union,
)


def update_tender_details_with_discount_data(
    discount_data,      # type: Optional[Dict[str, Union[str, float]]]
    tender_details,     # type: Dict[str, Union[str, float, int, Dict]]
):
    # type: (...) -> None

    if not discount_data:
        return

    tender_details["benefitId"] = discount_data["benefit_id"]
    tender_details["loyaltyId"] = discount_data["loyalty_id"]
