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

from __future__ import annotations
from .order_input import OrderInput, OrderInputTypedDict
from enum import Enum
from polar_sdk.types import BaseModel
import pydantic
from typing import Final, TypedDict
from typing_extensions import Annotated


class WebhookOrderCreatedPayloadType(str, Enum):
    ORDER_CREATED = "order.created"


class WebhookOrderCreatedPayloadTypedDict(TypedDict):
    r"""Sent when a new order is created.

    **Discord & Slack support:** Full
    """

    data: OrderInputTypedDict
    type: WebhookOrderCreatedPayloadType


class WebhookOrderCreatedPayload(BaseModel):
    r"""Sent when a new order is created.

    **Discord & Slack support:** Full
    """

    data: OrderInput

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