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

from __future__ import annotations

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs
from ..core.unchecked_base_model import UncheckedBaseModel
from .error import Error
from .payment_link import PaymentLink
from .payment_link_related_resources import PaymentLinkRelatedResources


class CreatePaymentLinkResponse(UncheckedBaseModel):
    errors: typing.Optional[typing.List[Error]] = pydantic.Field(default=None)
    """
    Any errors that occurred during the request.
    """

    payment_link: typing.Optional[PaymentLink] = pydantic.Field(default=None)
    """
    The created payment link.
    """

    related_resources: typing.Optional[PaymentLinkRelatedResources] = pydantic.Field(default=None)
    """
    The list of related objects.
    """

    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


from .catalog_category import CatalogCategory  # noqa: E402, F401, I001
from .catalog_item import CatalogItem  # noqa: E402, F401, I001
from .catalog_item_option import CatalogItemOption  # noqa: E402, F401, I001
from .catalog_modifier_list import CatalogModifierList  # noqa: E402, F401, I001
from .catalog_object_category import CatalogObjectCategory  # noqa: E402, F401, I001
from .catalog_object_item import CatalogObjectItem  # noqa: E402, F401, I001
from .catalog_object_item_option import CatalogObjectItemOption  # noqa: E402, F401, I001
from .catalog_object_modifier_list import CatalogObjectModifierList  # noqa: E402, F401, I001
from .catalog_object_subscription_plan import CatalogObjectSubscriptionPlan  # noqa: E402, F401, I001
from .catalog_subscription_plan import CatalogSubscriptionPlan  # noqa: E402, F401, I001

update_forward_refs(CreatePaymentLinkResponse)
