public async Task SendReminderEmail(IClientReminder reminder)
        {
            await _clientReminderRepository.DeleteAsync(reminder);

            var clientAcc = await _clientAccountService.GetClientByIdAsync(reminder.ClientId);

            if (clientAcc == null)
            {
                await _log.WriteInfoAsync(nameof(ClientReminderService), nameof(SendReminderEmail), $"client {reminder.ClientId} reminder cannot be processed - no client account found");
            }
            else
            {
                var pd = await _personalDataService.GetAsync(reminder.ClientId);

                if (pd == null)
                {
                    await _log.WriteInfoAsync(nameof(ClientReminderService), nameof(SendReminderEmail), $"client {reminder.ClientId} reminder cannot be processed - no personal data found");
                }
                else
                {
                    var reminderData = new KycRegReminderData
                    {
                        Year     = DateTime.UtcNow.Year.ToString(),
                        FullName = String.IsNullOrWhiteSpace(pd.FullName) ? pd.FirstName + " " + pd.LastName : pd.FullName,
                        Date     = DateTime.UtcNow.ToString("MMM dd, hh:mm tt", CultureInfo.InvariantCulture),
                        Subject  = "Lykke Wallet"
                    };
                    await _emailSender.SendEmailAsync(clientAcc.PartnerId, clientAcc.Email, reminderData); // send email reminder

                    await _log.WriteInfoAsync(nameof(ClientReminderService), nameof(SendReminderEmail), $"client {reminder.ClientId} reminder processed - email sent");
                }
            }
        }
        public async Task ProcessReminderWithoutEmailSending(IClientReminder reminder)
        {
            await _clientReminderRepository.DeleteAsync(reminder);

            await _log.WriteInfoAsync(nameof(ClientReminderService), nameof(ProcessReminderWithoutEmailSending), $"client {reminder.ClientId} reminder processing is not required - some kyc documents uploaded");
        }
 public async Task <bool> IsReminderEmailSendingRequired(IClientReminder reminder)
 {
     return(!(await _clientDocService.GetDocumentsAsync(reminder.ClientId)).Any());
 }
 public async Task DeleteAsync(IClientReminder rmd)
 {
     await _tableStorage.DeleteAsync(rmd as ClientReminderEntity);
 }