Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public async Task <PageOfResults <AccountTransfer> > GetTransfers(string periodId, int pageNumber)
 {
     return(await _eventsApi.GetTransfers(periodId, page : pageNumber));
 }