Click or drag to resize

LoyaltyClientSelectVouchers Method

Returns a Paged Collection of Vouchers linked to the submitted Card Number and Access Code.

Paging parameters can be defined in the request.

Syntax
C#
public ResultOfPagedCollectionOfVoucher SelectVouchers(
	ManagementGroupRequestOfVoucherSearch request
)

Parameters

request
Type: LoyaltyServiceManagementGroupRequestOfVoucherSearch

Return Value

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

  var search = new LoyaltyService.VoucherSearch();
  search.PageNumber = 1;//Optional - defaults to 1 if not supplied
  search.PageSize = 100;//Optional - default to 100 if not supplied
  search.VoucherStatus = "VALID"; //Optional - Valid values are : 'VALID', 'USED', 'EXPIRED' or 'INACTIVE
  search.Member_RSN = new Guid("c24e2378-60c5-4d2a-af05-ebdcf5b752dd");;//Required - RSN of member

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

  LoyaltyService.ResultOfPagedCollectionOfVoucher result = svc.SelectVouchers(request);

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