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

from __future__ import annotations
from .customersubscriptionupdate import (
    CustomerSubscriptionUpdate,
    CustomerSubscriptionUpdateTypedDict,
)
from polar_sdk.types import BaseModel
from polar_sdk.utils import (
    FieldMetadata,
    PathParamMetadata,
    RequestMetadata,
    SecurityMetadata,
)
from typing_extensions import Annotated, TypedDict


class CustomerPortalSubscriptionsUpdateSecurityTypedDict(TypedDict):
    customer_session: str


class CustomerPortalSubscriptionsUpdateSecurity(BaseModel):
    customer_session: Annotated[
        str,
        FieldMetadata(
            security=SecurityMetadata(
                scheme=True,
                scheme_type="http",
                sub_type="bearer",
                field_name="Authorization",
            )
        ),
    ]


class CustomerPortalSubscriptionsUpdateRequestTypedDict(TypedDict):
    id: str
    r"""The subscription ID."""
    customer_subscription_update: CustomerSubscriptionUpdateTypedDict


class CustomerPortalSubscriptionsUpdateRequest(BaseModel):
    id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""The subscription ID."""

    customer_subscription_update: Annotated[
        CustomerSubscriptionUpdate,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]
