コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: Sender.cs プロジェクト: whoisyourvladie/Oauth
 internal static void ProductSuspend(string language, Notification notification, string product)
 {
     notification = new ProductSuspendNotification(notification, product, DateTime.Now);
     Send(language, EmailTemplate.ProductSuspendNotification, notification);
 }
コード例 #3
0
 public async Task SendProductSuspendNotification(ProductSuspendNotification model)
 {
     await EmailInsert(model.AccountId, EmailTemplate.ProductSuspendNotification, model.Email, model);
 }