public async Task <IActionResult> GetNumberOfMembersByTimePeriodReport(Guid golfClubId,
                                                                               String timePeriod,
                                                                               CancellationToken cancellationToken)
        {
            GetNumberOfMembersByTimePeriodReportResponsev1 managerResponse =
                await this.ReportingManager.GetNumberOfMembersByTimePeriodReport(golfClubId, timePeriod, cancellationToken);

            GetNumberOfMembersByTimePeriodReportResponsev2 response = this.ConvertGetNumberOfMembersByTimePeriodReportResponse(managerResponse);

            return(this.Ok(response));
        }
        /// <summary>
        /// Converts the get number of members by time period report response.
        /// </summary>
        /// <param name="managerResponse">The manager response.</param>
        /// <returns></returns>
        private GetNumberOfMembersByTimePeriodReportResponsev2 ConvertGetNumberOfMembersByTimePeriodReportResponse(
            GetNumberOfMembersByTimePeriodReportResponsev1 managerResponse)
        {
            GetNumberOfMembersByTimePeriodReportResponsev2 response = new GetNumberOfMembersByTimePeriodReportResponsev2();

            response.GolfClubId = managerResponse.GolfClubId;
            response.TimePeriod = (TimePeriod)managerResponse.TimePeriod;
            response.MembersByTimePeriodResponse = new List <MembersByTimePeriodResponse>();

            foreach (DataTransferObjects.Responses.MembersByTimePeriodResponse membersByTimePeriodResponse in managerResponse.MembersByTimePeriodResponse)
            {
                response.MembersByTimePeriodResponse.Add(new MembersByTimePeriodResponse
                {
                    NumberOfMembers = membersByTimePeriodResponse.NumberOfMembers,
                    Period          = membersByTimePeriodResponse.Period
                });
            }

            return(response);
        }