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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from .checkout_location_settings_policy import CheckoutLocationSettingsPolicy
from .checkout_location_settings_branding import CheckoutLocationSettingsBranding
from .checkout_location_settings_tipping import CheckoutLocationSettingsTipping
from .checkout_location_settings_coupons import CheckoutLocationSettingsCoupons
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class CheckoutLocationSettings(UncheckedBaseModel):
    location_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The ID of the location that these settings apply to.
    """

    customer_notes_enabled: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Indicates whether customers are allowed to leave notes at checkout.
    """

    policies: typing.Optional[typing.List[CheckoutLocationSettingsPolicy]] = pydantic.Field(default=None)
    """
    Policy information is displayed at the bottom of the checkout pages.
    You can set a maximum of two policies.
    """

    branding: typing.Optional[CheckoutLocationSettingsBranding] = pydantic.Field(default=None)
    """
    The branding settings for this location.
    """

    tipping: typing.Optional[CheckoutLocationSettingsTipping] = pydantic.Field(default=None)
    """
    The tip settings for this location.
    """

    coupons: typing.Optional[CheckoutLocationSettingsCoupons] = pydantic.Field(default=None)
    """
    The coupon settings for this location.
    """

    updated_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    The timestamp when the settings were last updated, in RFC 3339 format.
    Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:
    UTC: 2020-01-26T02:25:34Z
    Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00
    """

    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
