import type * as Square from "../../../../index"; /** * @example * { * order: { * locationId: "D7AVYMEAPJ3A3", * lineItems: [{ * name: "Item 1", * quantity: "1", * basePriceMoney: { * amount: BigInt("500"), * currency: "USD" * } * }, { * name: "Item 2", * quantity: "2", * basePriceMoney: { * amount: BigInt("300"), * currency: "USD" * } * }], * discounts: [{ * name: "50% Off", * percentage: "50", * scope: "ORDER" * }] * } * } */ export interface CalculateOrderRequest { /** The order to be calculated. Expects the entire order, not a sparse update. */ order: Square.Order; /** * Identifies one or more loyalty reward tiers to apply during the order calculation. * The discounts defined by the reward tiers are added to the order only to preview the * effect of applying the specified rewards. The rewards do not correspond to actual * redemptions; that is, no `reward`s are created. Therefore, the reward `id`s are * random strings used only to reference the reward tier. */ proposedRewards?: Square.OrderReward[] | null; }