Click or drag to resize

LoyaltyClientSelectTransactionHistory Method

Returns a Paged Collection of Transaction Details from the submitted Search Paramaters.

Paging parameters can be defined in the request.

Syntax
C#
public ResultOfPagedCollectionOfTransaction SelectTransactionHistory(
	ManagementGroupRequestOfTransactionHistorySearch request
)

Parameters

request
Type: LoyaltyServiceManagementGroupRequestOfTransactionHistorySearch

Return Value

Type: ResultOfPagedCollectionOfTransaction
Examples
C#
using (var svc = new LoyaltyService.LoyaltyClient())
{
  var request = new LoyaltyService.ManagementGroupRequestOfTransactionHistorySearch();
  request.Token = "Token";//Required - Token returned from AccountService.ManagementGroupLogin
  request.ManagementGroup = "Management group";//Required - ManagementGroup supplied when calling AccountService.ManagementGroupLogin

  var search = new LoyaltyService.TransactionHistorySearch();
  search.PageNumber = 1;//Optional - defaults to 1 if not supplied
  search.PageSize = 100;//Optional - default to 100 if not supplied
  search.CardNumbers = new string[] { "21000005" };//Optional
  search.Location = "";//Optional - company name of transaction partner
  search.MinPointsGenerated = 0;//Optional - ignored if null
  search.MaxPointsGenerated = 0;//Optional - ignored if null
  search.MinTransactionDate = DateTime.MinValue;//Optional
  search.MaxTransactionDate = DateTime.MinValue;//Optional
  search.MinTransactionTotal = 0;//Optional - ignored if null
  search.MaxTransactionTotal = 0;//Optional - ignored if null
  search.Member_RSN = Guid.Empty;//Optional - RSN of member
  search.Partner_RSN = Guid.Empty; //Optional - RSN of partner
  search.TransactionID = "NON_SALE_TRANS_123";//Optional
  search.TransactionTypes = new string[] { "ACTIVITY", "ADJUSTMENT" };//Optional - Valid values are : 'ADJUSTMENT', 'PAY', 'SALE', 'VOUCHERREDEMPTION', 'ACTIVITY', 'BONUS', 'POINTSEXPIRY', 'POINTSREDEMPTION', 'REWARD'

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

  LoyaltyService.ResultOfPagedCollectionOfTransaction result = svc.SelectTransactionHistory(request);

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