LoyaltyClientQueryTransaction Method |
Returns the number of potential points the Member would earn from a particular Transaction that contains a combination of submitted Transaction Properties.
public ResultOfQueryTransactionProduct QueryTransaction( ManagementGroupRequestOfQueryTransaction request )
using (var svc = new LoyaltyService.LoyaltyClient()) { var request = new LoyaltyService.ManagementGroupRequestOfQueryTransaction(); request.Token = "Token";//Required - Token returned from AccountService.ManagementGroupLogin request.ManagementGroup = "Management group";//Required - ManagementGroup supplied when calling AccountService.ManagementGroupLogin var queryTransaction = new LoyaltyService.QueryTransaction(); queryTransaction.PartnerID = "PartnerID_1"; //Optional - Must be a valid Partner ID. Defaults to partner associated with request token if not supplied queryTransaction.TransactionDate = DateTime.Now; //Required - cannot be a future date queryTransaction.TransactionSaleValue = 1234.56M; //Required - must be a value between -100000.00 and 100000.00 queryTransaction.ProductCode = "Product_123"; //Optional queryTransaction.Category = "Products";//Optional queryTransaction.Department = "Bags"; //Optional queryTransaction.ProductBrand = "Bag Makers";//Optional queryTransaction.Program = "Simplicity Rewards";//Optional - Required when Category, Department or ProductCode is supplied //add transaction to request request.Value = queryTransaction;//Required LoyaltyService.ResultOfQueryTransactionProduct result = svc.QueryTransaction(request); if (result.FaultCode == 0) { //Request succeeded } else { //Request failed throw new Exception(result.FaultDescription); } }