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

from __future__ import annotations
from .paymentmethodcard import PaymentMethodCard, PaymentMethodCardTypedDict
from .paymentmethodgeneric import PaymentMethodGeneric, PaymentMethodGenericTypedDict
from polar_sdk.types import BaseModel
from polar_sdk.utils import FieldMetadata, SecurityMetadata
from typing import Union
from typing_extensions import Annotated, TypeAliasType, TypedDict


class CustomerPortalCustomersAddPaymentMethodSecurityTypedDict(TypedDict):
    customer_session: str


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


CustomerPortalCustomersAddPaymentMethodResponseCustomerPortalCustomersAddPaymentMethodTypedDict = TypeAliasType(
    "CustomerPortalCustomersAddPaymentMethodResponseCustomerPortalCustomersAddPaymentMethodTypedDict",
    Union[PaymentMethodGenericTypedDict, PaymentMethodCardTypedDict],
)
r"""Payment method created."""


CustomerPortalCustomersAddPaymentMethodResponseCustomerPortalCustomersAddPaymentMethod = TypeAliasType(
    "CustomerPortalCustomersAddPaymentMethodResponseCustomerPortalCustomersAddPaymentMethod",
    Union[PaymentMethodGeneric, PaymentMethodCard],
)
r"""Payment method created."""
