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

import typing_extensions
import typing_extensions
import typing
from ..types.tax_calculation_phase import TaxCalculationPhase
from ..types.tax_inclusion_type import TaxInclusionType


class CatalogTaxParams(typing_extensions.TypedDict):
    """
    A tax applicable to an item.
    """

    name: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The tax's name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
    """

    calculation_phase: typing_extensions.NotRequired[TaxCalculationPhase]
    """
    Whether the tax is calculated based on a payment's subtotal or total.
    See [TaxCalculationPhase](#type-taxcalculationphase) for possible values
    """

    inclusion_type: typing_extensions.NotRequired[TaxInclusionType]
    """
    Whether the tax is `ADDITIVE` or `INCLUSIVE`.
    See [TaxInclusionType](#type-taxinclusiontype) for possible values
    """

    percentage: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The percentage of the tax in decimal form, using a `'.'` as the decimal separator and without a `'%'` sign.
    A value of `7.5` corresponds to 7.5%. For a location-specific tax rate, contact the tax authority of the location or a tax consultant.
    """

    applies_to_custom_amounts: typing_extensions.NotRequired[typing.Optional[bool]]
    """
    If `true`, the fee applies to custom amounts entered into the Square Point of Sale
    app that are not associated with a particular `CatalogItem`.
    """

    enabled: typing_extensions.NotRequired[typing.Optional[bool]]
    """
    A Boolean flag to indicate whether the tax is displayed as enabled (`true`) in the Square Point of Sale app or not (`false`).
    """

    applies_to_product_set_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The ID of a `CatalogProductSet` object. If set, the tax is applicable to all products in the product set.
    """
