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

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


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.
    """

    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
