Click or drag to resize

AdministrationClientSetMemberExpiry Method

Set the End Date for the Program Membership linked to the submitted Member RSN.

This will also by extension set an End Date to any Card belonging to the Program Membership.

The Member RSN can be fetched from the Web Service Method: SelectMembers

Syntax
C#
public Result SetMemberExpiry(
	ManagementGroupRequestOfSetMemberExpiry request
)

Parameters

request
Type: AdministrationServiceManagementGroupRequestOfSetMemberExpiry

Return Value

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

  var setMemberExpiry = new AdministrationService.SetMemberExpiry(); //Required
  setMemberExpiry.Card_RSN = new Guid("db954f5a-6826-4318-abcf-e37943b9186c");; //Required
  setMemberExpiry.Program_RSN = new Guid("f1feaf7e-8fa4-491e-9f80-14cf6a4ca896");; //Required
  setMemberExpiry.ProgramMembership_RSN = new Guid("7ef782bc-8fba-4cdc-bd59-00d616e308ec");; //Required
  setMemberExpiry.ProgramMembership_StartDate = DateTime.Now; //Required
  setMemberExpiry.ProgramMembership_EndDate = DateTime.Now.AddYears(1); //Required

  request.Value = setMemberExpiry; //Required

  AdministrationService.Result result = svc.SetMemberExpiry(request);

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