import type * as Square from "../index"; /** * Represents a promotion for a [loyalty program](entity:LoyaltyProgram). Loyalty promotions enable buyers * to earn extra points on top of those earned from the base program. * * A loyalty program can have a maximum of 10 loyalty promotions with an `ACTIVE` or `SCHEDULED` status. */ export interface LoyaltyPromotion { /** The Square-assigned ID of the promotion. */ id?: string; /** The name of the promotion. */ name: string; /** * The points incentive for the promotion. This field defines whether promotion points * are earned by multiplying base program points or by adding a specified number of points. */ incentive: Square.LoyaltyPromotionIncentive; /** The scheduling information that defines when purchases can qualify to earn points from an `ACTIVE` promotion. */ availableTime: Square.LoyaltyPromotionAvailableTimeData; /** * The number of times a buyer can earn promotion points during a specified interval. * If not specified, buyers can trigger the promotion an unlimited number of times. */ triggerLimit?: Square.LoyaltyPromotionTriggerLimit; /** * The current status of the promotion. * See [LoyaltyPromotionStatus](#type-loyaltypromotionstatus) for possible values */ status?: Square.LoyaltyPromotionStatus; /** The timestamp of when the promotion was created, in RFC 3339 format. */ createdAt?: string; /** The timestamp of when the promotion was canceled, in RFC 3339 format. */ canceledAt?: string; /** The timestamp when the promotion was last updated, in RFC 3339 format. */ updatedAt?: string; /** The ID of the [loyalty program](entity:LoyaltyProgram) associated with the promotion. */ loyaltyProgramId?: string; /** The minimum purchase amount required to earn promotion points. If specified, this amount is positive. */ minimumSpendAmountMoney?: Square.Money; /** * The IDs of any qualifying `ITEM_VARIATION` [catalog objects](entity:CatalogObject). If specified, * the purchase must include at least one of these items to qualify for the promotion. * * This option is valid only if the base loyalty program uses a `VISIT` or `SPEND` accrual rule. * With `SPEND` accrual rules, make sure that qualifying promotional items are not excluded. * * You can specify `qualifying_item_variation_ids` or `qualifying_category_ids` for a given promotion, but not both. */ qualifyingItemVariationIds?: string[] | null; /** * The IDs of any qualifying `CATEGORY` [catalog objects](entity:CatalogObject). If specified, * the purchase must include at least one item from one of these categories to qualify for the promotion. * * This option is valid only if the base loyalty program uses a `VISIT` or `SPEND` accrual rule. * With `SPEND` accrual rules, make sure that qualifying promotional items are not excluded. * * You can specify `qualifying_category_ids` or `qualifying_item_variation_ids` for a promotion, but not both. */ qualifyingCategoryIds?: string[] | null; }