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

    benefit_id = discount_data.get("benefit_id")
    if benefit_id:
        tender_details["benefitId"] = benefit_id

    loyalty_id = discount_data.get("loyalty_id")
    if loyalty_id is not None:
        tender_details["loyaltyId"] = loyalty_id
