Example #1
0
        public payouts_fixture()
        {
            // make sure the account has sufficient funds first
            new StripeChargeService(Cache.ApiKey).Create(new StripeChargeCreateOptions
            {
                Amount     = 2000,
                Currency   = "usd",
                SourceCard = new SourceCard
                {
                    Number          = "4000000000000077",
                    ExpirationMonth = 10,
                    ExpirationYear  = 2019,
                    Cvc             = "123"
                }
            });

            PayoutCreateOptions = new StripePayoutCreateOptions
            {
                Amount   = 1000,
                Currency = "usd"
            };

            PayoutUpdateOptions = new StripePayoutUpdateOptions
            {
                Metadata = new Dictionary <string, string>()
                {
                    { "some-key", "some-value" }
                }
            };

            var service = new StripePayoutService(Cache.ApiKey);

            Payout          = service.Create(PayoutCreateOptions);
            PayoutUpdated   = service.Update(Payout.Id, PayoutUpdateOptions);
            PayoutRetrieved = service.Get(Payout.Id);

            PayoutListOptions = new StripePayoutListOptions
            {
                Created = new StripeDateFilter {
                    EqualTo = Payout.Created
                },
                ArrivalDate = new StripeDateFilter {
                    EqualTo = Payout.ArrivalDate
                }
            };

            PayoutList = service.List(PayoutListOptions).ToList();
        }
Example #2
0
        public payouts_fixture()
        {
            // make sure the account has sufficient funds first
            new StripeChargeService(Cache.ApiKey).Create(new StripeChargeCreateOptions
            {
                Amount   = 2000,
                Currency = "usd",
                SourceTokenOrExistingSourceId = "tok_bypassPending"
            });

            PayoutCreateOptions = new StripePayoutCreateOptions
            {
                Amount   = 1000,
                Currency = "usd"
            };

            PayoutUpdateOptions = new StripePayoutUpdateOptions
            {
                Metadata = new Dictionary <string, string>()
                {
                    { "some-key", "some-value" }
                }
            };

            var service = new StripePayoutService(Cache.ApiKey);

            Payout          = service.Create(PayoutCreateOptions);
            PayoutUpdated   = service.Update(Payout.Id, PayoutUpdateOptions);
            PayoutRetrieved = service.Get(Payout.Id);

            PayoutListOptions = new StripePayoutListOptions
            {
                Created = new StripeDateFilter {
                    EqualTo = Payout.Created
                },
                ArrivalDate = new StripeDateFilter {
                    EqualTo = Payout.ArrivalDate
                }
            };

            PayoutList = service.List(PayoutListOptions);
        }
        public StripePayoutServiceTest()
        {
            this.service = new StripePayoutService();

            this.createOptions = new StripePayoutCreateOptions()
            {
                Amount   = 123,
                Currency = "usd",
            };

            this.updateOptions = new StripePayoutUpdateOptions()
            {
                Metadata = new Dictionary <string, string>()
                {
                    { "key", "value" },
                },
            };

            this.listOptions = new StripePayoutListOptions()
            {
                Limit = 1,
            };
        }