Click or drag to resize

AdministrationClientCreateNewVoucher Method

Creates a new Voucher that is a copy of the Voucher related to the submitted Voucher RSN value.

Remarks
  • The submitted Voucher RSN value must identify a Voucher that has not been consumed
  • The submitted Voucher RSN value must identify a Voucher that has past it's Expiry Date
  • The new Voucher will have an Expiry Date the is set from the submitted Expires DateTime
Syntax
C#
public ResultOfMemberVoucherDetail CreateNewVoucher(
	ManagementGroupRequestOfExtendVoucher request
)

Parameters

request
Type: AdministrationServiceManagementGroupRequestOfExtendVoucher

Return Value

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

  var extendVoucher = new AdministrationService.ExtendVoucher();
  extendVoucher.RSN = new Guid("8c7ee2b8-106d-49d0-9414-8fb91399e6bd");; //Required
  extendVoucher.Expires = DateTime.Now.AddDays(180); //Required

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

  AdministrationService.ResultOfMemberVoucherDetail result = svc.CreateNewVoucher(request);

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