# 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 .additional_data_string import AdditionalDataString
from .billing_zip import BillingZip
from .customer_id import CustomerId
from .customer_number_nullable import CustomerNumberNullable
from .customer_status import CustomerStatus
from .email import Email
from .shippingaddress import Shippingaddress
from .shippingaddressadditional import Shippingaddressadditional
from .shippingcity import Shippingcity
from .shippingcountry import Shippingcountry
from .shippingstate import Shippingstate
from .shippingzip import Shippingzip


class QueryTransactionPayorData(UniversalBaseModel):
    identifiers: typing_extensions.Annotated[
        typing.Optional[typing.List[typing.Optional[typing.Any]]], FieldMetadata(alias="Identifiers")
    ] = pydantic.Field(default=None)
    """
    Array of field names to be used as identifiers.
    """

    first_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="FirstName")] = pydantic.Field(
        default=None
    )
    """
    Customer/Payor first name.
    """

    last_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="LastName")] = pydantic.Field(
        default=None
    )
    """
    Customer/Payor last name.
    """

    company_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="CompanyName")] = (
        pydantic.Field(default=None)
    )
    """
    Customer's company name.
    """

    billing_address_1: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BillingAddress1")] = (
        pydantic.Field(default=None)
    )
    """
    Customer's billing address.
    """

    billing_address_2: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BillingAddress2")] = (
        pydantic.Field(default=None)
    )
    """
    Additional line for Customer's billing address.
    """

    billing_city: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BillingCity")] = (
        pydantic.Field(default=None)
    )
    """
    Customer's billing city.
    """

    billing_state: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BillingState")] = (
        pydantic.Field(default=None)
    )
    """
    Customer's billing state. Must be 2-letter state code for address in US.
    """

    billing_zip: typing_extensions.Annotated[typing.Optional[BillingZip], FieldMetadata(alias="BillingZip")] = (
        pydantic.Field(default=None)
    )
    """
    Customer's billing ZIP code.
    """

    billing_country: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BillingCountry")] = (
        pydantic.Field(default=None)
    )
    """
    Customer's billing country.
    """

    billing_phone: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BillingPhone")] = (
        pydantic.Field(default=None)
    )
    """
    Customer's phone number.
    """

    billing_email: typing_extensions.Annotated[typing.Optional[Email], FieldMetadata(alias="BillingEmail")] = (
        pydantic.Field(default=None)
    )
    """
    Customer's email address.
    """

    customer_number: typing_extensions.Annotated[
        typing.Optional[CustomerNumberNullable], FieldMetadata(alias="CustomerNumber")
    ] = None
    shipping_address_1: typing_extensions.Annotated[
        typing.Optional[Shippingaddress], FieldMetadata(alias="ShippingAddress1")
    ] = None
    shipping_address_2: typing_extensions.Annotated[
        typing.Optional[Shippingaddressadditional], FieldMetadata(alias="ShippingAddress2")
    ] = None
    shipping_city: typing_extensions.Annotated[typing.Optional[Shippingcity], FieldMetadata(alias="ShippingCity")] = (
        None
    )
    shipping_state: typing_extensions.Annotated[
        typing.Optional[Shippingstate], FieldMetadata(alias="ShippingState")
    ] = None
    shipping_zip: typing_extensions.Annotated[typing.Optional[Shippingzip], FieldMetadata(alias="ShippingZip")] = None
    shipping_country: typing_extensions.Annotated[
        typing.Optional[Shippingcountry], FieldMetadata(alias="ShippingCountry")
    ] = None
    customer_id: typing_extensions.Annotated[typing.Optional[CustomerId], FieldMetadata(alias="customerId")] = None
    customer_status: typing_extensions.Annotated[
        typing.Optional[CustomerStatus], FieldMetadata(alias="customerStatus")
    ] = None
    additional_data: typing_extensions.Annotated[
        typing.Optional[AdditionalDataString], FieldMetadata(alias="AdditionalData")
    ] = 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
