# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations

import typing

import typing_extensions

from .bank_account_update_request import BankAccountUpdateRequest
from .custom_payment_method_update_request import CustomPaymentMethodUpdateRequest
from .payment_method_base_request import PaymentMethodBaseRequest


class PaymentMethodUpdateRequest_Custom(CustomPaymentMethodUpdateRequest):
    type: typing_extensions.Literal["custom"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class PaymentMethodUpdateRequest_BankAccount(BankAccountUpdateRequest):
    type: typing_extensions.Literal["bankAccount"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class PaymentMethodUpdateRequest_Card(PaymentMethodBaseRequest):
    type: typing_extensions.Literal["card"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class PaymentMethodUpdateRequest_Check(PaymentMethodBaseRequest):
    type: typing_extensions.Literal["check"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class PaymentMethodUpdateRequest_OffPlatform(PaymentMethodBaseRequest):
    type: typing_extensions.Literal["offPlatform"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


PaymentMethodUpdateRequest = typing.Union[
    PaymentMethodUpdateRequest_Custom,
    PaymentMethodUpdateRequest_BankAccount,
    PaymentMethodUpdateRequest_Card,
    PaymentMethodUpdateRequest_Check,
    PaymentMethodUpdateRequest_OffPlatform,
]
