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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from .vendor_created_event_data import VendorCreatedEventData
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class VendorCreatedEvent(UncheckedBaseModel):
    """
    Published when a [Vendor](entity:Vendor) is created.
    """

    merchant_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The ID of a seller associated with this event.
    """

    location_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The ID of a location associated with the event, if the event is associated with the location of the seller.
    """

    type: typing.Optional[str] = pydantic.Field(default=None)
    """
    The type of this event. The value is `"vendor.created".`
    """

    event_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    A unique ID for this event.
    """

    created_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    The RFC 3339-formatted time when the underlying event data object is created.
    """

    data: typing.Optional[VendorCreatedEventData] = pydantic.Field(default=None)
    """
    The data associated with this event.
    """

    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
