Use this class to update the progress made by a loyalty program member towards attaining a Cumulative type promotion. The action creates a Loyalty Program Member Promotion record if the promotion isn’t associated with the member. This class receives the input parameter values for the Update Cumulative Usage Completed action.
1public static void updateProgressForCumulativePromotionUsageTest() {23 //Create a list with LoyaltyManagement.UpdateCumulativeUsageCompletedInput as a datatype4 List<LoyaltyManagement.UpdateCumulativeUsageCompletedInput> updateCumulativeUsageCompletedInputList = 5 new List<LoyaltyManagement.UpdateCumulativeUsageCompletedInput>();67 //Create an instance of LoyaltyManagement.UpdateCumulativeUsageCompletedInput class and set the inputs8 LoyaltyManagement.UpdateCumulativeUsageCompletedInput input = new LoyaltyManagement.UpdateCumulativeUsageCompletedInput('0lMxx00000000EXEAY', '0c8xx00000000BJAAY', 200);9 LoyaltyManagement.UpdateCumulativeUsageCompletedInput input1 = new LoyaltyManagement.UpdateCumulativeUsageCompletedInput('0lMxx00000000G9EAI', '0c8xx00000000BJAAY', 200);10 updateCumulativeUsageCompletedInputList.add(input);11 updateCumulativeUsageCompletedInputList.add(input1);1213 //Store the output returned by the interface in an instance of the UpdateCumulativeUsageCompletedOutput object14 List<LoyaltyManagement.UpdateCumulativeUsageCompletedOutput> results = 15 LoyaltyManagement.LoyaltyResources.updateProgressForCumulativePromotionUsage(updateCumulativeUsageCompletedInputList);1617 //Return the status of the Apex call18 System.debug('updateProgressForCumulativePromotionUsage Successful Operation:'+ results.get(0).isSuccess());19 }