public virtual async Task <string> PostNewIdeaAsync(Initiative idea, PersonData personData, Uri initiativeUrl) { try { var request = new New_Create_Operation_0Request( AuthenticationInfo: new AuthenticationInfo() { userName = _options.ServiceUserName, password = _options.ServicePassword }, Customer_Company: _options.CustomerCompany, Customer_Login_ID: _options.CustomerLoginId, z1D_Action: _options.Z1D_Action, Summary: idea.Title, Description: "Customer Name: " + personData.Surname + " " + personData.GivenName + '\n' + "Customer Email: " + personData.Email + '\n' + "Customer Phone Number: " + personData.Telephone + '\n' + "Initiative's Description: " + idea.Description + '\n' + "Initiative's URL: " + initiativeUrl, Requested_For: Requested_ForType.Individual, Location_Company: _options.LocationCompany, Work_Order_Template_Used: _options.WorkOrderTemplateUsed, TemplateName: _options.TemplateName, Categorization_Tier_1: _options.CategorizationTier1, Categorization_Tier_2: _options.CategorizationTier2, Categorization_Tier_3: _options.CategorizationTier3, TemplateID: _options.TemplateId, Customer_First_Name: _options.CustomerFirstName, Customer_Last_Name: _options.CustomerLastName); var response = await _remedyClient.New_Create_Operation_0Async(request); return(response.InstanceId); } catch (Exception err) { _logger.Error(err, "Unable to create work order in Remedy for Initiative { InitiativeId }: { ErrorMessage} ", idea.Id, err.Message); throw; } }
public Task <New_Create_Operation_0Response> New_Create_Operation_0Async(New_Create_Operation_0Request request) { return(Task.FromResult(new New_Create_Operation_0Response(Guid.NewGuid().ToString()))); }
public New_Create_Operation_0Response New_Create_Operation_0(New_Create_Operation_0Request request) { return(new New_Create_Operation_0Response(Guid.NewGuid().ToString())); }