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

from __future__ import annotations
from .subscription_input import SubscriptionInput, SubscriptionInputTypedDict
from enum import Enum
from polar_sdk.types import BaseModel
import pydantic
from typing import Final, TypedDict
from typing_extensions import Annotated


class WebhookSubscriptionCreatedPayloadType(str, Enum):
    SUBSCRIPTION_CREATED = "subscription.created"


class WebhookSubscriptionCreatedPayloadTypedDict(TypedDict):
    r"""Sent when a new subscription is created.

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

    data: SubscriptionInputTypedDict
    type: WebhookSubscriptionCreatedPayloadType


class WebhookSubscriptionCreatedPayload(BaseModel):
    r"""Sent when a new subscription is created.

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

    data: SubscriptionInput

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