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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .gift_card import GiftCard


class GiftCardUpdatedEventObject(UncheckedBaseModel):
    """
    An object that contains the gift card associated with a `gift_card.updated` event.
    """

    gift_card: typing.Optional[GiftCard] = pydantic.Field(default=None)
    """
    The gift card with the updated `balance_money`, `state`, or `customer_ids` field. 
    Some events can affect both `balance_money` and `state`.
    """

    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
