# 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 .annualrevenue import Annualrevenue
from .attachments import Attachments
from .avgmonthly import Avgmonthly
from .baddress_1 import Baddress1
from .baddress_2 import Baddress2
from .bank import Bank
from .bcity import Bcity
from .bcountry import Bcountry
from .binperson import Binperson
from .binphone import Binphone
from .binweb import Binweb
from .boarding_business_fax import BoardingBusinessFax
from .boarding_business_phone import BoardingBusinessPhone
from .bstate import Bstate
from .bsummary import Bsummary
from .busstartdate import Busstartdate
from .bzip import Bzip
from .contacts_field import ContactsField
from .dbaname import Dbaname
from .ein import Ein
from .email import Email
from .external_paypoint_id import ExternalPaypointId
from .highticketamt import Highticketamt
from .legalname import Legalname
from .license import License
from .licensestate import Licensestate
from .maddress import Maddress
from .maddress_1 import Maddress1
from .mcc import Mcc
from .mcity import Mcity
from .mcountry import Mcountry
from .mstate import Mstate
from .mzip import Mzip
from .orgid import Orgid
from .own_type import OwnType
from .ownership import Ownership
from .payout_average_monthly_volume import PayoutAverageMonthlyVolume
from .payout_average_ticket_limit import PayoutAverageTicketLimit
from .payout_credit_limit import PayoutCreditLimit
from .payout_high_ticket_amount import PayoutHighTicketAmount
from .recipient_email_notification import RecipientEmailNotification
from .rep_code import RepCode
from .rep_name import RepName
from .rep_office import RepOffice
from .resumable import Resumable
from .services import Services
from .signer_data_request import SignerDataRequest
from .taxfillname import Taxfillname
from .template_id import TemplateId
from .ticketamt import Ticketamt
from .website import Website
from .whencharged import Whencharged
from .whendelivered import Whendelivered
from .whenprovided import Whenprovided
from .whenrefunded import Whenrefunded


class ApplicationData(UniversalBaseModel):
    services: typing.Optional[Services] = None
    annual_revenue: typing_extensions.Annotated[
        typing.Optional[Annualrevenue], FieldMetadata(alias="annualRevenue")
    ] = None
    attachments: typing.Optional[Attachments] = None
    avgmonthly: typing.Optional[Avgmonthly] = None
    baddress: typing.Optional[Baddress1] = None
    baddress_1: typing_extensions.Annotated[typing.Optional[Baddress2], FieldMetadata(alias="baddress1")] = None
    bank_data: typing_extensions.Annotated[typing.Optional[Bank], FieldMetadata(alias="bankData")] = None
    bcity: typing.Optional[Bcity] = None
    bcountry: typing.Optional[Bcountry] = None
    binperson: typing.Optional[Binperson] = None
    binphone: typing.Optional[Binphone] = None
    binweb: typing.Optional[Binweb] = None
    bstate: typing.Optional[Bstate] = None
    bsummary: typing.Optional[Bsummary] = None
    btype: typing.Optional[OwnType] = None
    bzip: typing.Optional[Bzip] = None
    contacts: typing.Optional[ContactsField] = None
    dbaname: typing.Optional[Dbaname] = None
    ein: typing.Optional[Ein] = None
    external_paypoint_id: typing_extensions.Annotated[
        typing.Optional[ExternalPaypointId], FieldMetadata(alias="externalPaypointId")
    ] = None
    faxnumber: typing.Optional[BoardingBusinessFax] = None
    highticketamt: typing.Optional[Highticketamt] = None
    legalname: typing.Optional[Legalname] = None
    license: typing.Optional[License] = None
    licstate: typing.Optional[Licensestate] = None
    maddress: typing.Optional[Maddress] = None
    maddress_1: typing_extensions.Annotated[typing.Optional[Maddress1], FieldMetadata(alias="maddress1")] = None
    mcc: typing.Optional[Mcc] = None
    mcity: typing.Optional[Mcity] = None
    mcountry: typing.Optional[Mcountry] = None
    mstate: typing.Optional[Mstate] = None
    mzip: typing.Optional[Mzip] = None
    org_id: typing_extensions.Annotated[typing.Optional[Orgid], FieldMetadata(alias="orgId")] = None
    ownership: typing.Optional[Ownership] = None
    payout_average_monthly_volume: typing_extensions.Annotated[
        typing.Optional[PayoutAverageMonthlyVolume], FieldMetadata(alias="payoutAverageMonthlyVolume")
    ] = None
    payout_average_ticket_limit: typing_extensions.Annotated[
        typing.Optional[PayoutAverageTicketLimit], FieldMetadata(alias="payoutAverageTicketLimit")
    ] = None
    payout_credit_limit: typing_extensions.Annotated[
        typing.Optional[PayoutCreditLimit], FieldMetadata(alias="payoutCreditLimit")
    ] = None
    payout_high_ticket_amount: typing_extensions.Annotated[
        typing.Optional[PayoutHighTicketAmount], FieldMetadata(alias="payoutHighTicketAmount")
    ] = None
    phonenumber: typing.Optional[BoardingBusinessPhone] = None
    recipient_email: typing_extensions.Annotated[typing.Optional[Email], FieldMetadata(alias="recipientEmail")] = (
        pydantic.Field(default=None)
    )
    """
    Email address for the applicant. This is used to send the applicant a boarding link.
    """

    recipient_email_notification: typing_extensions.Annotated[
        typing.Optional[RecipientEmailNotification], FieldMetadata(alias="recipientEmailNotification")
    ] = None
    resumable: typing.Optional[Resumable] = None
    signer: typing.Optional[SignerDataRequest] = None
    startdate: typing.Optional[Busstartdate] = None
    taxfillname: typing.Optional[Taxfillname] = None
    template_id: typing_extensions.Annotated[typing.Optional[TemplateId], FieldMetadata(alias="templateId")] = None
    ticketamt: typing.Optional[Ticketamt] = None
    website: typing.Optional[Website] = None
    when_charged: typing_extensions.Annotated[typing.Optional[Whencharged], FieldMetadata(alias="whenCharged")] = None
    when_delivered: typing_extensions.Annotated[
        typing.Optional[Whendelivered], FieldMetadata(alias="whenDelivered")
    ] = None
    when_provided: typing_extensions.Annotated[typing.Optional[Whenprovided], FieldMetadata(alias="whenProvided")] = (
        None
    )
    when_refunded: typing_extensions.Annotated[typing.Optional[Whenrefunded], FieldMetadata(alias="whenRefunded")] = (
        None
    )
    rep_code: typing_extensions.Annotated[typing.Optional[RepCode], FieldMetadata(alias="RepCode")] = None
    rep_name: typing_extensions.Annotated[typing.Optional[RepName], FieldMetadata(alias="RepName")] = None
    rep_office: typing_extensions.Annotated[typing.Optional[RepOffice], FieldMetadata(alias="RepOffice")] = 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
