# 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"),
        pydantic.Field(alias="AverageMonthlyVolume"),
    ] = None
    average_ticket_amount: typing_extensions.Annotated[
        typing.Optional[Avgticketamt],
        FieldMetadata(alias="AverageTicketAmount"),
        pydantic.Field(alias="AverageTicketAmount"),
    ] = None
    b_address_1: typing_extensions.Annotated[
        typing.Optional[Baddress1], FieldMetadata(alias="BAddress1"), pydantic.Field(alias="BAddress1")
    ] = None
    b_address_2: typing_extensions.Annotated[
        typing.Optional[Baddress2], FieldMetadata(alias="BAddress2"), pydantic.Field(alias="BAddress2")
    ] = None
    bank_data: typing_extensions.Annotated[
        typing.Optional[BankData], FieldMetadata(alias="BankData"), pydantic.Field(alias="BankData")
    ] = None
    b_city: typing_extensions.Annotated[
        typing.Optional[Bcity], FieldMetadata(alias="BCity"), pydantic.Field(alias="BCity")
    ] = None
    b_country: typing_extensions.Annotated[
        typing.Optional[Bcountry], FieldMetadata(alias="BCountry"), pydantic.Field(alias="BCountry")
    ] = None
    b_fax: typing_extensions.Annotated[
        typing.Optional[Bphone],
        FieldMetadata(alias="BFax"),
        pydantic.Field(alias="BFax", description="The business's fax number."),
    ] = None
    bin_person: typing_extensions.Annotated[
        typing.Optional[Binperson], FieldMetadata(alias="BinPerson"), pydantic.Field(alias="BinPerson")
    ] = None
    bin_phone: typing_extensions.Annotated[
        typing.Optional[Binphone], FieldMetadata(alias="BinPhone"), pydantic.Field(alias="BinPhone")
    ] = None
    bin_web: typing_extensions.Annotated[
        typing.Optional[Binweb], FieldMetadata(alias="BinWeb"), pydantic.Field(alias="BinWeb")
    ] = None
    boarding_id: typing_extensions.Annotated[
        typing.Optional[BoardingId], FieldMetadata(alias="BoardingId"), pydantic.Field(alias="BoardingId")
    ] = None
    b_phone: typing_extensions.Annotated[
        typing.Optional[Bphone], FieldMetadata(alias="BPhone"), pydantic.Field(alias="BPhone")
    ] = None
    b_startdate: typing_extensions.Annotated[
        typing.Optional[Busstartdate], FieldMetadata(alias="BStartdate"), pydantic.Field(alias="BStartdate")
    ] = None
    b_state: typing_extensions.Annotated[
        typing.Optional[Bstate], FieldMetadata(alias="BState"), pydantic.Field(alias="BState")
    ] = None
    b_summary: typing_extensions.Annotated[
        typing.Optional[Bsummary], FieldMetadata(alias="BSummary"), pydantic.Field(alias="BSummary")
    ] = None
    b_time_zone: typing_extensions.Annotated[
        typing.Optional[Timezone], FieldMetadata(alias="BTimeZone"), pydantic.Field(alias="BTimeZone")
    ] = None
    b_zip: typing_extensions.Annotated[
        typing.Optional[Bzip], FieldMetadata(alias="BZip"), pydantic.Field(alias="BZip")
    ] = None
    contact_data: typing_extensions.Annotated[
        typing.Optional[ContactsField], FieldMetadata(alias="ContactData"), pydantic.Field(alias="ContactData")
    ] = None
    created_at: typing_extensions.Annotated[
        typing.Optional[CreatedAt], FieldMetadata(alias="CreatedAt"), pydantic.Field(alias="CreatedAt")
    ] = None
    dba_name: typing_extensions.Annotated[
        typing.Optional[Dbaname], FieldMetadata(alias="DbaName"), pydantic.Field(alias="DbaName")
    ] = None
    documents_ref: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="DocumentsRef"), pydantic.Field(alias="DocumentsRef")
    ] = None
    ein: typing_extensions.Annotated[typing.Optional[Ein], FieldMetadata(alias="Ein"), pydantic.Field(alias="Ein")] = (
        None
    )
    entry_points: typing_extensions.Annotated[
        typing.Optional[typing.List[PaypointEntryConfig]],
        FieldMetadata(alias="EntryPoints"),
        pydantic.Field(alias="EntryPoints"),
    ] = None
    external_paypoint_id: typing_extensions.Annotated[
        typing.Optional[ExternalPaypointId],
        FieldMetadata(alias="externalPaypointID"),
        pydantic.Field(alias="externalPaypointID"),
    ] = None
    external_processor_information: typing_extensions.Annotated[
        typing.Optional[ExternalProcessorInformation],
        FieldMetadata(alias="ExternalProcessorInformation"),
        pydantic.Field(alias="ExternalProcessorInformation"),
    ] = None
    high_ticket_amount: typing_extensions.Annotated[
        typing.Optional[Highticketamt],
        FieldMetadata(alias="HighTicketAmount"),
        pydantic.Field(alias="HighTicketAmount"),
    ] = None
    id_paypoint: typing_extensions.Annotated[
        typing.Optional[Idpaypoint], FieldMetadata(alias="IdPaypoint"), pydantic.Field(alias="IdPaypoint")
    ] = None
    last_modified: typing_extensions.Annotated[
        typing.Optional[LastModified], FieldMetadata(alias="LastModified"), pydantic.Field(alias="LastModified")
    ] = None
    legal_name: typing_extensions.Annotated[
        typing.Optional[Legalname], FieldMetadata(alias="LegalName"), pydantic.Field(alias="LegalName")
    ] = None
    license: typing_extensions.Annotated[
        typing.Optional[License], FieldMetadata(alias="License"), pydantic.Field(alias="License")
    ] = None
    license_state: typing_extensions.Annotated[
        typing.Optional[Licensestate], FieldMetadata(alias="LicenseState"), pydantic.Field(alias="LicenseState")
    ] = None
    m_address_1: typing_extensions.Annotated[
        typing.Optional[Maddress], FieldMetadata(alias="MAddress1"), pydantic.Field(alias="MAddress1")
    ] = None
    m_address_2: typing_extensions.Annotated[
        typing.Optional[Maddress1], FieldMetadata(alias="MAddress2"), pydantic.Field(alias="MAddress2")
    ] = None
    mccid: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="Mccid"), pydantic.Field(alias="Mccid")
    ] = None
    m_city: typing_extensions.Annotated[
        typing.Optional[Mcity], FieldMetadata(alias="MCity"), pydantic.Field(alias="MCity")
    ] = None
    m_country: typing_extensions.Annotated[
        typing.Optional[Mcountry], FieldMetadata(alias="MCountry"), pydantic.Field(alias="MCountry")
    ] = None
    m_state: typing_extensions.Annotated[
        typing.Optional[Mstate], FieldMetadata(alias="MState"), pydantic.Field(alias="MState")
    ] = None
    m_zip: typing_extensions.Annotated[
        typing.Optional[Mzip], FieldMetadata(alias="MZip"), pydantic.Field(alias="MZip")
    ] = None
    org_id: typing_extensions.Annotated[
        typing.Optional[Orgid], FieldMetadata(alias="OrgId"), pydantic.Field(alias="OrgId")
    ] = None
    org_parent_name: typing_extensions.Annotated[
        typing.Optional[OrgParentName], FieldMetadata(alias="OrgParentName"), pydantic.Field(alias="OrgParentName")
    ] = None
    owner_data: typing_extensions.Annotated[
        typing.Optional[Ownership], FieldMetadata(alias="OwnerData"), pydantic.Field(alias="OwnerData")
    ] = None
    own_type: typing_extensions.Annotated[
        typing.Optional[OwnType], FieldMetadata(alias="OwnType"), pydantic.Field(alias="OwnType")
    ] = None
    paypoint_status: typing_extensions.Annotated[
        typing.Optional[Paypointstatus], FieldMetadata(alias="PaypointStatus"), pydantic.Field(alias="PaypointStatus")
    ] = None
    sales_code: typing_extensions.Annotated[
        typing.Optional[SalesCode], FieldMetadata(alias="SalesCode"), pydantic.Field(alias="SalesCode")
    ] = None
    service_data: typing_extensions.Annotated[
        typing.Optional[Services], FieldMetadata(alias="ServiceData"), pydantic.Field(alias="ServiceData")
    ] = None
    summary: typing.Optional[PaypointSummary] = None
    taxfillname: typing_extensions.Annotated[
        typing.Optional[Taxfillname], FieldMetadata(alias="Taxfillname"), pydantic.Field(alias="Taxfillname")
    ] = None
    template_id: typing_extensions.Annotated[
        typing.Optional[TemplateId], FieldMetadata(alias="TemplateId"), pydantic.Field(alias="TemplateId")
    ] = None
    website_address: typing_extensions.Annotated[
        typing.Optional[Website],
        FieldMetadata(alias="WebsiteAddress"),
        pydantic.Field(alias="WebsiteAddress", description="Business website."),
    ] = None
    whencharged: typing_extensions.Annotated[
        typing.Optional[Whencharged], FieldMetadata(alias="Whencharged"), pydantic.Field(alias="Whencharged")
    ] = None
    whendelivered: typing_extensions.Annotated[
        typing.Optional[Whendelivered], FieldMetadata(alias="Whendelivered"), pydantic.Field(alias="Whendelivered")
    ] = None
    whenprovided: typing_extensions.Annotated[
        typing.Optional[Whenprovided], FieldMetadata(alias="Whenprovided"), pydantic.Field(alias="Whenprovided")
    ] = None
    whenrefund: typing_extensions.Annotated[
        typing.Optional[Whenrefunded], FieldMetadata(alias="Whenrefund"), pydantic.Field(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
