public LiquidMerchandiseReturn(MerchandiseReturn merchandiseReturn, Store store, Order order, MerchandiseReturnNote merchandiseReturnNote = null) { _merchandiseReturn = merchandiseReturn; _order = order; _store = store; _merchandiseReturnNote = merchandiseReturnNote; _items = new List <LiquidMerchandiseReturnItem>(); AdditionalTokens = new Dictionary <string, string>(); }
/// <summary> /// Inserts a merchandise return note /// </summary> /// <param name="merchandiseReturnNote">The merchandise return note</param> public virtual async Task InsertMerchandiseReturnNote(MerchandiseReturnNote merchandiseReturnNote) { if (merchandiseReturnNote == null) { throw new ArgumentNullException(nameof(merchandiseReturnNote)); } await _merchandiseReturnNoteRepository.InsertAsync(merchandiseReturnNote); //event notification await _mediator.EntityInserted(merchandiseReturnNote); }
public virtual async Task InsertMerchandiseReturnNote(MerchandiseReturn merchandiseReturn, Order order, string downloadId, bool displayToCustomer, string message) { var merchandiseReturnNote = new MerchandiseReturnNote { DisplayToCustomer = displayToCustomer, Note = message, DownloadId = downloadId, MerchandiseReturnId = merchandiseReturn.Id, CreatedOnUtc = DateTime.UtcNow, }; await _merchandiseReturnService.InsertMerchandiseReturnNote(merchandiseReturnNote); //new merchandise return notification if (displayToCustomer) { //email await _messageProviderService.SendNewMerchandiseReturnNoteAddedCustomerMessage(merchandiseReturn, merchandiseReturnNote, order); } }
public LiquidObjectBuilder AddMerchandiseReturnTokens(MerchandiseReturn merchandiseReturn, Store store, Order order, Language language, MerchandiseReturnNote merchandiseReturnNote = null) { _chain.Add(async liquidObject => { var liquidMerchandiseReturn = await _mediator.Send(new GetMerchandiseReturnTokensCommand() { Order = order, Language = language, MerchandiseReturn = merchandiseReturn, MerchandiseReturnNote = merchandiseReturnNote, Store = store }); liquidObject.MerchandiseReturn = liquidMerchandiseReturn; await _mediator.EntityTokensAdded(merchandiseReturn, liquidMerchandiseReturn, liquidObject); }); return(this); }