Newer Version Available

This content describes an older version of this product. View Latest

TransferMemberPointsToGroupsInput Class

Use this class to transfer points from an individual member or a corporate member to the member's associated group. This class receives the input parameter values for the Transfer Member Points To Groups action.

Namespace

LoyaltyManagement

Example

1public static void transferPointsToGroupsTest(){
2
3   //Create a list with LoyaltyManagement.TransferMemberPointsToGroupsInput as a datatype
4   List<LoyaltyManagement.TransferMemberPointsToGroupsInput> transferPointsList = 
5      new List<LoyaltyManagement.TransferMemberPointsToGroupsInput>();
6
7   //Create an instance of transferPointsList to set the transaction journal ID as input
8   transferPointsList.add(new LoyaltyManagement.TransferMemberPointsToGroupsInputBuilder()
9      .setJournalId('0lVT10000008CnlMAE')
10      .build());
11
12   //Pass the list to the LoyaltyResources.transferMemberPointsToGroups() interface.
13   //Store the output returned by the interface in an instance of the 'LoyaltyActionResult' object
14   List<LoyaltyManagement.LoyaltyActionResult> transferResults = 
15      LoyaltyManagement.LoyaltyResources.transferMemberPointsToGroups(transferPointsList);
16
17   //Return the status of the Apex call
18   System.debug('Transfer points to groups is successful:'+ transferResults.get(0).isSuccess());
19}