Click or drag to resize

PointOfSaleClientMultiVoucherRedemptionTransaction Method

Submit a Voucher Redemption Transaction with mutiple Vouchers. Voucher redemption will not alter the Cards Points Balance, but will deliver a Reward at the POS.

Remarks
  • TransactionID is optional. If no TransactionID is submitted, then a unique TransactionID is returned by the Service
  • The submitted Transaction Date must be Less Than or Equal to the current Date and Time
Syntax
C#
public ResultOfTransactionProduct MultiVoucherRedemptionTransaction(
	RequestOfMultiVoucherRedemptionTransaction request
)

Parameters

request
Type: PointOfSaleServiceRequestOfMultiVoucherRedemptionTransaction

Return Value

Type: ResultOfTransactionProduct
Examples
C#
using (var svc = new PointOfSaleService.PointOfSaleClient())
{
  var request = new PointOfSaleService.RequestOfMultiVoucherRedemptionTransaction();
  request.Token = "Token";//Required - Token returned from PointOfSaleService.Authenticate

  var multiVoucherRedemptionTransaction = new PointOfSaleService.MultiVoucherRedemptionTransaction();
  multiVoucherRedemptionTransaction.TransactionID = "Transaction ID"; //Optional - Must be unique, if undefined a unique transaction id will be generated by the service
  multiVoucherRedemptionTransaction.TerminalID = "Terminal_ID_1"; //Optional
  multiVoucherRedemptionTransaction.CashierCode = "Cashier_Code_1"; //Optional
  multiVoucherRedemptionTransaction.ClientVersion = "Client_Version"; //Optional
  multiVoucherRedemptionTransaction.CardNumber = "Card number"; //Required
  multiVoucherRedemptionTransaction.TransactionDate = DateTime.Now; //Required - cannot be a future date
  multiVoucherRedemptionTransaction.TransactionNotes = "Please process transaction with haste"; //Optional
  multiVoucherRedemptionTransaction.ProductCode = "Product_123"; //Optional
  multiVoucherRedemptionTransaction.ItemDescription = "Red Bag"; //Optional
  multiVoucherRedemptionTransaction.Quantity = 2; //Optional
  multiVoucherRedemptionTransaction.Department = "Bags"; //Optional
  multiVoucherRedemptionTransaction.DiscountReason = "Loyal customer"; //Optional
  multiVoucherRedemptionTransaction.Category = "Products";//Optional
  multiVoucherRedemptionTransaction.CustomerAccountID = "CA_123";//Optional - links the transaction to a customer account
  multiVoucherRedemptionTransaction.TransactionVoucherCodes = new string[] { "Voucher code 1", "Voucher code 2" };//Required

  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
  multiVoucherRedemptionTransaction.CustomFieldValues = transactionCustomFields;//Optional

  //add transaction to request
  request.Value = multiVoucherRedemptionTransaction;//Required

  PointOfSaleService.ResultOfTransactionProduct result = svc.MultiVoucherRedemptionTransaction(request);

  if (result.FaultCode == 0)
  {
    //Request succeeded
  }
  else
  {
    //Request failed
    throw new Exception(result.FaultDescription);
  }
}
See Also