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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .payments_batch_payment_status import PaymentsBatchPaymentStatus
from .single_payment_intent_response import SinglePaymentIntentResponse


class PaymentsBatchPaymentResponse(UniversalBaseModel):
    id: str
    created_at: dt.datetime
    error: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
    payer_bank_account_id: str
    payment_intents: typing.List[SinglePaymentIntentResponse]
    payment_method: typing.Literal["us_ach"] = "us_ach"
    status: PaymentsBatchPaymentStatus
    total_amount: typing.Optional[int] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
