public IHttpActionResult UpdatePromotions(webModel.Promotion promotion)
        {
            var corePromotion = promotion.ToCoreModel(_expressionSerializer);
            var scopes        = _permissionScopeService.GetObjectPermissionScopeStrings(corePromotion).ToArray();

            if (!_securityService.UserHasAnyPermission(User.Identity.Name, scopes, MarketingPredefinedPermissions.Update))
            {
                throw new HttpResponseException(HttpStatusCode.Unauthorized);
            }
            _promotionService.SavePromotions(new[] { corePromotion });
            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult CreatePromotion(webModel.Promotion promotion)
        {
            var retVal = _promotionService.CreatePromotion(promotion.ToCoreModel());

            return(GetPromotionById(retVal.Id));
        }
 public IHttpActionResult UpdatePromotions(webModel.Promotion promotion)
 {
     _promotionService.UpdatePromotions(new coreModel.Promotion[] { promotion.ToCoreModel() });
     return(StatusCode(HttpStatusCode.NoContent));
 }