Beispiel #1
0
        public void WritePayoutTransactions(long shopifyPayoutId)
        {
            var transactions =
                _persistRepository
                .RetrieveNotYetUploadedPayoutTranscations(shopifyPayoutId);

            foreach (var transaction in transactions)
            {
                WritePayoutTransaction(transaction);
            }
        }
        public void LogBalancingSummaries(int limitHowFarBack = 10)
        {
            var payouts = _persistRepository.RetrievePayouts(limitHowFarBack);

            foreach (var payout in payouts)
            {
                var transactions
                    = _persistRepository
                      .RetrieveNotYetUploadedPayoutTranscations(payout.ShopifyPayoutId)
                      .Select(x => x.Json.DeserializeFromJson <PayoutTransaction>())
                      .ToList();

                _logger.Info($"Balancing Payout: {payout.ShopifyPayoutId}");

                TotalHelper(transactions, "charge");
                TotalHelper(transactions, "refund");
                TotalHelper(transactions, "adjustment");
                TotalHelper(transactions, "payout");
                _logger.Info(Environment.NewLine);
            }
        }