public List <ProductReward> GetCosts(RemotePromotion promotion) { RewardParams parsedCustomParams = promotion.ParsedCustomParams as RewardParams; if (parsedCustomParams == null) { return(null); } return(parsedCustomParams.Costs); }
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); }