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

from typing import TypedDict, Optional, List, Literal


class SubscriptionCreate(TypedDict, total=False):
    """Plan ID. When set, subscription is built from the plan's items."""
    plan_id: Optional[str]
    """Product ID (legacy). Use plan_id or items for new subscriptions."""
    product_id: Optional[str]
    """Payment collection method for invoices generated by the subscription."""
    collection_method: Literal["manual", "automatic"]
    """Proration mode for the subscription."""
    proration_mode: Optional[Literal["none", "invoice_immediately", "invoice_later"]]
    """Payment method ID associated with the subscription. Required if collection_method is `automatic`."""
    payment_method_id: Optional[str]
    """Billing cycle type of the subscription."""
    billing_cycle_type: Optional[Literal["anniversary", "calendar"]]
    """Modify product quantities for the subscription plans."""
    items: Optional[List[dict]]
    """Billingrails account ID associated with the subscription."""
    account_id: str
    """Start date of the subscription."""
    start_at: Optional[str]
    """First billing date of the subscription."""
    start_billing_at: Optional[str]
    """Trial period of the subscription in days. Overrides the plan's trial period if set."""
    trial_period_days: Optional[int]
