/// <summary>
        /// Creates a request to retrieve a time off request.
        /// </summary>
        /// <param name="queryDateSpan">The queryDateSpan string.</param>
        /// <param name="personNumber">The Kronos Person Number.</param>
        /// <param name="id">The Kronos id of the request.</param>
        /// <returns>XML request string.</returns>
        private string CreateRetrieveTimeOffRequest(string queryDateSpan, string personNumber, string id)
        {
            var request =
                new CommonTimeOffRequest.Request
            {
                Action      = ApiConstants.RetrieveWithDetails,
                RequestMgmt = new CommonTimeOffRequest.RequestMgmt
                {
                    Employees = new Employees
                    {
                        PersonIdentity = new List <PersonIdentity>
                        {
                            new PersonIdentity {
                                PersonNumber = personNumber
                            },
                        },
                    },
                    QueryDateSpan = queryDateSpan,
                    RequestIds    = new CommonTimeOffRequest.RequestIds
                    {
                        RequestId = new CommonTimeOffRequest.RequestId[1]
                        {
                            new CommonTimeOffRequest.RequestId()
                            {
                                Id = id
                            },
                        },
                    },
                },
            };

            return(request.XmlSerialize());
        }
        /// <summary>
        /// Creates an Approval/Denial time off request.
        /// </summary>
        /// <param name="queryDateSpan">The queryDateSpan string.</param>
        /// <param name="personNumber">The Kronos Person Number.</param>
        /// <param name="approved">Whether the request needs to be approved or denied.</param>
        /// <param name="id">The Kronos id of the request.</param>
        /// <returns>XML request string.</returns>
        private string CreateApproveOrDeclineTimeOffRequest(
            string queryDateSpan,
            string personNumber,
            bool approved,
            string id)
        {
            var request =
                new CommonTimeOffRequest.Request
            {
                Action      = approved ? ApiConstants.ApproveRequests : ApiConstants.RefuseRequests,
                RequestMgmt = new CommonTimeOffRequest.RequestMgmt
                {
                    Employees = new Employees
                    {
                        PersonIdentity = new List <PersonIdentity>
                        {
                            new PersonIdentity {
                                PersonNumber = personNumber
                            },
                        },
                    },
                    QueryDateSpan = queryDateSpan,
                    RequestIds    = new CommonTimeOffRequest.RequestIds
                    {
                        RequestId = new CommonTimeOffRequest.RequestId[1]
                        {
                            new CommonTimeOffRequest.RequestId()
                            {
                                Id = id
                            },
                        },
                    },
                },
            };

            return(request.XmlSerialize());
        }