# This file was auto-generated by Fern from our API Definition.

import datetime as dt
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_map import AdditionalDataMap
from ...types.contacts import Contacts
from ...types.email import Email
from ...types.internal_reference_id import InternalReferenceId
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_number import VendorNumber
from ...types.vendor_response_billing_data import VendorResponseBillingData
from ...types.vendor_response_stored_method import VendorResponseStoredMethod
from ...types.vendor_response_summary import VendorResponseSummary
from ...types.vendorid import Vendorid
from ...types.vendorstatus import Vendorstatus


class GetMethodResponseResponseDataVendorsItem(UniversalBaseModel):
    additional_data: typing_extensions.Annotated[
        typing.Optional[AdditionalDataMap],
        FieldMetadata(alias="additionalData"),
        pydantic.Field(alias="additionalData", description="Additional data for vendor"),
    ] = None
    address_1: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="address1"),
        pydantic.Field(alias="address1", description="Vendor's address"),
    ] = None
    address_2: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="address2"),
        pydantic.Field(alias="address2", description="Additional line for vendor's address"),
    ] = None
    billing_data: typing_extensions.Annotated[
        typing.Optional[VendorResponseBillingData],
        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[typing.List[Contacts]] = pydantic.Field(default=None)
    """
    Array of objects describing the vendor's contacts
    """

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

    created_date: typing_extensions.Annotated[
        typing.Optional[dt.datetime],
        FieldMetadata(alias="createdDate"),
        pydantic.Field(alias="createdDate", description="Date when vendor was created"),
    ] = None
    custom_field_1: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="customField1"),
        pydantic.Field(alias="customField1", description="Custom field 1 for vendor"),
    ] = None
    custom_field_2: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="customField2"),
        pydantic.Field(alias="customField2", description="Custom field 2 for vendor"),
    ] = None
    customer_vendor_account: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="customerVendorAccount"),
        pydantic.Field(alias="customerVendorAccount", description="Account number of paypoint in the vendor's side"),
    ] = None
    ein: typing.Optional[str] = pydantic.Field(default=None)
    """
    EIN/Tax ID for vendor. In responses, this field is masked.
    """

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

    enrollment_status: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="enrollmentStatus"),
        pydantic.Field(alias="enrollmentStatus", description="Vendor enrollment status"),
    ] = None
    external_paypoint_id: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="externalPaypointID"),
        pydantic.Field(alias="externalPaypointID", description="External paypoint identifier"),
    ] = None
    internal_reference_id: typing_extensions.Annotated[
        typing.Optional[InternalReferenceId],
        FieldMetadata(alias="internalReferenceId"),
        pydantic.Field(alias="internalReferenceId", description="Internal reference ID for vendor"),
    ] = None
    last_updated: typing_extensions.Annotated[
        typing.Optional[dt.datetime],
        FieldMetadata(alias="lastUpdated"),
        pydantic.Field(alias="lastUpdated", description="Date when vendor was last updated"),
    ] = None
    location_code: typing_extensions.Annotated[
        typing.Optional[LocationCode],
        FieldMetadata(alias="locationCode"),
        pydantic.Field(alias="locationCode", description="Location code for vendor"),
    ] = None
    mcc: typing.Optional[Mcc] = pydantic.Field(default=None)
    """
    Merchant category code
    """

    name_1: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="name1"),
        pydantic.Field(alias="name1", description="Primary name for vendor"),
    ] = None
    name_2: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="name2"),
        pydantic.Field(alias="name2", description="Secondary name for vendor"),
    ] = None
    parent_org_id: typing_extensions.Annotated[
        typing.Optional[int],
        FieldMetadata(alias="parentOrgId"),
        pydantic.Field(alias="parentOrgId", description="ID of the parent organization"),
    ] = None
    parent_org_name: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="parentOrgName"),
        pydantic.Field(alias="parentOrgName", description="Name of the parent organization"),
    ] = None
    payee_name_1: typing_extensions.Annotated[
        typing.Optional[PayeeName],
        FieldMetadata(alias="payeeName1"),
        pydantic.Field(alias="payeeName1", description="Primary payee name"),
    ] = None
    payee_name_2: typing_extensions.Annotated[
        typing.Optional[PayeeName],
        FieldMetadata(alias="payeeName2"),
        pydantic.Field(alias="payeeName2", description="Secondary payee name"),
    ] = None
    payment_method: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="paymentMethod"),
        pydantic.Field(alias="paymentMethod", description="Preferred payment method for vendor"),
    ] = None
    paypoint_dbaname: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="paypointDbaname"),
        pydantic.Field(alias="paypointDbaname", description="DBA name of the paypoint"),
    ] = None
    paypoint_entryname: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="paypointEntryname"),
        pydantic.Field(alias="paypointEntryname", description="Entry name of the paypoint"),
    ] = None
    paypoint_id: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="paypointId"),
        pydantic.Field(alias="paypointId", description="Paypoint ID"),
    ] = None
    paypoint_legalname: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="paypointLegalname"),
        pydantic.Field(alias="paypointLegalname", description="Legal name of the paypoint"),
    ] = None
    phone: typing.Optional[str] = pydantic.Field(default=None)
    """
    Vendor's phone number
    """

    remit_address_1: typing_extensions.Annotated[
        typing.Optional[Remitaddress1],
        FieldMetadata(alias="remitAddress1"),
        pydantic.Field(alias="remitAddress1", description="Remittance address line 1"),
    ] = None
    remit_address_2: typing_extensions.Annotated[
        typing.Optional[Remitaddress2],
        FieldMetadata(alias="remitAddress2"),
        pydantic.Field(alias="remitAddress2", description="Remittance address line 2"),
    ] = None
    remit_city: typing_extensions.Annotated[
        typing.Optional[Remitcity],
        FieldMetadata(alias="remitCity"),
        pydantic.Field(alias="remitCity", description="Remittance city"),
    ] = None
    remit_country: typing_extensions.Annotated[
        typing.Optional[Remitcountry],
        FieldMetadata(alias="remitCountry"),
        pydantic.Field(alias="remitCountry", description="Remittance country"),
    ] = None
    remit_email: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="remitEmail"),
        pydantic.Field(alias="remitEmail", description="Email address for remittance"),
    ] = None
    remit_state: typing_extensions.Annotated[
        typing.Optional[Remitstate],
        FieldMetadata(alias="remitState"),
        pydantic.Field(alias="remitState", description="Remittance state"),
    ] = None
    remit_zip: typing_extensions.Annotated[
        typing.Optional[Remitzip],
        FieldMetadata(alias="remitZip"),
        pydantic.Field(alias="remitZip", description="Remittance ZIP code"),
    ] = None
    state: typing.Optional[str] = pydantic.Field(default=None)
    """
    Vendor's state
    """

    stored_methods: typing_extensions.Annotated[
        typing.Optional[typing.List[VendorResponseStoredMethod]],
        FieldMetadata(alias="storedMethods"),
        pydantic.Field(alias="storedMethods", description="Array of stored payment methods for vendor"),
    ] = None
    summary: typing.Optional[VendorResponseSummary] = pydantic.Field(default=None)
    """
    Vendor bill summary statistics
    """

    vendor_id: typing_extensions.Annotated[
        typing.Optional[Vendorid],
        FieldMetadata(alias="vendorId"),
        pydantic.Field(alias="vendorId", description="The unique numeric ID assigned to the vendor in Payabli"),
    ] = None
    vendor_number: typing_extensions.Annotated[
        typing.Optional[VendorNumber],
        FieldMetadata(alias="vendorNumber"),
        pydantic.Field(alias="vendorNumber", description="Custom vendor number assigned by the business"),
    ] = None
    vendor_status: typing_extensions.Annotated[
        typing.Optional[Vendorstatus],
        FieldMetadata(alias="vendorStatus"),
        pydantic.Field(alias="vendorStatus", description="Status code for the vendor"),
    ] = None
    zip: typing.Optional[str] = pydantic.Field(default=None)
    """
    Vendor's ZIP 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
