public async Task ProductSuspend(Guid accountId, ViewOwnerProduct product, DateTime?nextRebillDate) { if (nextRebillDate.HasValue) { return; } if (product.EndDate.HasValue && product.EndDate.Value > DateTime.UtcNow && (product.EndDate.Value - DateTime.UtcNow).TotalDays <= 10) { return; } var targetUser = await _auth.AccountGetAsync(accountId); var targetUserNotification = await CreateNotification(targetUser); var productSuspendNotification = new ProductSuspendNotification(targetUserNotification, product.ProductName, product.EndDate); await _repository.SendProductSuspendNotification(productSuspendNotification); }
internal static void ProductSuspend(string language, Notification notification, string product) { notification = new ProductSuspendNotification(notification, product, DateTime.Now); Send(language, EmailTemplate.ProductSuspendNotification, notification); }
public async Task SendProductSuspendNotification(ProductSuspendNotification model) { await EmailInsert(model.AccountId, EmailTemplate.ProductSuspendNotification, model.Email, model); }