PointOfSaleClientAdjustmentTransaction Method |
Submit a Adjustment Transaction. An Adjustment Transaction can be used to correct the Points Balance for a Customer Service function.
The updated Card Ponts Balance is returned.
public ResultOfTransactionProduct AdjustmentTransaction( RequestOfAdjustmentTransaction request )
using (var svc = new PointOfSaleService.PointOfSaleClient()) { var request = new PointOfSaleService.RequestOfAdjustmentTransaction(); request.Token = "Token";//Required - Token returned from PointOfSaleService.Authenticate var adjustmentTransaction = new PointOfSaleService.AdjustmentTransaction(); adjustmentTransaction.TransactionID = "Transaction ID"; //Optional - Must be unique. Will be generated if not supplied adjustmentTransaction.TerminalID = "Terminal_ID_1 ID"; //Optional adjustmentTransaction.CashierCode = "Cashier_Code_1"; //Optional adjustmentTransaction.ClientVersion = "Client_Version"; //Optional adjustmentTransaction.CardNumber = "21000005"; //Required adjustmentTransaction.TransactionDate = DateTime.Now; //Required - cannot be a future date adjustmentTransaction.TransactionAdjustmentValue = 1234.56m; //Required - Number of points to add/subtract. Must be a value between -100000.00 and 100000.00 adjustmentTransaction.TransactionNotes = "Please process transaction with haste"; //Optional adjustmentTransaction.ProductCode = "Product_123"; //Optional adjustmentTransaction.ItemDescription = "Red Bag"; //Optional adjustmentTransaction.Quantity = 2; //Optional adjustmentTransaction.Department = "Bags"; //Optional adjustmentTransaction.DiscountReason = "Loyal customer"; //Optional adjustmentTransaction.Category = "Products";//Optional adjustmentTransaction.AdjustmentInternalNote = "Customer returning item";//Optional adjustmentTransaction.AdjustmentReason = "Item not satisfactory";//Optional adjustmentTransaction.AdjustmentReasonNote = "Item needs repair";//Optional adjustmentTransaction.AdjustmentType = "Goodwill";//Optional adjustmentTransaction.CustomerAccountID = "CA_123";//Optional - links the transaction to a customer account adjustmentTransaction.Reference = "REF_123";//Optional var transactionCustomFields = new PointOfSaleService.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 adjustmentTransaction.CustomFieldValues = transactionCustomFields;//Optional //add transaction to request request.Value = adjustmentTransaction;//Required PointOfSaleService.ResultOfTransactionProduct result = svc.AdjustmentTransaction(request); if (result.FaultCode == 0) { //Request succeeded } else { //Request failed throw new Exception(result.FaultDescription); } }