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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class SubscriptionStatus(str, enum.Enum):
    TRIALING = "trialing"
    ACTIVE = "active"
    INCOMPLETE = "incomplete"
    INCOMPLETE_EXPIRED = "incomplete_expired"
    PAST_DUE = "past_due"
    CANCELED = "canceled"
    UNPAID = "unpaid"
    FREE = "free"

    def visit(
        self,
        trialing: typing.Callable[[], T_Result],
        active: typing.Callable[[], T_Result],
        incomplete: typing.Callable[[], T_Result],
        incomplete_expired: typing.Callable[[], T_Result],
        past_due: typing.Callable[[], T_Result],
        canceled: typing.Callable[[], T_Result],
        unpaid: typing.Callable[[], T_Result],
        free: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is SubscriptionStatus.TRIALING:
            return trialing()
        if self is SubscriptionStatus.ACTIVE:
            return active()
        if self is SubscriptionStatus.INCOMPLETE:
            return incomplete()
        if self is SubscriptionStatus.INCOMPLETE_EXPIRED:
            return incomplete_expired()
        if self is SubscriptionStatus.PAST_DUE:
            return past_due()
        if self is SubscriptionStatus.CANCELED:
            return canceled()
        if self is SubscriptionStatus.UNPAID:
            return unpaid()
        if self is SubscriptionStatus.FREE:
            return free()
