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

from __future__ import annotations
from .subscriptionrecurringinterval import SubscriptionRecurringInterval
from enum import Enum
from polar_sdk.types import BaseModel
import pydantic
from typing import Final, Optional, TypedDict
from typing_extensions import Annotated, NotRequired


class ProductPriceRecurringCreateType(str, Enum):
    RECURRING = "recurring"


class ProductPriceRecurringCreateTypedDict(TypedDict):
    r"""Schema to create a recurring product price, i.e. a subscription."""

    price_amount: int
    r"""The price in cents."""
    recurring_interval: SubscriptionRecurringInterval
    r"""The recurring interval of the price."""
    price_currency: NotRequired[str]
    r"""The currency. Currently, only `usd` is supported."""


class ProductPriceRecurringCreate(BaseModel):
    r"""Schema to create a recurring product price, i.e. a subscription."""

    price_amount: int
    r"""The price in cents."""

    recurring_interval: SubscriptionRecurringInterval
    r"""The recurring interval of the price."""

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

    price_currency: Optional[str] = "usd"
    r"""The currency. Currently, only `usd` is supported."""
