/// <summary> /// Posts the status update for an Open Shift Request from DRAFT to SUBMITTED such that the request shows in the Request Manager. /// </summary> /// <param name="personNumber">The Kronos Person Number.</param> /// <param name="requestId">The request Id.</param> /// <param name="queryDateSpan">The query date span.</param> /// <param name="comment">The comment to apply.</param> /// <param name="endpointUrl">The Kronos API endpoint.</param> /// <param name="jSession">The jSession token.</param> /// <returns>A task that contains a type of <see cref="Models.ResponseEntities.OpenShiftRequest.Response"/>.</returns> public async Task <Models.ResponseEntities.OpenShiftRequest.Response> PostOpenShiftRequestStatusUpdateAsync( string personNumber, string requestId, string queryDateSpan, string comment, Uri endpointUrl, string jSession) { string xmlRequest = this.CreateOpenShiftRequestStatusUpdate( personNumber, requestId, queryDateSpan, comment); var tupleResponse = await this.apiHelper.SendSoapPostRequestAsync( endpointUrl, ApiConstants.SoapEnvOpen, xmlRequest, ApiConstants.SoapEnvClose, jSession).ConfigureAwait(false); Models.ResponseEntities.OpenShiftRequest.Response response = this.ProcessCreateDraftOpenShiftResponse(tupleResponse.Item1); return(response); }
/// <summary> /// Method that will have the create the DraftOpenShift. /// </summary> /// <param name="tenantId">The TenantId.</param> /// <param name="jSession">The jSession.</param> /// <param name="obj">The Open Shift object.</param> /// <param name="endPointUrl">The Kronos API endpoint.</param> /// <returns>A unit of execution that contains a response.</returns> public async Task <Models.ResponseEntities.OpenShiftRequest.Response> PostDraftOpenShiftRequestAsync( string tenantId, string jSession, OpenShiftObj obj, Uri endPointUrl) { if (obj is null) { throw new ArgumentNullException(nameof(obj)); } string xmlRequest = this.CreateOpenShiftDraftRequest(obj); var tupleResponse = await this.apiHelper.SendSoapPostRequestAsync( endPointUrl, ApiConstants.SoapEnvOpen, xmlRequest, ApiConstants.SoapEnvClose, jSession).ConfigureAwait(false); Models.ResponseEntities.OpenShiftRequest.Response response = this.ProcessCreateDraftOpenShiftResponse(tupleResponse.Item1); return(response); }