예제 #1
0
        public List <ProductReward> GetCosts(RemotePromotion promotion)
        {
            RewardParams parsedCustomParams = promotion.ParsedCustomParams as RewardParams;

            if (parsedCustomParams == null)
            {
                return(null);
            }
            return(parsedCustomParams.Costs);
        }
예제 #2
0
        public List <Reward> GetRewards(RemotePromotion promotion)
        {
            RewardParams parsedCustomParams = promotion.ParsedCustomParams as RewardParams;

            if (parsedCustomParams == null)
            {
                return(null);
            }
            List <Reward> list = new List <Reward>();

            foreach (ProductReward reward in parsedCustomParams.Rewards)
            {
                Reward rewardFromProductReward = ConfigShops.GetRewardFromProductReward(reward, null);
                list.Add(rewardFromProductReward);
            }
            return(list);
        }