AdministrationClientCreateNewVoucher Method |
Creates a new Voucher that is a copy of the Voucher related to the submitted Voucher RSN value.
public ResultOfMemberVoucherDetail CreateNewVoucher( ManagementGroupRequestOfExtendVoucher request )
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); } }