public async Task <(ResponseCode code, Job result)> GetJobByIdAsync(string id)
        {
            var pollyResult = await Policy.ExecuteAndCaptureAsync(async() => await api.GetJobById(id, Constants.ApiManagementKey));

            if (pollyResult.Result != null)
            {
                return(ResponseCode.Success, pollyResult.Result);
            }

            return(ResponseCode.Error, null);
        }
        public async Task <(ResponseCode code, Job result)> GetJobByIdAsync(string id)
        {
            // Create an instance of the Refit RestService for the job interface.
            IJobServiceAPI api = RestService.For <IJobServiceAPI>(Constants.BaseUrl);

            var pollyResult = await Policy.ExecuteAndCaptureAsync(async() => await api.GetJobById(id, Constants.ApiManagementKey));

            if (pollyResult.Result != null)
            {
                return(ResponseCode.Success, pollyResult.Result);
            }

            return(ResponseCode.Error, null);
        }