public JsonResult UpdateWishList(UpdateWishListInputModel model)
        {
            try
            {
                Assert.ArgumentNotNull(model, "model");

                var validationResult = new BaseJsonResult();
                this.ValidateModel(validationResult);
                if (validationResult.HasErrors)
                {
                    return Json(validationResult, JsonRequestBehavior.AllowGet);
                }

                var wishLists = new List<WishListHeader>();
                var response = this.WishListManager.UpdateWishList(this.CurrentStorefront, this.CurrentVisitorContext, model);
                var result = new WishListsBaseJsonResult(response.ServiceProviderResult);
                if (response.ServiceProviderResult.Success && response.Result != null)
                {
                    wishLists = this.WishListsHeaders(result);
                }

                result.Initialize(wishLists);
                return Json(result, JsonRequestBehavior.AllowGet);
            }
            catch (Exception e)
            {
                CommerceLog.Current.Error("UpdateWishList", this, e);
                return Json(new BaseJsonResult("UpdateWishList", e), JsonRequestBehavior.AllowGet);
            }
        }
        /// <summary>
        /// Updates the wish list.
        /// </summary>
        /// <param name="storefront">The storefront.</param>
        /// <param name="visitorContext">The visitor context.</param>
        /// <param name="model">The model.</param>
        /// <returns>The manager response with the wish list as the result.</returns>
        public virtual ManagerResponse<UpdateWishListResult, WishList> UpdateWishList([NotNull] CommerceStorefront storefront, [NotNull] VisitorContext visitorContext, UpdateWishListInputModel model)
        {
            Assert.ArgumentNotNull(storefront, "storefront");
            Assert.ArgumentNotNull(visitorContext, "visitorContext");
            Assert.ArgumentNotNull(model, "model");

            var request = new UpdateWishListRequest(new WishList { UserId = visitorContext.UserId, CustomerId = visitorContext.UserId, ExternalId = model.ExternalId, Name = model.Name, IsFavorite = model.IsFavorite, ShopName = storefront.ShopName });
            var result = this.WishListServiceProvider.UpdateWishList(request);
            if (!result.Success)
            {
                Helpers.LogSystemMessages(result.SystemMessages, result);
            }

            return new ManagerResponse<UpdateWishListResult, WishList>(result, result.WishList);
        }