public async Task <IActionResult> GetResourceProjectionForResource(ResourceType resource)
        {
            var currentBillingPeriod = await _billRepository.GetCurrentBillingPeriod();

            if (this.UserInRole(Role.Tenant))
            {
                var userId   = this.UserIdFromApiKey();
                var tenantId = await _tenantRepository.TenantIdFromUserId(userId);

                if (tenantId == null)
                {
                    var err = new DTO.ErrorBuilder()
                              .Message("Not a tenant")
                              .Code(400)
                              .Build();
                    return(err);
                }

                var projection = await _billRepository.GetProjectedResourceUsage((int)tenantId, resource, currentBillingPeriod, DateTime.Now);

                if (projection == null)
                {
                    var err = new DTO.ErrorBuilder()
                              .Message("No resource usage found for the selected resource.")
                              .Code(404)
                              .Build();
                    return(err);
                }
                var projectionDTO = new DTO.ProjectedResourceUsageDTO(projection);

                return(new ObjectResult(projectionDTO));
            }
            else
            {
                var err = new DTO.ErrorBuilder()
                          .Message("You are not authorized to view resource projections.")
                          .Code(403)
                          .Build();
                _logger.LogWarning($"Unauthorized access attempt to view resource projections.");
                return(err);
            }
        }