# 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.additional_data import AdditionalData
from ...types.address_addtl_nullable import AddressAddtlNullable
from ...types.address_nullable import AddressNullable
from ...types.billing_data import BillingData
from ...types.contacts_field import ContactsField
from ...types.email import Email
from ...types.location_code import LocationCode
from ...types.mcc import Mcc
from ...types.payee_name import PayeeName
from ...types.remitaddress_1 import Remitaddress1
from ...types.remitaddress_2 import Remitaddress2
from ...types.remitcity import Remitcity
from ...types.remitcountry import Remitcountry
from ...types.remitstate import Remitstate
from ...types.remitzip import Remitzip
from ...types.vendor_ein import VendorEin
from ...types.vendor_name_1 import VendorName1
from ...types.vendor_name_2 import VendorName2
from ...types.vendor_number import VendorNumber
from ...types.vendor_payment_method import VendorPaymentMethod
from ...types.vendor_phone import VendorPhone
from ...types.vendorid import Vendorid
from ...types.vendorstatus import Vendorstatus


class RequestOutAuthorizeVendorDataOld(UniversalBaseModel):
    """
    Object containing vendor data.
    """

    additional_data: typing_extensions.Annotated[
        typing.Optional[AdditionalData], FieldMetadata(alias="additionalData"), pydantic.Field(alias="additionalData")
    ] = None
    address_1: typing_extensions.Annotated[
        typing.Optional[AddressNullable],
        FieldMetadata(alias="address1"),
        pydantic.Field(alias="address1", description="Vendor's address"),
    ] = None
    address_2: typing_extensions.Annotated[
        typing.Optional[AddressAddtlNullable],
        FieldMetadata(alias="address2"),
        pydantic.Field(alias="address2", description="Additional line for vendor's address."),
    ] = None
    billing_data: typing_extensions.Annotated[
        typing.Optional[BillingData],
        FieldMetadata(alias="billingData"),
        pydantic.Field(alias="billingData", description="Object containing vendor's bank information."),
    ] = None
    city: typing.Optional[str] = pydantic.Field(default=None)
    """
    Vendor's city.
    """

    contacts: typing.Optional[ContactsField] = pydantic.Field(default=None)
    """
    Array of objects describing the vendor's contacts.
    """

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

    customer_vendor_account: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="customerVendorAccount"),
        pydantic.Field(alias="customerVendorAccount", description="Account number of paypoint in the vendor side."),
    ] = None
    custom_field_1: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="customField1"), pydantic.Field(alias="customField1")
    ] = None
    custom_field_2: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="customField2"), pydantic.Field(alias="customField2")
    ] = None
    ein: typing.Optional[VendorEin] = None
    email: typing.Optional[Email] = pydantic.Field(default=None)
    """
    Vendor's email address. Required for vCard.
    """

    internal_reference_id: typing_extensions.Annotated[
        typing.Optional[int],
        FieldMetadata(alias="internalReferenceId"),
        pydantic.Field(alias="internalReferenceId", description="Internal identifier for global vendor account."),
    ] = None
    location_code: typing_extensions.Annotated[
        typing.Optional[LocationCode], FieldMetadata(alias="locationCode"), pydantic.Field(alias="locationCode")
    ] = None
    mcc: typing.Optional[Mcc] = None
    name_1: typing_extensions.Annotated[
        typing.Optional[VendorName1], FieldMetadata(alias="name1"), pydantic.Field(alias="name1")
    ] = None
    name_2: typing_extensions.Annotated[
        typing.Optional[VendorName2], FieldMetadata(alias="name2"), pydantic.Field(alias="name2")
    ] = None
    payee_name_1: typing_extensions.Annotated[
        typing.Optional[PayeeName], FieldMetadata(alias="payeeName1"), pydantic.Field(alias="payeeName1")
    ] = None
    payee_name_2: typing_extensions.Annotated[
        typing.Optional[PayeeName], FieldMetadata(alias="payeeName2"), pydantic.Field(alias="payeeName2")
    ] = None
    payment_method: typing_extensions.Annotated[
        typing.Optional[VendorPaymentMethod],
        FieldMetadata(alias="paymentMethod"),
        pydantic.Field(alias="paymentMethod"),
    ] = None
    phone: typing.Optional[VendorPhone] = None
    remit_address_1: typing_extensions.Annotated[
        typing.Optional[Remitaddress1], FieldMetadata(alias="remitAddress1"), pydantic.Field(alias="remitAddress1")
    ] = None
    remit_address_2: typing_extensions.Annotated[
        typing.Optional[Remitaddress2], FieldMetadata(alias="remitAddress2"), pydantic.Field(alias="remitAddress2")
    ] = None
    remit_city: typing_extensions.Annotated[
        typing.Optional[Remitcity], FieldMetadata(alias="remitCity"), pydantic.Field(alias="remitCity")
    ] = None
    remit_country: typing_extensions.Annotated[
        typing.Optional[Remitcountry], FieldMetadata(alias="remitCountry"), pydantic.Field(alias="remitCountry")
    ] = None
    remit_state: typing_extensions.Annotated[
        typing.Optional[Remitstate], FieldMetadata(alias="remitState"), pydantic.Field(alias="remitState")
    ] = None
    remit_zip: typing_extensions.Annotated[
        typing.Optional[Remitzip], FieldMetadata(alias="remitZip"), pydantic.Field(alias="remitZip")
    ] = None
    state: typing.Optional[str] = pydantic.Field(default=None)
    """
    Vendor's state. Must be a 2 character state code.
    """

    vendor_id: typing_extensions.Annotated[
        typing.Optional[Vendorid],
        FieldMetadata(alias="vendorId"),
        pydantic.Field(
            alias="vendorId",
            description="Payabli identifier for vendor record. Required when `vendorNumber` isn't included.",
        ),
    ] = None
    vendor_number: typing_extensions.Annotated[
        typing.Optional[VendorNumber], FieldMetadata(alias="vendorNumber"), pydantic.Field(alias="vendorNumber")
    ] = None
    vendor_status: typing_extensions.Annotated[
        typing.Optional[Vendorstatus], FieldMetadata(alias="vendorStatus"), pydantic.Field(alias="vendorStatus")
    ] = None
    zip: typing.Optional[str] = pydantic.Field(default=None)
    """
    Vendor's postal code.
    """

    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
