# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations
import typing_extensions
import typing_extensions
import typing
from .subscription_phase import SubscriptionPhaseParams
import typing

if typing.TYPE_CHECKING:
    from .catalog_object import CatalogObjectParams


class CatalogSubscriptionPlanParams(typing_extensions.TypedDict):
    """
    Describes a subscription plan. A subscription plan represents what you want to sell in a subscription model, and includes references to each of the associated subscription plan variations.
    For more information, see [Subscription Plans and Variations](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations).
    """

    name: str
    """
    The name of the plan.
    """

    phases: typing_extensions.NotRequired[typing.Optional[typing.Sequence[SubscriptionPhaseParams]]]
    """
    A list of SubscriptionPhase containing the [SubscriptionPhase](entity:SubscriptionPhase) for this plan.
    This field it required. Not including this field will throw a REQUIRED_FIELD_MISSING error
    """

    subscription_plan_variations: typing_extensions.NotRequired[typing.Optional[typing.Sequence["CatalogObjectParams"]]]
    """
    The list of subscription plan variations available for this product
    """

    eligible_item_ids: typing_extensions.NotRequired[typing.Optional[typing.Sequence[str]]]
    """
    The list of IDs of `CatalogItems` that are eligible for subscription by this SubscriptionPlan's variations.
    """

    eligible_category_ids: typing_extensions.NotRequired[typing.Optional[typing.Sequence[str]]]
    """
    The list of IDs of `CatalogCategory` that are eligible for subscription by this SubscriptionPlan's variations.
    """

    all_items: typing_extensions.NotRequired[typing.Optional[bool]]
    """
    If true, all items in the merchant's catalog are subscribable by this SubscriptionPlan.
    """
