# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class WooCommerceCustomer(UniversalBaseModel):
    """
    Simplified WooCommerce customer data.

    Attributes:
        email: Customer email address
        first_name: First name
        last_name: Last name
        username: Username
        billing: Billing address details
        shipping: Shipping address details
    """

    email: str = pydantic.Field()
    """
    Customer email address
    """

    first_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    First name
    """

    last_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Last name
    """

    username: typing.Optional[str] = pydantic.Field(default=None)
    """
    Username
    """

    billing: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    Billing address
    """

    shipping: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    Shipping address
    """

    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
