Click or drag to resize

PointOfSaleClientQueryTransaction Method

Returns the number of potential points the Member would earn from a particular Transaction that contains a combination of submitted Transaction Properties.

Syntax
C#
public ResultOfQueryTransactionProduct QueryTransaction(
	RequestOfQueryTransaction request
)

Parameters

request
Type: PointOfSaleServiceRequestOfQueryTransaction

Return Value

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

  var queryTransaction = new PointOfSaleService.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";//Required when Category, Department or ProductCode is supplied. Otherwise Optional

  //add transaction to request
  request.Value = queryTransaction;

  PointOfSaleService.ResultOfQueryTransactionProduct result = svc.QueryTransaction(request);

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