private async Task FillFromMerchantServiceAsync(HistoryOperationModel model, HistoryOperation result) { string detailsMerchantId = string.IsNullOrEmpty(model.OppositeMerchantId) ? model.MerchantId : model.OppositeMerchantId; result.MerchantName = await _merchantService.GetMerchantNameAsync(detailsMerchantId); result.MerchantLogoUrl = string.IsNullOrEmpty(model.OppositeMerchantId) ? _merchantDefaultLogoUrl : await _merchantService.GetMerchantLogoUrlAsync(model.OppositeMerchantId); }
private void FillEmployeeEmail(HistoryOperationModel model, HistoryOperation result) { if (model.Type == PayHistory.AutorestClient.Models.HistoryOperationType.CashOut) { result.RequestedBy = model.EmployeeEmail; } else if (string.IsNullOrEmpty(model.InvoiceId)) { result.SoldBy = model.EmployeeEmail; } else { result.PaidBy = model.EmployeeEmail; } }