# 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 .avgmonthly import Avgmonthly
from .avgticketamt import Avgticketamt
from .baddress_1 import Baddress1
from .baddress_2 import Baddress2
from .bank_data import BankData
from .bcity import Bcity
from .bcountry import Bcountry
from .binperson import Binperson
from .binphone import Binphone
from .binweb import Binweb
from .boarding_id import BoardingId
from .bphone import Bphone
from .bstate import Bstate
from .bsummary import Bsummary
from .busstartdate import Busstartdate
from .bzip import Bzip
from .contacts_field import ContactsField
from .created_at import CreatedAt
from .dbaname import Dbaname
from .ein import Ein
from .external_paypoint_id import ExternalPaypointId
from .external_processor_information import ExternalProcessorInformation
from .highticketamt import Highticketamt
from .idpaypoint import Idpaypoint
from .last_modified import LastModified
from .legalname import Legalname
from .license import License
from .licensestate import Licensestate
from .maddress import Maddress
from .maddress_1 import Maddress1
from .mcity import Mcity
from .mcountry import Mcountry
from .mstate import Mstate
from .mzip import Mzip
from .org_parent_name import OrgParentName
from .orgid import Orgid
from .own_type import OwnType
from .ownership import Ownership
from .paypoint_entry_config import PaypointEntryConfig
from .paypoint_summary import PaypointSummary
from .paypointstatus import Paypointstatus
from .sales_code import SalesCode
from .services import Services
from .taxfillname import Taxfillname
from .template_id import TemplateId
from .timezone import Timezone
from .website import Website
from .whencharged import Whencharged
from .whendelivered import Whendelivered
from .whenprovided import Whenprovided
from .whenrefunded import Whenrefunded


