# 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_map import AdditionalDataMap
from .billing_address_addtl_nullable import BillingAddressAddtlNullable
from .billing_address_nullable import BillingAddressNullable
from .billing_city_nullable import BillingCityNullable
from .billing_country_nullable import BillingCountryNullable
from .billing_state_nullable import BillingStateNullable
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 .identifierfields import Identifierfields
from .phone_number import PhoneNumber
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 PayorDataResponse(UniversalBaseModel):
    """
    Customer information.
    """

    additional_data: typing_extensions.Annotated[
        typing.Optional[AdditionalDataMap],
        FieldMetadata(alias="AdditionalData"),
        pydantic.Field(alias="AdditionalData"),
    ] = None
    billing_address_1: typing_extensions.Annotated[
        typing.Optional[BillingAddressNullable],
        FieldMetadata(alias="BillingAddress1"),
        pydantic.Field(alias="BillingAddress1"),
    ] = None
    billing_address_2: typing_extensions.Annotated[
        typing.Optional[BillingAddressAddtlNullable],
        FieldMetadata(alias="BillingAddress2"),
        pydantic.Field(alias="BillingAddress2"),
    ] = None
    billing_city: typing_extensions.Annotated[
        typing.Optional[BillingCityNullable], FieldMetadata(alias="BillingCity"), pydantic.Field(alias="BillingCity")
    ] = None
    billing_country: typing_extensions.Annotated[
        typing.Optional[BillingCountryNullable],
        FieldMetadata(alias="BillingCountry"),
        pydantic.Field(alias="BillingCountry"),
    ] = None
    billing_email: typing_extensions.Annotated[
        typing.Optional[Email], FieldMetadata(alias="BillingEmail"), pydantic.Field(alias="BillingEmail")
    ] = None
    billing_phone: typing_extensions.Annotated[
        typing.Optional[PhoneNumber], FieldMetadata(alias="BillingPhone"), pydantic.Field(alias="BillingPhone")
    ] = None
    billing_state: typing_extensions.Annotated[
        typing.Optional[BillingStateNullable], FieldMetadata(alias="BillingState"), pydantic.Field(alias="BillingState")
    ] = None
    billing_zip: typing_extensions.Annotated[
        typing.Optional[BillingZip],
        FieldMetadata(alias="BillingZip"),
        pydantic.Field(
            alias="BillingZip",
            description='Customer\'s billing ZIP code. For Pay In functions, this field supports 5-digit and 9-digit ZIP codes and alphanumeric Canadian postal codes. For example: "37615-1234" or "37615".',
        ),
    ] = None
    company_name: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="CompanyName"),
        pydantic.Field(alias="CompanyName", description="Customer's company name."),
    ] = None
    customer_id: typing_extensions.Annotated[
        typing.Optional[CustomerId], FieldMetadata(alias="customerId"), pydantic.Field(alias="customerId")
    ] = None
    customer_number: typing_extensions.Annotated[
        typing.Optional[CustomerNumberNullable],
        FieldMetadata(alias="CustomerNumber"),
        pydantic.Field(alias="CustomerNumber"),
    ] = None
    customer_status: typing_extensions.Annotated[
        typing.Optional[CustomerStatus],
        FieldMetadata(alias="customerStatus"),
        pydantic.Field(
            alias="customerStatus",
            description="Customer status. This is used to determine if the customer is active or inactive.",
        ),
    ] = None
    first_name: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="FirstName"),
        pydantic.Field(alias="FirstName", description="Customer/Payor first name."),
    ] = None
    identifiers: typing_extensions.Annotated[
        typing.Optional[Identifierfields], FieldMetadata(alias="Identifiers"), pydantic.Field(alias="Identifiers")
    ] = None
    last_name: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="LastName"),
        pydantic.Field(alias="LastName", description="Customer/Payor last name."),
    ] = None
    shipping_address_1: typing_extensions.Annotated[
        typing.Optional[Shippingaddress],
        FieldMetadata(alias="ShippingAddress1"),
        pydantic.Field(alias="ShippingAddress1"),
    ] = None
    shipping_address_2: typing_extensions.Annotated[
        typing.Optional[Shippingaddressadditional],
        FieldMetadata(alias="ShippingAddress2"),
        pydantic.Field(alias="ShippingAddress2"),
    ] = None
    shipping_city: typing_extensions.Annotated[
        typing.Optional[Shippingcity], FieldMetadata(alias="ShippingCity"), pydantic.Field(alias="ShippingCity")
    ] = None
    shipping_country: typing_extensions.Annotated[
        typing.Optional[Shippingcountry],
        FieldMetadata(alias="ShippingCountry"),
        pydantic.Field(alias="ShippingCountry"),
    ] = None
    shipping_state: typing_extensions.Annotated[
        typing.Optional[Shippingstate], FieldMetadata(alias="ShippingState"), pydantic.Field(alias="ShippingState")
    ] = None
    shipping_zip: typing_extensions.Annotated[
        typing.Optional[Shippingzip], FieldMetadata(alias="ShippingZip"), pydantic.Field(alias="ShippingZip")
    ] = 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
