public async Task <IEnumerable <AccountTransfer> > GetAccountTransfers(string periodEnd, long receiverAccountId) { var pageOfTransfers = await _paymentsEventsApiClient.GetTransfers(periodEnd, receiverAccountId : receiverAccountId); var transfers = new List <AccountTransfer>(); foreach (var item in pageOfTransfers.Items) { transfers.Add(new AccountTransfer { SenderAccountId = item.SenderAccountId, ReceiverAccountId = item.ReceiverAccountId, PeriodEnd = periodEnd, Amount = item.Amount, ApprenticeshipId = item.CommitmentId, Type = item.Type.ToString(), RequiredPaymentId = item.RequiredPaymentId }); } return(transfers); }
public async Task <PageOfResults <AccountTransfer> > GetTransfers(string periodId, int pageNumber) { return(await _eventsApi.GetTransfers(periodId, page : pageNumber)); }