class QueryEntrypointResponseRecordsItem(UniversalBaseModel):
    average_monthly_volume: typing_extensions.Annotated[
        typing.Optional[Avgmonthly], FieldMetadata(alias="AverageMonthlyVolume")
    ] = None
    average_ticket_amount: typing_extensions.Annotated[
        typing.Optional[Avgticketamt], FieldMetadata(alias="AverageTicketAmount")
    ] = None
    b_address_1: typing_extensions.Annotated[typing.Optional[Baddress1], FieldMetadata(alias="BAddress1")] = None
    b_address_2: typing_extensions.Annotated[typing.Optional[Baddress2], FieldMetadata(alias="BAddress2")] = None
    bank_data: typing_extensions.Annotated[typing.Optional[BankData], FieldMetadata(alias="BankData")] = None
    b_city: typing_extensions.Annotated[typing.Optional[Bcity], FieldMetadata(alias="BCity")] = None
    b_country: typing_extensions.Annotated[typing.Optional[Bcountry], FieldMetadata(alias="BCountry")] = None
    b_fax: typing_extensions.Annotated[typing.Optional[Bphone], FieldMetadata(alias="BFax")] = pydantic.Field(
        default=None
    )
    """
    The business's fax number.
    """

    bin_person: typing_extensions.Annotated[typing.Optional[Binperson], FieldMetadata(alias="BinPerson")] = None
    bin_phone: typing_extensions.Annotated[typing.Optional[Binphone], FieldMetadata(alias="BinPhone")] = None
    bin_web: typing_extensions.Annotated[typing.Optional[Binweb], FieldMetadata(alias="BinWeb")] = None
    boarding_id: typing_extensions.Annotated[typing.Optional[BoardingId], FieldMetadata(alias="BoardingId")] = None
    b_phone: typing_extensions.Annotated[typing.Optional[Bphone], FieldMetadata(alias="BPhone")] = None
    b_startdate: typing_extensions.Annotated[typing.Optional[Busstartdate], FieldMetadata(alias="BStartdate")] = None
    b_state: typing_extensions.Annotated[typing.Optional[Bstate], FieldMetadata(alias="BState")] = None
    b_summary: typing_extensions.Annotated[typing.Optional[Bsummary], FieldMetadata(alias="BSummary")] = None
    b_time_zone: typing_extensions.Annotated[typing.Optional[Timezone], FieldMetadata(alias="BTimeZone")] = None
    b_zip: typing_extensions.Annotated[typing.Optional[Bzip], FieldMetadata(alias="BZip")] = None
    contact_data: typing_extensions.Annotated[typing.Optional[ContactsField], FieldMetadata(alias="ContactData")] = None
    created_at: typing_extensions.Annotated[typing.Optional[CreatedAt], FieldMetadata(alias="CreatedAt")] = None
    dba_name: typing_extensions.Annotated[typing.Optional[Dbaname], FieldMetadata(alias="DbaName")] = None
    documents_ref: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="DocumentsRef")] = None
    ein: typing_extensions.Annotated[typing.Optional[Ein], FieldMetadata(alias="Ein")] = None
    entry_points: typing_extensions.Annotated[
        typing.Optional[typing.List[PaypointEntryConfig]], FieldMetadata(alias="EntryPoints")
    ] = None
    external_paypoint_id: typing_extensions.Annotated[
        typing.Optional[ExternalPaypointId], FieldMetadata(alias="externalPaypointID")
    ] = None
    external_processor_information: typing_extensions.Annotated[
        typing.Optional[ExternalProcessorInformation], FieldMetadata(alias="ExternalProcessorInformation")
    ] = None
    high_ticket_amount: typing_extensions.Annotated[
        typing.Optional[Highticketamt], FieldMetadata(alias="HighTicketAmount")
    ] = None
    id_paypoint: typing_extensions.Annotated[typing.Optional[Idpaypoint], FieldMetadata(alias="IdPaypoint")] = None
    last_modified: typing_extensions.Annotated[typing.Optional[LastModified], FieldMetadata(alias="LastModified")] = (
        None
    )
    legal_name: typing_extensions.Annotated[typing.Optional[Legalname], FieldMetadata(alias="LegalName")] = None
    license: typing_extensions.Annotated[typing.Optional[License], FieldMetadata(alias="License")] = None
    license_state: typing_extensions.Annotated[typing.Optional[Licensestate], FieldMetadata(alias="LicenseState")] = (
        None
    )
    m_address_1: typing_extensions.Annotated[typing.Optional[Maddress], FieldMetadata(alias="MAddress1")] = None
    m_address_2: typing_extensions.Annotated[typing.Optional[Maddress1], FieldMetadata(alias="MAddress2")] = None
    mccid: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="Mccid")] = None
    m_city: typing_extensions.Annotated[typing.Optional[Mcity], FieldMetadata(alias="MCity")] = None
    m_country: typing_extensions.Annotated[typing.Optional[Mcountry], FieldMetadata(alias="MCountry")] = None
    m_state: typing_extensions.Annotated[typing.Optional[Mstate], FieldMetadata(alias="MState")] = None
    m_zip: typing_extensions.Annotated[typing.Optional[Mzip], FieldMetadata(alias="MZip")] = None
    org_id: typing_extensions.Annotated[typing.Optional[Orgid], FieldMetadata(alias="OrgId")] = None
    org_parent_name: typing_extensions.Annotated[
        typing.Optional[OrgParentName], FieldMetadata(alias="OrgParentName")
    ] = None
    owner_data: typing_extensions.Annotated[typing.Optional[Ownership], FieldMetadata(alias="OwnerData")] = None
    own_type: typing_extensions.Annotated[typing.Optional[OwnType], FieldMetadata(alias="OwnType")] = None
    paypoint_status: typing_extensions.Annotated[
        typing.Optional[Paypointstatus], FieldMetadata(alias="PaypointStatus")
    ] = None
    sales_code: typing_extensions.Annotated[typing.Optional[SalesCode], FieldMetadata(alias="SalesCode")] = None
    service_data: typing_extensions.Annotated[typing.Optional[Services], FieldMetadata(alias="ServiceData")] = None
    summary: typing.Optional[PaypointSummary] = None
    taxfillname: typing_extensions.Annotated[typing.Optional[Taxfillname], FieldMetadata(alias="Taxfillname")] = None
    template_id: typing_extensions.Annotated[typing.Optional[TemplateId], FieldMetadata(alias="TemplateId")] = None
    website_address: typing_extensions.Annotated[typing.Optional[Website], FieldMetadata(alias="WebsiteAddress")] = (
        pydantic.Field(default=None)
    )
    """
    Business website.
    """

    whencharged: typing_extensions.Annotated[typing.Optional[Whencharged], FieldMetadata(alias="Whencharged")] = None
    whendelivered: typing_extensions.Annotated[typing.Optional[Whendelivered], FieldMetadata(alias="Whendelivered")] = (
        None
    )
    whenprovided: typing_extensions.Annotated[typing.Optional[Whenprovided], FieldMetadata(alias="Whenprovided")] = None
    whenrefund: typing_extensions.Annotated[typing.Optional[Whenrefunded], FieldMetadata(alias="Whenrefund")] = 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
