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

import typing

import pydantic
import typing_extensions
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...core.serialization import FieldMetadata
from ...money_out_types.types.payment_link_status import PaymentLinkStatus
from .payment_page_request_body_out import PaymentPageRequestBodyOut


class PatchOutPaymentLinkRequest(UniversalBaseModel):
    """
    Request body for partially updating a Pay Out payment link.
    """

    bill_page_data: typing_extensions.Annotated[
        typing.Optional[PaymentPageRequestBodyOut],
        FieldMetadata(alias="billPageData"),
        pydantic.Field(alias="billPageData", description="Updated payment link page configuration."),
    ] = None
    expiration_date: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="expirationDate"),
        pydantic.Field(
            alias="expirationDate",
            description="New expiration date for the payment link. Must be a future date. If null and the link is expired, uses the default expiration from settings. Updating the expiration date reactivates an expired payment link to Active status.",
        ),
    ] = None
    status: typing.Optional[PaymentLinkStatus] = pydantic.Field(default=None)
    """
    Updated status for the payment link.
    """

    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
