Click or drag to resize

PointOfSaleClientVoucherStatus Method

Returns the Voucher Status for the supplied Voucher Code.

Card Number is an optional parameter. If the Card Number is supplied, then the the method will check the Voucher is liked to the Card Number.

Syntax
C#
public ResultOfVoucherStatus VoucherStatus(
	RequestOfVoucherValid request
)

Parameters

request
Type: PointOfSaleServiceRequestOfVoucherValid

Return Value

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

  var voucherValid = new PointOfSaleService.VoucherValid();
  voucherValid.VoucherCode = "Voucher code";//Required
  voucherValid.CardNumber = "";//Optional

  //add voucherValid to request
  request.Value = voucherValid;

  PointOfSaleService.ResultOfVoucherStatus result = svc.VoucherStatus(request);

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