# 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 .address_addtl_nullable import AddressAddtlNullable
from .address_nullable import AddressNullable
from .bank_data import BankData
from .boarding_id import BoardingId
from .city_nullable import CityNullable
from .contacts_field import ContactsField
from .country_nullable import CountryNullable
from .dbaname import Dbaname
from .external_paypoint_id import ExternalPaypointId
from .idpaypoint import Idpaypoint
from .legalname import Legalname
from .org_data import OrgData
from .payabli_credentials_pascal import PayabliCredentialsPascal
from .paypoint_summary import PaypointSummary
from .paypointstatus import Paypointstatus
from .phone_number import PhoneNumber
from .services import Services
from .state_nullable import StateNullable
from .timezone import Timezone
from .website import Website
from .zip import Zip


class PaypointData(UniversalBaseModel):
    address_1: typing_extensions.Annotated[typing.Optional[AddressNullable], FieldMetadata(alias="address1")] = None
    address_2: typing_extensions.Annotated[typing.Optional[AddressAddtlNullable], FieldMetadata(alias="address2")] = (
        None
    )
    bank_data: typing_extensions.Annotated[typing.Optional[BankData], FieldMetadata(alias="bankData")] = None
    boarding_id: typing_extensions.Annotated[typing.Optional[BoardingId], FieldMetadata(alias="boardingId")] = None
    city: typing.Optional[CityNullable] = None
    contacts: typing.Optional[ContactsField] = None
    country: typing.Optional[CountryNullable] = None
    credentials: typing.Optional[typing.List[PayabliCredentialsPascal]] = None
    dba_name: typing_extensions.Annotated[typing.Optional[Dbaname], FieldMetadata(alias="dbaName")] = None
    external_paypoint_id: typing_extensions.Annotated[
        typing.Optional[ExternalPaypointId], FieldMetadata(alias="externalPaypointID")
    ] = None
    fax: typing.Optional[PhoneNumber] = pydantic.Field(default=None)
    """
    Fax number
    """

    id_paypoint: typing_extensions.Annotated[typing.Optional[Idpaypoint], FieldMetadata(alias="idPaypoint")] = None
    legal_name: typing_extensions.Annotated[typing.Optional[Legalname], FieldMetadata(alias="legalName")] = None
    parent_org: typing_extensions.Annotated[typing.Optional[OrgData], FieldMetadata(alias="parentOrg")] = None
    paypoint_status: typing_extensions.Annotated[
        typing.Optional[Paypointstatus], FieldMetadata(alias="paypointStatus")
    ] = None
    phone: typing.Optional[PhoneNumber] = None
    service_data: typing_extensions.Annotated[typing.Optional[Services], FieldMetadata(alias="serviceData")] = None
    state: typing.Optional[StateNullable] = None
    summary: typing.Optional[PaypointSummary] = None
    time_zone: typing_extensions.Annotated[typing.Optional[Timezone], FieldMetadata(alias="timeZone")] = None
    website_address: typing_extensions.Annotated[typing.Optional[Website], FieldMetadata(alias="websiteAddress")] = None
    zip: typing.Optional[Zip] = 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
