# 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.method_element_out import MethodElementOut
from ...types.contact_element import ContactElement
from ...types.element import Element
from ...types.header_element import HeaderElement
from ...types.label_element import LabelElement
from ...types.note_element import NoteElement
from ...types.page_element import PageElement
from ...types.pagelink_setting import PagelinkSetting


class PaymentPageRequestBodyOut(UniversalBaseModel):
    """
    Configuration for the Pay Out payment link page. Controls branding, messaging, vendor fields, and which payout methods are offered to the vendor.

    Examples
    --------
    from payabli import (
        ContactElement,
        Element,
        HeaderElement,
        LabelElement,
        NoteElement,
        PageElement,
        PagelinkSetting,
    )
    from payabli.money_out_types import MethodElementOut, MethodsListOut
    from payabli.payment_link import PaymentPageRequestBodyOut

    PaymentPageRequestBodyOut(
        contact_us=ContactElement(
            email_label="Email",
            enabled=True,
            header="Contact Us",
            order=0,
            payment_icons=True,
            phone_label="Phone",
        ),
        logo=Element(
            enabled=True,
            order=0,
        ),
        message_before_paying=LabelElement(
            enabled=True,
            label="Please review your payment details",
            order=0,
        ),
        notes=NoteElement(
            enabled=True,
            header="Additional Notes",
            order=0,
            placeholder="Enter any additional notes here",
            value="",
        ),
        page=PageElement(
            description="Get paid securely",
            enabled=True,
            header="Payment Page",
            order=0,
        ),
        payment_button=LabelElement(
            enabled=True,
            label="Pay Now",
            order=0,
        ),
        payment_methods=MethodElementOut(
            all_methods_checked=True,
            allow_multiple_methods=True,
            default_method="vcard",
            enabled=True,
            header="Payment Methods",
            methods=MethodsListOut(
                ach=True,
                check=True,
                vcard=True,
            ),
            order=0,
            show_preview_virtual_card=True,
        ),
        review=HeaderElement(
            enabled=True,
            header="Review Payment",
            order=0,
        ),
        settings=PagelinkSetting(
            color="#000000",
            language="en",
        ),
    )
    """

    contact_us: typing_extensions.Annotated[
        typing.Optional[ContactElement],
        FieldMetadata(alias="contactUs"),
        pydantic.Field(alias="contactUs", description="ContactUs section of payment link page."),
    ] = None
    logo: typing.Optional[Element] = pydantic.Field(default=None)
    """
    Logo section of payment link page.
    """

    message_before_paying: typing_extensions.Annotated[
        typing.Optional[LabelElement],
        FieldMetadata(alias="messageBeforePaying"),
        pydantic.Field(alias="messageBeforePaying", description="Message section of payment link page."),
    ] = None
    notes: typing.Optional[NoteElement] = pydantic.Field(default=None)
    """
    Notes section of payment link page.
    """

    page: typing.Optional[PageElement] = pydantic.Field(default=None)
    """
    Page header section of payment link page.
    """

    payment_button: typing_extensions.Annotated[
        typing.Optional[LabelElement],
        FieldMetadata(alias="paymentButton"),
        pydantic.Field(alias="paymentButton", description="Payment button section of payment link page."),
    ] = None
    payment_methods: typing_extensions.Annotated[
        typing.Optional[MethodElementOut],
        FieldMetadata(alias="paymentMethods"),
        pydantic.Field(
            alias="paymentMethods",
            description="Payment methods section of payment link page. Use this to configure which payout methods (ACH, vCard, check) are offered to the vendor.",
        ),
    ] = None
    review: typing.Optional[HeaderElement] = pydantic.Field(default=None)
    """
    Review section of payment link page.
    """

    bills: typing.Optional[Element] = pydantic.Field(default=None)
    """
    Bills section of payment link page.
    """

    settings: typing.Optional[PagelinkSetting] = pydantic.Field(default=None)
    """
    Settings section of payment link page.
    """

    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
