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

from __future__ import annotations
from .paymentmethodscard import PaymentMethodsCard, PaymentMethodsCardTypedDict
from enum import Enum
from moovio_sdk.types import BaseModel
import pydantic
from typing_extensions import Annotated, TypedDict


class PullFromCardPaymentMethodPaymentMethodType(str, Enum):
    PULL_FROM_CARD = "pull-from-card"


class PullFromCardPaymentMethodTypedDict(TypedDict):
    payment_method_id: str
    r"""ID of the payment method."""
    payment_method_type: PullFromCardPaymentMethodPaymentMethodType
    card: PaymentMethodsCardTypedDict
    r"""A card as contained within a payment method."""


class PullFromCardPaymentMethod(BaseModel):
    payment_method_id: Annotated[str, pydantic.Field(alias="paymentMethodID")]
    r"""ID of the payment method."""

    payment_method_type: Annotated[
        PullFromCardPaymentMethodPaymentMethodType,
        pydantic.Field(alias="paymentMethodType"),
    ]

    card: PaymentMethodsCard
    r"""A card as contained within a payment method."""


try:
    PullFromCardPaymentMethod.model_rebuild()
except NameError:
    pass
