protected virtual Task <ProcessedCart> FixWishList(ProcessedCart wishList) { return(FixCartService.SetFulfillmentLocationIfRequired(new FixCartParam { Cart = wishList })); }
public virtual async Task <WishListViewModel> GetWishListViewModelAsync(GetCartParam param) { if (param == null) { throw new ArgumentNullException("param", "param is required"); } if (string.IsNullOrWhiteSpace(param.Scope)) { throw new ArgumentException("param.Scope is required", "param"); } if (param.CultureInfo == null) { throw new ArgumentException("param.CultureInfo is required", "param"); } if (string.IsNullOrWhiteSpace(param.CartName)) { throw new ArgumentException("param.CartName is required", "param"); } if (param.CustomerId == Guid.Empty) { throw new ArgumentException("param.CustomerId is required", "param"); } var wishList = await WishListRepository.GetWishListAsync(param).ConfigureAwait(false); var fixedWishlist = await FixCartService.SetFulfillmentLocationIfRequired(new FixCartParam { Cart = wishList }).ConfigureAwait(false); if (wishList == null) { return(null); } return(await CreateWishListViewModelAsync(new CreateWishListViewModelParam() { WishList = fixedWishlist, CultureInfo = param.CultureInfo, BaseUrl = param.BaseUrl })); }