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

from ..core.unchecked_base_model import UncheckedBaseModel
import pydantic
import typing
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class LoyaltyEventDeleteReward(UncheckedBaseModel):
    """
    Provides metadata when the event `type` is `DELETE_REWARD`.
    """

    loyalty_program_id: str = pydantic.Field()
    """
    The ID of the [loyalty program](entity:LoyaltyProgram).
    """

    reward_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The ID of the deleted [loyalty reward](entity:LoyaltyReward).
    This field is returned only if the event source is `LOYALTY_API`.
    """

    points: int = pydantic.Field()
    """
    The number of points returned to the loyalty account.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
