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

from __future__ import annotations
from .listresource_union_paymentmethodcard_paymentmethodgeneric_ import (
    ListResourceUnionPaymentMethodCardPaymentMethodGeneric,
    ListResourceUnionPaymentMethodCardPaymentMethodGenericTypedDict,
)
from polar_sdk.types import BaseModel
from polar_sdk.utils import FieldMetadata, QueryParamMetadata, SecurityMetadata
from typing import Callable, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class CustomerPortalCustomersGetPaymentMethodsSecurityTypedDict(TypedDict):
    customer_session: str


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


class CustomerPortalCustomersGetPaymentMethodsRequestTypedDict(TypedDict):
    page: NotRequired[int]
    r"""Page number, defaults to 1."""
    limit: NotRequired[int]
    r"""Size of a page, defaults to 10. Maximum is 100."""


class CustomerPortalCustomersGetPaymentMethodsRequest(BaseModel):
    page: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = 1
    r"""Page number, defaults to 1."""

    limit: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = 10
    r"""Size of a page, defaults to 10. Maximum is 100."""


class CustomerPortalCustomersGetPaymentMethodsResponseTypedDict(TypedDict):
    result: ListResourceUnionPaymentMethodCardPaymentMethodGenericTypedDict


class CustomerPortalCustomersGetPaymentMethodsResponse(BaseModel):
    next: Callable[[], Optional[CustomerPortalCustomersGetPaymentMethodsResponse]]

    result: ListResourceUnionPaymentMethodCardPaymentMethodGeneric
