Click or drag to resize

AdministrationClientUpdateSecurityAccount Method

Syntax
C#
public Result UpdateSecurityAccount(
	ManagementGroupRequestOfSecurityAccountUpdate request
)

Parameters

request
Type: AdministrationServiceManagementGroupRequestOfSecurityAccountUpdate

Return Value

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

  var securityAccountUpdate = new AdministrationService.SecurityAccountUpdate();
  securityAccountUpdate.SecurityAccountRSN = new Guid("53db2e45-06b4-4e7d-9688-f2eebc158b68");; //Required
  securityAccountUpdate.Status = "ACTIVE"; //Required - Valid values are : 'ACTIVE', 'INACTIVE', 'CLOSED' or 'PEDNINGACTIVATION'

  var securityAccountManagementGroup = new AdministrationService.SecurityAccountManagementGroup();
  securityAccountManagementGroup.GroupCode = "LOYALTY_MEMBER"; //Required  
  securityAccountManagementGroup.CanApproveTransactions = true; //Required
  //all other securityAccountManagementGroup properties ignored
  securityAccountUpdate.ManagementGroups = new AdministrationService.SecurityAccountManagementGroup[] { securityAccountManagementGroup };//Optional

  // add securityAccountUpdate to request
  request.Value = securityAccountUpdate;//Required

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