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

import typing

import typing_extensions
from .loyalty_promotion_updated_event_data import LoyaltyPromotionUpdatedEventDataParams


class LoyaltyPromotionUpdatedEventParams(typing_extensions.TypedDict):
    """
    Published when a [loyalty promotion](entity:LoyaltyPromotion) is updated. This event is
    invoked only when a loyalty promotion is canceled.
    """

    merchant_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The ID of the Square seller associated with the event.
    """

    type: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The type of event. For this event, the value is `loyalty.promotion.updated`.
    """

    event_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The unique ID for the event, which is used for
    [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).
    """

    created_at: typing_extensions.NotRequired[str]
    """
    The timestamp of when the event was created, in RFC 3339 format.
    """

    data: typing_extensions.NotRequired[LoyaltyPromotionUpdatedEventDataParams]
    """
    The data associated with the event.
    """
