Click or drag to resize

LoyaltyPartnerClientInsertPartnerCategory Method

Create a new Partner Category, from the submitted values.

Syntax
C#
public ResultOfguid InsertPartnerCategory(
	ManagementGroupRequestOfPartnerCategory request
)

Parameters

request
Type: LoyaltyServiceManagementGroupRequestOfPartnerCategory

Return Value

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

  var partnerCategory = new LoyaltyService.PartnerCategory();
  partnerCategory.RSN = Guid.NewGuid();//Optional - will be generated if not supplied
  partnerCategory.DisplayValue = "Retail";//Required
  partnerCategory.CategoryName = "Retail";//Required

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

  LoyaltyService.ResultOfguid result = svc.InsertPartnerCategory(request);

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