Difference between revisions of "User expirePoints"
(→User_expirePoints) |
|||
Line 31: | Line 31: | ||
//{"13848": 50, "15498936": 0} | //{"13848": 50, "15498936": 0} | ||
</source> | </source> | ||
+ | [[File:2019-11-22_17-17-34.png|1000px]] |
Revision as of 11:21, 22 November 2019
User_expirePoints
Expire all points of given users before the given time
Syntax
User_expirePoints(array userResourceId, CGDateTime expireAllBefore, string Description[, Boolean Test]);
Arguments
- userResourceId: array of userResourceId
- expireAllBefore: DateTime class, points will be expired before that time
- Description: string
- Test: Boolean, optional default not set is true. If false all points before input time will be expired; if True will return amount expired but doesnt actually expire
Return type
Dictionary (Dictionary of userResourceId, Amount expired)
Example
//Expire all points before 2019 of 2 given users
//To see how many points will be expired, don't give Test parameter, or set Test = True
DateTime a = new DateTime("2019/1/1");
User_expirePoints({13848,15498936}, a , "Expire all point before 2019", true);
//{"13848": 50, "15498936": 0}
//To make actually expire, set Test to false
DateTime a = new DateTime("2019/1/1");
User_expirePoints({13848,15498936}, a , "Expire all point before 2019", false);
//{"13848": 50, "15498936": 0}