Exemplo n.º 1
0
        private static void Main(string[] args)
        {
            var apiKey = "";
            var stripe = new StripeClient(apiKey);

            var chargeService = new ChargeService(stripe);
            var chargeId      = "";
            var charge        = chargeService.Get(chargeId);

            Console.WriteLine("Charge");
            Console.WriteLine($"Amount: ${charge.Amount}");

            var payoutService = new PayoutService(stripe);
            var payoutId      = "";
            var payout        = payoutService.Get(payoutId);

            Console.WriteLine($"Payout: {payoutId}");
            Console.WriteLine($"Date Paid: {payout.ArrivalDate.ToString()}");


            var balanceTransactionService = new BalanceTransactionService(stripe);
            var requestOptions            = new BalanceTransactionListOptions {
                Payout = payoutId, Limit = 100
            };
            var transactionList = balanceTransactionService.List(requestOptions);

            Console.WriteLine($"Transactions: {transactionList.Count()}");
        }
Exemplo n.º 2
0
        private StripeList <BalanceTransaction> ListBalanceTransactions()
        {
            StripeConfiguration.ApiKey = _appKeys.StripeApiKey;

            //DateTime dateNow = DateTime.Now;
            DateTime createdDate = DateTime.Now.AddDays(-30);


            var options = new BalanceTransactionListOptions
            {
                Created = new DateRangeOptions
                {
                    GreaterThan = createdDate,
                },
                Limit = 100
            };
            var service = new BalanceTransactionService();
            StripeList <BalanceTransaction> balanceTransactions = service.List(
                options);

            return(balanceTransactions);
        }