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

from __future__ import annotations
from .pagination import Pagination, PaginationTypedDict
from .paymentmethodcard import PaymentMethodCard, PaymentMethodCardTypedDict
from .paymentmethodgeneric import PaymentMethodGeneric, PaymentMethodGenericTypedDict
from polar_sdk.types import BaseModel
from typing import List, Union
from typing_extensions import TypeAliasType, TypedDict


ItemsTypedDict = TypeAliasType(
    "ItemsTypedDict", Union[PaymentMethodGenericTypedDict, PaymentMethodCardTypedDict]
)


Items = TypeAliasType("Items", Union[PaymentMethodGeneric, PaymentMethodCard])


class ListResourceUnionPaymentMethodCardPaymentMethodGenericTypedDict(TypedDict):
    items: List[ItemsTypedDict]
    pagination: PaginationTypedDict


class ListResourceUnionPaymentMethodCardPaymentMethodGeneric(BaseModel):
    items: List[Items]

    pagination: Pagination
