Represents a contract to redeem loyalty points for a reward tier discount. Loyalty rewards can be in an ISSUED, REDEEMED, or DELETED state. For more information, see Manage loyalty rewards.
LoyaltyReward
Name | Type | Tags | Description | Getter | Setter |
---|---|---|---|---|---|
id |
?string |
Optional | The Square-assigned ID of the loyalty reward. Constraints: Maximum Length: 36 |
getId(): ?string | setId(?string id): void |
status |
?string(LoyaltyRewardStatus) |
Optional | The status of the loyalty reward. | getStatus(): ?string | setStatus(?string status): void |
loyaltyAccountId |
string |
Required | The Square-assigned ID of the loyalty account to which the reward belongs. Constraints: Minimum Length: 1 , Maximum Length: 36 |
getLoyaltyAccountId(): string | setLoyaltyAccountId(string loyaltyAccountId): void |
rewardTierId |
string |
Required | The Square-assigned ID of the reward tier used to create the reward. Constraints: Minimum Length: 1 , Maximum Length: 36 |
getRewardTierId(): string | setRewardTierId(string rewardTierId): void |
points |
?int |
Optional | The number of loyalty points used for the reward. Constraints: >= 1 |
getPoints(): ?int | setPoints(?int points): void |
orderId |
?string |
Optional | The Square-assigned ID of the order to which the reward is attached. | getOrderId(): ?string | setOrderId(?string orderId): void |
createdAt |
?string |
Optional | The timestamp when the reward was created, in RFC 3339 format. | getCreatedAt(): ?string | setCreatedAt(?string createdAt): void |
updatedAt |
?string |
Optional | The timestamp when the reward was last updated, in RFC 3339 format. | getUpdatedAt(): ?string | setUpdatedAt(?string updatedAt): void |
redeemedAt |
?string |
Optional | The timestamp when the reward was redeemed, in RFC 3339 format. | getRedeemedAt(): ?string | setRedeemedAt(?string redeemedAt): void |
{
"id": "id6",
"status": "DELETED",
"loyalty_account_id": "loyalty_account_id4",
"reward_tier_id": "reward_tier_id2",
"points": 114,
"order_id": "order_id0",
"created_at": "created_at4"
}