コード例 #1
0
        private ResultInfoEbayFeedBack  GetFeedBack()
        {
            var req      = new GetFeedbackRequestType();
            var response = base.GetServiceData(Service.GetFeedback, req);

            var rez = new ResultInfoEbayFeedBack(response);

            rez.IncrementRequests("GetFeedback");
            return(rez);
        }
コード例 #2
0
        }         // GetCustomerUserInfo

        private void SaveFeedbackInfo(
            IDatabaseCustomerMarketPlace databaseCustomerMarketPlace,
            ResultInfoEbayFeedBack feedbackInfo,
            MP_CustomerMarketplaceUpdatingHistory historyRecord
            )
        {
            if (feedbackInfo == null)
            {
                return;
            }

            var submittedDate = feedbackInfo.SubmittedDate;

            var data = new DatabaseEbayFeedbackData(submittedDate)
            {
                RepeatBuyerCount    = feedbackInfo.RepeatBuyerCount,
                RepeatBuyerPercent  = feedbackInfo.RepeatBuyerPercent,
                TransactionPercent  = feedbackInfo.TransactionPercent,
                UniqueBuyerCount    = feedbackInfo.UniqueBuyerCount,
                UniqueNegativeCount = feedbackInfo.UniqueNegativeFeedbackCount,
                UniquePositiveCount = feedbackInfo.UniquePositiveFeedbackCount,
                UniqueNeutralCount  = feedbackInfo.UniqueNeutralFeedbackCount
            };

            var timePeriodsFeedback = new[] {
                TimePeriodEnum.Zero,
                TimePeriodEnum.Month,
                TimePeriodEnum.Month6,
                TimePeriodEnum.Year
            };

            foreach (TimePeriodEnum timePeriod in timePeriodsFeedback)
            {
                data.FeedbackByPeriod.Add(timePeriod, new DatabaseEbayFeedbackDataByPeriod(timePeriod)
                {
                    Negative = feedbackInfo.GetNegativeFeedbackByPeriod(timePeriod),
                    Neutral  = feedbackInfo.GetNeutralFeedbackByPeriod(timePeriod),
                    Positive = feedbackInfo.GetPositiveFeedbackByPeriod(timePeriod),
                });
            }             // for

            var timePeriodsRaiting = new[] {
                new Tuple <TimePeriodEnum, FeedbackSummaryPeriodCodeType>(
                    TimePeriodEnum.Month,
                    FeedbackSummaryPeriodCodeType.ThirtyDays
                    ),
                new Tuple <TimePeriodEnum, FeedbackSummaryPeriodCodeType>(
                    TimePeriodEnum.Year,
                    FeedbackSummaryPeriodCodeType.FiftyTwoWeeks
                    )
            };

            foreach (var pair in timePeriodsRaiting)
            {
                var timePeriod     = pair.Item1;
                var periodCodeType = pair.Item2;

                data.RaitingByPeriod.Add(timePeriod, new DatabaseEbayRaitingDataByPeriod(timePeriod)
                {
                    Communication = feedbackInfo.GetRaitingData(
                        periodCodeType,
                        FeedbackRatingDetailCodeType.Communication
                        ),
                    ItemAsDescribed = feedbackInfo.GetRaitingData(
                        periodCodeType,
                        FeedbackRatingDetailCodeType.ItemAsDescribed
                        ),
                    ShippingAndHandlingCharges = feedbackInfo.GetRaitingData(
                        periodCodeType,
                        FeedbackRatingDetailCodeType.ShippingAndHandlingCharges
                        ),
                    ShippingTime = feedbackInfo.GetRaitingData(
                        periodCodeType,
                        FeedbackRatingDetailCodeType.ShippingTime
                        )
                });
            }             // for

            Helper.StoreEbayFeedbackData(databaseCustomerMarketPlace, data, historyRecord);
        }         // SaveFeedbackInfo