LoyaltyClientUpdateCard Method |
Update a Card Detail, from the submitted values.
public Result UpdateCard( ManagementGroupRequestOfCard request )
using (var svc = new LoyaltyService.LoyaltyClient()) { LoyaltyService.ManagementGroupRequestOfCard request = new LoyaltyService.ManagementGroupRequestOfCard(); request.Token = "Token";//Required - Token returned from AccountService.ManagementGroupLogin request.ManagementGroup = "Management group";//Required - ManagementGroup supplied when calling AccountService.ManagementGroupLogin //Populate the properties you wish to modify, undefined properties will not be updated. var card = new LoyaltyService.Card(); card.RSN = new Guid("c8efd8cf-813c-446a-9e47-fd280e82d308");; //Required - RSN of card card.CardNumber = "Card number";//Required card.CardName = "John Doe";//Optional card.AccessCode = "Access code";//Optional card.CardStatus = "ACTIVE"; //Optional - Can be one of 'ACTIVE', 'INACTIVE', 'CLOSED', 'LOST', 'STOLEN' or 'PEDNINGACTIVATION' card.CardType = "STANDARD"; //Optional - Can be one of 'STANDARD', 'VIRTUAL' or 'INSTORE' card.BatchControlRSN = Guid.Empty; //Optional - RSN of the batch. Only used if this card was generated as part of a batch card.CardPrintBatchControlRSN = Guid.Empty; //Optional - RSN of the print batch //all other card properties ignored //add card to request request.Value = card;//Required LoyaltyService.Result result = svc.UpdateCard(request); if (result.FaultCode == 0) { //Request succeeded } else { //Request failed throw new Exception(result.FaultDescription); } }