Click or drag to resize

PointOfSaleClientLinkMemberToInStoreCard Method

Assign an existing Physical Card to an existing Member. The Card Status is set to "ACTIVE.

Remarks
  • CardStatus must be "PENDINGACTIVATION"
  • Check the CardStatus using the method: ValidateInStoreCard
  • CardNumber and Access code is validated
  • ProgramMembership.ProgramRSN and ProgramMembership.PointsBalance cannot be modified using this method
  • ProgramMembership.PersonRSN does not need to be populated when using this method
Syntax
C#
public ResultOfInstoreCard LinkMemberToInStoreCard(
	RequestOfLinkInstoreCardMember request
)

Parameters

request
Type: PointOfSaleServiceRequestOfLinkInstoreCardMember

Return Value

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

  var linkInstoreCardMember = new PointOfSaleService.LinkInstoreCardMember(); //Required
  //Note: card status must be set to 'PENDINGACTIVATION'
  linkInstoreCardMember.CardNumber = "Card number"; //Required
  linkInstoreCardMember.AccessCode = "Access code"; //Required - May be optional depending on configuration
  linkInstoreCardMember.CardMergeNotActiveCard_TemplateID = "CARDMERGENOTACTIVECARD_TEMPLATEID"; //Optional - If specified sends an email to the member using the specified template
  linkInstoreCardMember.SendEmail = true; //Optional - Sends welcome email to member if true and member not already in program

  var programMembership = new PointOfSaleService.ProgramMembership();
  programMembership.MemberRSN = new Guid("3435a914-958f-4ba8-9474-facaab26cc6f");;//Required - RSN of member
  programMembership.StartDate = DateTime.Now; //Optional
  programMembership.EndDate = DateTime.Now.AddYears(1); //Optional (leave blank or set to DateTime.Min to have a program membership that does not expire)
  //programMembership.DisplayValue should not be supplied
  //programMembership.RSN should not be supplied
  //programMembership.PersonRSN should not be supplied
  //programMembership.ProgramRSN should not be supplied

  //set member program membership
  linkInstoreCardMember.ProgramMembership = programMembership;

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

  PointOfSaleService.ResultOfInstoreCard result = svc.LinkMemberToInStoreCard(request);

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