LoyaltyClientPointsRedemptionTransaction Method |
Submit a Transaction to Redeem Points that are available for Redemption on the submitted Card Number.
The updated Card Ponts Balance is returned.
public ResultOfTransactionProduct PointsRedemptionTransaction( ManagementGroupRequestOfPartnerPointsRedemptionTransaction request )
using (var svc = new LoyaltyService.LoyaltyClient()) { var request = new LoyaltyService.ManagementGroupRequestOfPartnerPointsRedemptionTransaction(); request.Token = "Token";//Required - Token returned from AccountService.ManagementGroupLogin request.ManagementGroup = "Management group";//Required - ManagementGroup supplied when calling AccountService.ManagementGroupLogin var pointsRedemptionTransaction = new LoyaltyService.PartnerPointsRedemptionTransaction(); pointsRedemptionTransaction.PartnerID = "PartnerID_1";//Required pointsRedemptionTransaction.TransactionID = "Transaction ID"; //Optional - Must be unique. Will be generated if not supplied pointsRedemptionTransaction.TerminalID = "Terminal_ID_1"; //Optional pointsRedemptionTransaction.CashierCode = "Cashier_Code_1"; //Optional pointsRedemptionTransaction.ClientVersion = "Client_Version"; //Optional pointsRedemptionTransaction.CardNumber = "33293857"; //Required pointsRedemptionTransaction.TransactionDate = DateTime.Now; //Required - cannot be a future date pointsRedemptionTransaction.TransactionRedemptionValue = 1234.56M; //Required - Number of points to add/subtract. Must be a value between -100000.00 and 100000.00 pointsRedemptionTransaction.TransactionNotes = "Please process transaction with haste"; //Optional pointsRedemptionTransaction.ProductCode = "Product_123"; //Optional pointsRedemptionTransaction.ItemDescription = "Red Bag"; //Optional pointsRedemptionTransaction.Category = "Products";//Optional pointsRedemptionTransaction.Quantity = 2; //Optional pointsRedemptionTransaction.Department = "Bags"; //Optional pointsRedemptionTransaction.DiscountReason = "Loyal customer"; //Optional pointsRedemptionTransaction.CustomerAccountID = "CA_123";//Optional - links the transaction to a customer account pointsRedemptionTransaction.Reference = "REF_123";//Optional pointsRedemptionTransaction.AdjustmentInternalNote = "Customer returning item";//Optional pointsRedemptionTransaction.AdjustmentReason = "Item not satisfactory";//Optional pointsRedemptionTransaction.AdjustmentReasonNote = "Item needs repair";//Optional pointsRedemptionTransaction.AdjustmentType = "Goodwill";//Optional pointsRedemptionTransaction.CampaignOffer_RSN = new Guid("5396b734-2831-4f68-b6d2-208c9f2cb746");;//Optional - RSN of campaign offer var transactionCustomFields = new LoyaltyService.ProfileCustomFieldValues(); transactionCustomFields.CustomText_1 = string.Empty; //Optional CustomText_2 - CustomText_15 available transactionCustomFields.CustomBoolean_1 = false; //Optional CustomBoolean_2 - CustomBoolean_20 available transactionCustomFields.CustomDate_1 = DateTime.MinValue; //Optional CustomDate_2 - CustomDate_15 available transactionCustomFields.CustomDecimal_1 = 0.0M; //Optional CustomDecimal_2 - CustomDecimal_5 available transactionCustomFields.CustomInteger_1 = 0; //Optional CustomInteger_2 - CustomInteger_10 available pointsRedemptionTransaction.CustomFieldValues = transactionCustomFields;//Optional //add transaction to request request.Value = pointsRedemptionTransaction;//Required LoyaltyService.ResultOfTransactionProduct result = svc.PointsRedemptionTransaction(request); if (result.FaultCode == 0) { //Request succeeded } else { //Request failed throw new Exception(result.FaultDescription); } }