LoyaltyClientGetCardBalance Method |
Return the Card Points Balance for the submitted Card Number.
public ResultOfCardBalance GetCardBalance( 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 ignored //cardBalance.PointsBalance ignored //add cardBalance to request request.Value = cardBalance; LoyaltyService.ResultOfCardBalance result = svc.GetCardBalance(request); if (result.FaultCode == 0) { //Request succeeded } else { //Request failed throw new Exception(result.FaultDescription); } }