# This file was auto-generated by Fern from our API Definition.

import typing_extensions
import typing_extensions
import typing
from .money import MoneyParams


class OrderLineItemAppliedDiscountParams(typing_extensions.TypedDict):
    """
    Represents an applied portion of a discount to a line item in an order.

    Order scoped discounts have automatically applied discounts present for each line item.
    Line-item scoped discounts must have applied discounts added manually for any applicable line
    items. The corresponding applied money is automatically computed based on participating
    line items.
    """

    uid: typing_extensions.NotRequired[typing.Optional[str]]
    """
    A unique ID that identifies the applied discount only within this order.
    """

    discount_uid: str
    """
    The `uid` of the discount that the applied discount represents. It must
    reference a discount present in the `order.discounts` field.
    
    This field is immutable. To change which discounts apply to a line item,
    you must delete the discount and re-add it as a new `OrderLineItemAppliedDiscount`.
    """

    applied_money: typing_extensions.NotRequired[MoneyParams]
    """
    The amount of money applied by the discount to the line item.
    """
