Exemple #1
0
        public async Task <PaginatedPaymentsModel> GetPendingPaymentRequestsForCustomerAsync(string customerId, int currentPage, int pageSize)
        {
            var(skip, take) = PagingUtils.GetNextPageParameters(currentPage, pageSize);

            var(paymentRequests, totalCount) = await _paymentsRepository.GetPendingPaymentRequestsForCustomerAsync(customerId, skip, take);

            return(new PaginatedPaymentsModel
            {
                CurrentPage = currentPage,
                PageSize = pageSize,
                PaymentRequests = paymentRequests,
                TotalCount = totalCount
            });
        }