# 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.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
from .request_out_authorize_vendor_billing_data import RequestOutAuthorizeVendorBillingData


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

    vendor_number: typing_extensions.Annotated[typing.Optional[VendorNumber], FieldMetadata(alias="vendorNumber")] = (
        None
    )
    name_1: typing_extensions.Annotated[typing.Optional[VendorName1], FieldMetadata(alias="name1")] = None
    name_2: typing_extensions.Annotated[typing.Optional[VendorName2], FieldMetadata(alias="name2")] = None
    ein: typing.Optional[VendorEin] = None
    phone: typing.Optional[VendorPhone] = None
    email: typing.Optional[Email] = None
    address_1: typing_extensions.Annotated[typing.Optional[AddressNullable], FieldMetadata(alias="address1")] = None
    city: typing.Optional[str] = None
    state: typing.Optional[str] = None
    zip: typing.Optional[str] = None
    country: typing.Optional[str] = None
    mcc: typing.Optional[Mcc] = None
    contacts: typing.Optional[ContactsField] = None
    billing_data: typing_extensions.Annotated[
        typing.Optional[RequestOutAuthorizeVendorBillingData], FieldMetadata(alias="billingData")
    ] = None
    vendor_status: typing_extensions.Annotated[typing.Optional[Vendorstatus], FieldMetadata(alias="vendorStatus")] = (
        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
    )
    customer_vendor_account: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="customerVendorAccount")
    ] = 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[AdditionalData], FieldMetadata(alias="additionalData")
    ] = None
    address_2: typing_extensions.Annotated[typing.Optional[AddressAddtlNullable], FieldMetadata(alias="address2")] = (
        None
    )
    internal_reference_id: typing_extensions.Annotated[
        typing.Optional[int], FieldMetadata(alias="internalReferenceId")
    ] = None
    location_code: typing_extensions.Annotated[typing.Optional[LocationCode], FieldMetadata(alias="locationCode")] = (
        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
    payment_method: typing_extensions.Annotated[
        typing.Optional[VendorPaymentMethod], FieldMetadata(alias="paymentMethod")
    ] = None
    vendor_id: typing_extensions.Annotated[typing.Optional[Vendorid], FieldMetadata(alias="vendorId")] = 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
