LoyaltyClientGetClosingCardBalance Method |
Return the CardPoints Balance for the submitted Card Number.
The Card Points Balance returned is as at 23:59:59 (End of Business) on the submitted Date.
public ResultOfCardBalance GetClosingCardBalance( ManagementGroupRequestOfCardBalance request )
using (var svc = new LoyaltyService.LoyaltyClient()) { var request = new LoyaltyService.ManagementGroupRequestOfCardBalance(); request.Token = "Token";//Required - Token returned from AccountService.ManagementGroupLogin request.ManagementGroup = "Management group";//Required - ManagementGroup supplied when calling AccountService.ManagementGroupLogin var cardBalance = new LoyaltyService.CardBalance(); cardBalance.Card_Number = "21000005"; //Required cardBalance.Date = DateTime.Now;//Required - only points earned prior to this date are returned //cardBalance.PointsBalance ignored //add cardBalance to request request.Value = cardBalance; LoyaltyService.ResultOfCardBalance result = svc.GetClosingCardBalance(request); if (result.FaultCode == 0) { //Request succeeded } else { //Request failed throw new Exception(result.FaultDescription); } }