# 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 .additional_data import AdditionalData
from .billing_data_response import BillingDataResponse
from .contacts import Contacts
from .created_at import CreatedAt
from .dbaname import Dbaname
from .ein import Ein
from .email import Email
from .enrollment_status import EnrollmentStatus
from .entrypointfield import Entrypointfield
from .internal_reference_id import InternalReferenceId
from .last_modified import LastModified
from .legalname import Legalname
from .location_code import LocationCode
from .mcc import Mcc
from .org_parent_name import OrgParentName
from .payee_name import PayeeName
from .remitaddress_1 import Remitaddress1
from .remitaddress_2 import Remitaddress2
from .remitcity import Remitcity
from .remitcountry import Remitcountry
from .remitstate import Remitstate
from .remitzip import Remitzip
from .vendor_number import VendorNumber
from .vendor_summary import VendorSummary
from .vendorstatus import Vendorstatus


class AssociatedVendor(UniversalBaseModel):
    vendor_number: typing_extensions.Annotated[typing.Optional[VendorNumber], FieldMetadata(alias="VendorNumber")] = (
        None
    )
    name_1: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="Name1")] = pydantic.Field(
        default=None
    )
    """
    Primary name for vendor.
    """

    name_2: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="Name2")] = pydantic.Field(
        default=None
    )
    """
    Secondary name for vendor.
    """

    ein: typing_extensions.Annotated[typing.Optional[Ein], FieldMetadata(alias="EIN")] = None
    phone: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="Phone")] = pydantic.Field(
        default=None
    )
    """
    Vendor's phone number.
    """

    email: typing_extensions.Annotated[typing.Optional[Email], FieldMetadata(alias="Email")] = pydantic.Field(
        default=None
    )
    """
    Vendor's email address.
    """

    address_1: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="Address1")] = pydantic.Field(
        default=None
    )
    """
    Vendor's address.
    """

    address_2: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="Address2")] = pydantic.Field(
        default=None
    )
    """
    Additional line for vendor's address.
    """

    city: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="City")] = pydantic.Field(default=None)
    """
    Vendor's city.
    """

    state: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="State")] = pydantic.Field(
        default=None
    )
    """
    Vendor's state.
    """

    zip: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="Zip")] = pydantic.Field(default=None)
    """
    Vendor's postal code.
    """

    country: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="Country")] = pydantic.Field(
        default=None
    )
    """
    Vendor's country.
    """

    mcc: typing_extensions.Annotated[typing.Optional[Mcc], FieldMetadata(alias="Mcc")] = None
    location_code: typing_extensions.Annotated[typing.Optional[LocationCode], FieldMetadata(alias="LocationCode")] = (
        None
    )
    contacts: typing_extensions.Annotated[typing.Optional[typing.List[Contacts]], FieldMetadata(alias="Contacts")] = (
        pydantic.Field(default=None)
    )
    """
    Array of objects describing the vendor's contacts.
    """

    billing_data: typing_extensions.Annotated[
        typing.Optional[BillingDataResponse], FieldMetadata(alias="BillingData")
    ] = None
    payment_method: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="PaymentMethod")] = None
    vendor_status: typing_extensions.Annotated[typing.Optional[Vendorstatus], FieldMetadata(alias="VendorStatus")] = (
        None
    )
    vendor_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="VendorId")] = None
    enrollment_status: typing_extensions.Annotated[
        typing.Optional[EnrollmentStatus], FieldMetadata(alias="EnrollmentStatus")
    ] = None
    summary: typing_extensions.Annotated[typing.Optional[VendorSummary], FieldMetadata(alias="Summary")] = None
    paypoint_legalname: typing_extensions.Annotated[
        typing.Optional[Legalname], FieldMetadata(alias="PaypointLegalname")
    ] = pydantic.Field(default=None)
    """
    The paypoint's legal name.
    """

    paypoint_dbaname: typing_extensions.Annotated[typing.Optional[Dbaname], FieldMetadata(alias="PaypointDbaname")] = (
        pydantic.Field(default=None)
    )
    """
    The paypoint's DBA name.
    """

    paypoint_entryname: typing_extensions.Annotated[
        typing.Optional[Entrypointfield], FieldMetadata(alias="PaypointEntryname")
    ] = pydantic.Field(default=None)
    """
    Paypoint's entryname.
    """

    parent_org_name: typing_extensions.Annotated[
        typing.Optional[OrgParentName], FieldMetadata(alias="ParentOrgName")
    ] = None
    created_date: typing_extensions.Annotated[typing.Optional[CreatedAt], FieldMetadata(alias="CreatedDate")] = None
    last_updated: typing_extensions.Annotated[typing.Optional[LastModified], FieldMetadata(alias="LastUpdated")] = None
    remit_address_1: typing_extensions.Annotated[
        typing.Optional[Remitaddress1], FieldMetadata(alias="remitAddress1")
    ] = None
    remit_address_2: typing_extensions.Annotated[
        typing.Optional[Remitaddress2], FieldMetadata(alias="remitAddress2")
    ] = None
    remit_city: typing_extensions.Annotated[typing.Optional[Remitcity], FieldMetadata(alias="remitCity")] = None
    remit_state: typing_extensions.Annotated[typing.Optional[Remitstate], FieldMetadata(alias="remitState")] = None
    remit_zip: typing_extensions.Annotated[typing.Optional[Remitzip], FieldMetadata(alias="remitZip")] = None
    remit_country: typing_extensions.Annotated[typing.Optional[Remitcountry], FieldMetadata(alias="remitCountry")] = (
        None
    )
    payee_name_1: typing_extensions.Annotated[typing.Optional[PayeeName], FieldMetadata(alias="payeeName1")] = None
    payee_name_2: typing_extensions.Annotated[typing.Optional[PayeeName], FieldMetadata(alias="payeeName2")] = 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
    customer_vendor_account: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="customerVendorAccount")
    ] = None
    internal_reference_id: typing_extensions.Annotated[
        typing.Optional[InternalReferenceId], FieldMetadata(alias="InternalReferenceId")
    ] = None
    additional_data: typing_extensions.Annotated[
        typing.Optional[AdditionalData], FieldMetadata(alias="additionalData")
    ] = None
    external_paypoint_id: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="externalPaypointID")
    ] = 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
