Click or drag to resize

LoyaltyClientSelectMemberByCardNumber Method

Return the Member Details from the submitted Card Number.

Syntax
C#
public ResultOfMember SelectMemberByCardNumber(
	ManagementGroupRequestOfMemberCardSearch request
)

Parameters

request
Type: LoyaltyServiceManagementGroupRequestOfMemberCardSearch

Return Value

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

  var search = new LoyaltyService.MemberCardSearch();
  search.CardNumber = "21000005";//Required
  search.ReturnAllMemberData = false;//Optional - if true returns full member data. Otherwise returns reduced data (empty values)

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

  LoyaltyService.ResultOfMember result = svc.SelectMemberByCardNumber(request);

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