# 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 ShopifyCustomer(UniversalBaseModel):
    """
    Simplified Shopify customer data with flattened address.

    Attributes:
        email: Customer email address
        name: Customer full name (will be split into first/last for API)
        address: Street address
        city: City name
        state: State/province code
        zip: Postal/ZIP code
        country: Country code (e.g., 'US')
    """

    email: typing.Optional[str] = pydantic.Field(default=None)
    """
    Customer email address
    """

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

    address: typing.Optional[str] = pydantic.Field(default=None)
    """
    Street address
    """

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

    state: typing.Optional[str] = pydantic.Field(default=None)
    """
    State/province code
    """

    zip: typing.Optional[str] = pydantic.Field(default=None)
    """
    Postal/ZIP code
    """

    country: typing.Optional[str] = pydantic.Field(default=None)
    """
    Country code (e.g., 'US')
    """

    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
