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

from __future__ import annotations
from polar_sdk.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class SubscriptionCanceledMetadataTypedDict(TypedDict):
    subscription_id: str
    amount: int
    currency: str
    recurring_interval: str
    recurring_interval_count: int
    canceled_at: str
    product_id: NotRequired[str]
    customer_cancellation_reason: NotRequired[str]
    customer_cancellation_comment: NotRequired[str]
    ends_at: NotRequired[str]
    cancel_at_period_end: NotRequired[bool]


class SubscriptionCanceledMetadata(BaseModel):
    subscription_id: str

    amount: int

    currency: str

    recurring_interval: str

    recurring_interval_count: int

    canceled_at: str

    product_id: Optional[str] = None

    customer_cancellation_reason: Optional[str] = None

    customer_cancellation_comment: Optional[str] = None

    ends_at: Optional[str] = None

    cancel_at_period_end: Optional[bool] = None
