public async Task <IEnumerable <DataLockStatus> > GetDataLockEvents(
            long sinceEventId        = 0,
            DateTime?sinceTime       = null,
            string employerAccountId = null,
            long ukprn = 0,
            int page   = 1)
        {
            var result = await _retryPolicy.ExecuteAsync(() => _paymentsEventsApi.GetDataLockEvents(sinceEventId, sinceTime, employerAccountId, ukprn, page));

            return
                (result?.Items.Select(_mapper.Map)
                 ?? new DataLockStatus[0]);
        }
Пример #2
0
        public async Task <PageOfResults <DataLockEvent> > GetUnprocessedDataLocks()
        {
            var eventId = await _eventRepository.GetLastProcessedEventId <long>(typeof(DataLockEvent).Name);

            return(await _eventsApi.GetDataLockEvents(sinceEventId : eventId));
        }