Click or drag to resize

LoyaltyClientTransferCardToMember Method

Syntax
C#
public Result TransferCardToMember(
	ManagementGroupRequestOfTransferCardMember request
)

Parameters

request
Type: LoyaltyServiceManagementGroupRequestOfTransferCardMember

Return Value

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

  var transferCardMember = new LoyaltyService.TransferCardMember();
  transferCardMember.TargetMember_RSN = new Guid("d5d91645-e08b-4d72-b152-657470b4fef9");;//Required - RSN of member
  transferCardMember.CardNumber = "Card number";//Required
  transferCardMember.CardMergeSourceMember_TemplateID = "CARDMERGE_SOURCE_MEMBER";//Optional - If specified sends an email to the card's current member using the specified template
  transferCardMember.CardMergeTargetMember_TemplateID = "CARDMERGE_TARGET_MEMBER";//Optional - If specified sends an email to the card's new member using the specified template

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

  LoyaltyService.Result result = svc.TransferCardToMember(request);

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