"""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 ProductPriceRecurringFixedCreateType(str, Enum):
    RECURRING = "recurring"


class ProductPriceRecurringFixedCreateAmountType(str, Enum):
    FIXED = "fixed"


class ProductPriceRecurringFixedCreateTypedDict(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."""
    type: ProductPriceRecurringFixedCreateType
    amount_type: ProductPriceRecurringFixedCreateAmountType
    price_currency: NotRequired[str]
    r"""The currency. Currently, only `usd` is supported."""


class ProductPriceRecurringFixedCreate(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[ProductPriceRecurringFixedCreateType], pydantic.Field(alias="type")] = ProductPriceRecurringFixedCreateType.RECURRING # type: ignore
    # fmt: on

    # fmt: off
    AMOUNT_TYPE: Annotated[Final[ProductPriceRecurringFixedCreateAmountType], pydantic.Field(alias="amount_type")] = ProductPriceRecurringFixedCreateAmountType.FIXED # type: ignore
    # fmt: on

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