# 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 ...types.contacts import Contacts
from .ocr_vendor_additional_data import OcrVendorAdditionalData
from .ocr_vendor_billing_data import OcrVendorBillingData


class OcrVendor(UniversalBaseModel):
    vendor_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="vendorNumber")] = None
    name_1: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="name1")] = None
    name_2: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="name2")] = None
    ein: typing.Optional[str] = None
    phone: typing.Optional[str] = None
    email: typing.Optional[str] = None
    address_1: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="address1")] = None
    address_2: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="address2")] = None
    city: typing.Optional[str] = None
    state: typing.Optional[str] = None
    zip: typing.Optional[str] = None
    country: typing.Optional[str] = None
    mcc: typing.Optional[str] = None
    location_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="locationCode")] = None
    contacts: typing.Optional[typing.List[Contacts]] = None
    billing_data: typing_extensions.Annotated[
        typing.Optional[OcrVendorBillingData], FieldMetadata(alias="billingData")
    ] = None
    payment_method: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentMethod")] = None
    vendor_status: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="vendorStatus")] = None
    remit_address_1: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remitAddress1")] = None
    remit_address_2: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remitAddress2")] = None
    remit_city: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remitCity")] = None
    remit_state: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remitState")] = None
    remit_zip: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remitZip")] = None
    remit_country: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remitCountry")] = None
    payee_name_1: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payeeName1")] = None
    payee_name_2: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payeeName2")] = None
    customer_vendor_account: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="customerVendorAccount")
    ] = None
    internal_reference_id: typing_extensions.Annotated[
        typing.Optional[int], FieldMetadata(alias="internalReferenceId")
    ] = None
    custom_field_1: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="customField1")] = None
    custom_field_2: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="customField2")] = None
    additional_data: typing_extensions.Annotated[
        typing.Optional[OcrVendorAdditionalData], FieldMetadata(alias="additionalData")
    ] = None

    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
