"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .pledge_input import PledgeInput, PledgeInputTypedDict
from enum import Enum
from polar_sdk.types import BaseModel
import pydantic
from typing import Final, TypedDict
from typing_extensions import Annotated


class WebhookPledgeUpdatedPayloadType(str, Enum):
    PLEDGE_UPDATED = "pledge.updated"


class WebhookPledgeUpdatedPayloadTypedDict(TypedDict):
    r"""Sent when a pledge is updated.

    **Discord & Slack support:** Basic
    """

    data: PledgeInputTypedDict
    type: WebhookPledgeUpdatedPayloadType


class WebhookPledgeUpdatedPayload(BaseModel):
    r"""Sent when a pledge is updated.

    **Discord & Slack support:** Basic
    """

    data: PledgeInput

    # fmt: off
    TYPE: Annotated[Final[WebhookPledgeUpdatedPayloadType], pydantic.Field(alias="type")] = WebhookPledgeUpdatedPayloadType.PLEDGE_UPDATED # type: ignore
    # fmt: on
