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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .tip_settings import TipSettings


class DeviceCheckoutOptions(UncheckedBaseModel):
    device_id: str = pydantic.Field()
    """
    The unique ID of the device intended for this `TerminalCheckout`.
    A list of `DeviceCode` objects can be retrieved from the /v2/devices/codes endpoint.
    Match a `DeviceCode.device_id` value with `device_id` to get the associated device code.
    """

    skip_receipt_screen: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Instructs the device to skip the receipt screen. Defaults to false.
    """

    collect_signature: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Indicates that signature collection is desired during checkout. Defaults to false.
    """

    tip_settings: typing.Optional[TipSettings] = pydantic.Field(default=None)
    """
    Tip-specific settings.
    """

    show_itemized_cart: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Show the itemization screen prior to taking a payment. This field is only meaningful when the
    checkout includes an order ID. Defaults to true.
    """

    allow_auto_card_surcharge: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Controls whether the mobile client applies Auto Card Surcharge (ACS) during checkout.
    If true, ACS is applied based on Dashboard configuration.
    If false, ACS is not applied regardless of that configuration.
    For more information, see [Add a Card Surcharge](https://developer.squareupstaging.com/docs/terminal-api/additional-payment-checkout-features#add-a-card-surcharge).
    """

    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
