import type * as Square from "../index"; /** * Provides information about a loyalty event. * For more information, see [Search for Balance-Changing Loyalty Events](https://developer.squareup.com/docs/loyalty-api/loyalty-events). */ export interface LoyaltyEvent { /** The Square-assigned ID of the loyalty event. */ id?: string; /** * The type of the loyalty event. * See [LoyaltyEventType](#type-loyaltyeventtype) for possible values */ type?: Square.LoyaltyEventType; /** The timestamp when the event was created, in RFC 3339 format. */ createdAt?: string; /** Provides metadata when the event `type` is `ACCUMULATE_POINTS`. */ accumulatePoints?: Square.LoyaltyEventAccumulatePoints; /** Provides metadata when the event `type` is `CREATE_REWARD`. */ createReward?: Square.LoyaltyEventCreateReward; /** Provides metadata when the event `type` is `REDEEM_REWARD`. */ redeemReward?: Square.LoyaltyEventRedeemReward; /** Provides metadata when the event `type` is `DELETE_REWARD`. */ deleteReward?: Square.LoyaltyEventDeleteReward; /** Provides metadata when the event `type` is `ADJUST_POINTS`. */ adjustPoints?: Square.LoyaltyEventAdjustPoints; /** The ID of the [loyalty account](entity:LoyaltyAccount) associated with the event. */ loyaltyAccountId?: string; /** The ID of the [location](entity:Location) where the event occurred. */ locationId?: string; /** * Defines whether the event was generated by the Square Point of Sale. * See [LoyaltyEventSource](#type-loyaltyeventsource) for possible values */ source?: Square.LoyaltyEventSource; /** Provides metadata when the event `type` is `EXPIRE_POINTS`. */ expirePoints?: Square.LoyaltyEventExpirePoints; /** Provides metadata when the event `type` is `OTHER`. */ otherEvent?: Square.LoyaltyEventOther; /** Provides metadata when the event `type` is `ACCUMULATE_PROMOTION_POINTS`. */ accumulatePromotionPoints?: Square.LoyaltyEventAccumulatePromotionPoints; }