# This file is auto-generated. Do not edit manually.

from typing import TypedDict, Optional, List, Literal


class Subscription(TypedDict, total=False):
    """Previous billing date of the subscription."""
    previous_billing_at: Optional[str]
    """End date of the trial period."""
    trial_period_end: Optional[str]
    """Start date of the trial period."""
    trial_period_start: Optional[str]
    """Date the subscription was canceled."""
    canceled_at: Optional[str]
    """Payment collection method for invoices generated by the subscription."""
    collection_method: Optional[str]
    """List of items in the subscription."""
    items: Optional[List[dict]]
    """Plan ID associated with the subscription."""
    plan_id: Optional[str]
    """Currency of the subscription."""
    currency: Optional[str]
    """First billing date of the subscription."""
    first_billing_at: Optional[str]
    """Status of the subscription."""
    status: Optional[Literal["draft", "pending", "trialing", "active", "paused", "canceled", "expired"]]
    """Timestamp indicating when the object was created."""
    created_at: Optional[str]
    """Start date of the current billing period."""
    current_period_start: Optional[str]
    """Represents the object's type."""
    object: Optional[Literal["subscription"]]
    """ID of the object."""
    id: Optional[str]
    """Date the subscription is billed through."""
    billed_through: Optional[str]
    """End date of the current billing period."""
    current_period_end: Optional[str]
    """Date the subscription started."""
    started_at: Optional[str]
    """Billingrails account ID associated with the subscription."""
    account_id: Optional[str]
    """Billing cycle type of the subscription."""
    billing_cycle_type: Optional[Literal["anniversary", "calendar"]]
    """Payment method ID associated with the subscription."""
    payment_method_id: Optional[str]
