@bates-solutions/squareup API Reference - v3.2.0
    Preparing search index...

    Interface OrderDiscountInput

    An order discount. Reference an existing CatalogDiscount by catalogObjectId (keeps the catalog authoritative — the price tracks the rule), or define an ad-hoc discount inline with type + percentage/amountMoney.

    interface OrderDiscountInput {
        amountMoney?: {
            amount: number | bigint;
            currency: "USD" | "CAD" | "GBP" | "EUR" | "AUD" | "JPY";
        };
        catalogObjectId?: string;
        name?: string;
        percentage?: string;
        scope?: OrderDiscountScope;
        type?: OrderDiscountType;
        uid?: string;
    }
    Index
    amountMoney?: {
        amount: number | bigint;
        currency: "USD" | "CAD" | "GBP" | "EUR" | "AUD" | "JPY";
    }

    Fixed amount (for amount types).

    catalogObjectId?: string

    Reference an existing CatalogDiscount by id.

    name?: string
    percentage?: string

    Percentage as a string, e.g. "7.25" (for percentage types).

    ORDER applies to the whole order (Square auto-applies to every line); LINE_ITEM applies only to lines that list this discount's uid in their appliedDiscounts.

    uid?: string

    Client-side id; reference it from a line item's appliedDiscounts.