# 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 .invoice import Invoice
from .monite_all_payment_methods_types import MoniteAllPaymentMethodsTypes
from .payer_account_response import PayerAccountResponse
from .payment_object import PaymentObject
from .recipient_account_response import RecipientAccountResponse


class PaymentIntentResponse(UniversalBaseModel):
    id: str
    updated_at: dt.datetime
    amount: int
    application_fee_amount: typing.Optional[int] = None
    batch_payment_id: typing.Optional[str] = None
    currency: str
    invoice: typing.Optional[Invoice] = None
    object: typing.Optional[PaymentObject] = None
    payer: typing.Optional[PayerAccountResponse] = None
    payment_link_id: typing.Optional[str] = None
    payment_methods: typing.List[MoniteAllPaymentMethodsTypes]
    payment_reference: typing.Optional[str] = None
    provider: typing.Optional[str] = None
    recipient: RecipientAccountResponse
    selected_payment_method: typing.Optional[MoniteAllPaymentMethodsTypes] = None
    status: str

    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
