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

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


class ReceiptOptions(UncheckedBaseModel):
    """
    Describes receipt action fields.
    """

    payment_id: str = pydantic.Field()
    """
    The reference to the Square payment ID for the receipt.
    """

    print_only: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Instructs the device to print the receipt without displaying the receipt selection screen.
    Requires `printer_enabled` set to true.
    Defaults to false.
    """

    is_duplicate: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Identify the receipt as a reprint rather than an original receipt.
    Defaults to false.
    """

    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
