示例#1
0
 private ICollection<PaymentBundle> CreatePaymentBundles(BetaFileHeader header, List<BetaPaymentRecord> payments)
 {
     return new List<PaymentBundle>
         {
             new PaymentBundle($"{header.ClearingNumber}{header.AccountNumber}", _dateOfPayment, "SEK",
                 payments.Select(payment => new PaymentRecord(payment.Amount, payment.Reference)))
         };
 }
示例#2
0
        private BetaFileHeader ReadHeader()
        {
            if(!RawPaymentProvider.HasMoreRecords)
                throw new BadFileFormatException($"Could not locate header in beta payment file provided from {RawPaymentProvider}");

            var header = new BetaFileHeader(RawPaymentProvider.ReadNextRecord());

            return header;
        }