Exemple #1
0
        /// <summary>
        /// Parsed and persist the submission list response to the database
        /// </summary>
        /// <param name="response">The submission list response to parsed and to save</param>
        /// <param name="isUpdate">Flag if it is to update or add the response to database</param>
        private void parsedAndPersistSubmissionListResponse(GetFeedSubmissionListResponse response, ref bool isUpdate)
        {
            if (!response.IsSetGetFeedSubmissionListResult())
            {
                return;
            }

            var submissionInfo = response.GetFeedSubmissionListResult.FeedSubmissionInfo.First();

            var requestReport = new MarketplaceRequestReport
            {
                RequestId        = response.ResponseMetadata.RequestId,
                ReportRequestId  = submissionInfo.FeedSubmissionId,
                FeedType         = submissionInfo.FeedType,
                ProcessingStatus = submissionInfo.FeedProcessingStatus,
                StartDate        = submissionInfo.StartedProcessingDate,
                EndDate          = submissionInfo.CompletedProcessingDate,
                SubmittedDate    = submissionInfo.SubmittedDate,
                SubmittedBy      = _submittedBy
            };

            if (isUpdate)
            {
                _logger.UpdateRequestReport(requestReport);
            }
            else
            {
                _logger.AddRequestReport(requestReport);
                isUpdate = true;
            }
        }