# 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 .post_vendors_bulk_request_vendors_item_payment_method import PostVendorsBulkRequestVendorsItemPaymentMethod


class PostVendorsBulkRequestVendorsItem(UniversalBaseModel):
    erp_vendor_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Vendor name
    """

    erp_vendor_id: str = pydantic.Field()
    """
    Unique vendor ID in ERP system
    """

    email: typing.Optional[str] = pydantic.Field(default=None)
    """
    (Optional) Vendor email
    """

    phone: typing.Optional[str] = pydantic.Field(default=None)
    """
    (Optional) Vendor phone number
    """

    net_terms: typing.Optional[str] = pydantic.Field(default=None)
    """
    (Optional) Payment terms
    """

    payment_method: typing.Optional[PostVendorsBulkRequestVendorsItemPaymentMethod] = pydantic.Field(default=None)
    """
    (Optional) Vendor payment method
    """

    address_line1: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="address_line_1")] = (
        pydantic.Field(default=None)
    )
    """
    (Optional) Vendor address line 1
    """

    address_line2: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="address_line_2")] = (
        pydantic.Field(default=None)
    )
    """
    (Optional) Vendor address line 2
    """

    city: typing.Optional[str] = pydantic.Field(default=None)
    """
    (Optional) Vendor city
    """

    state: typing.Optional[str] = pydantic.Field(default=None)
    """
    (Optional) Vendor state
    """

    zipcode: typing.Optional[str] = pydantic.Field(default=None)
    """
    (Optional) Vendor zipcode
    """

    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
