Esempio n. 1
0
        public sources_fixture()
        {
            SourceCreateOptions = new StripeSourceCreateOptions
            {
                Type     = StripeSourceType.AchCreditTransfer,
                Currency = "usd",
                Owner    = new StripeSourceOwner
                {
                    Email      = "*****@*****.**",
                    CityOrTown = "Mayberry",
                    State      = "NC"
                }
            };

            SourceUpdateOptions = new StripeSourceUpdateOptions
            {
                Owner = new StripeSourceOwner
                {
                    Email = "*****@*****.**"
                }
            };

            var service = new StripeSourceService(Cache.ApiKey);

            Source          = service.Create(SourceCreateOptions);
            SourceUpdated   = service.Update(Source.Id, SourceUpdateOptions);
            SourceRetrieved = service.Get(Source.Id);
        }
        public StripeSourceServiceTest()
        {
            this.service = new StripeSourceService();

            this.createOptions = new StripeSourceCreateOptions
            {
                Type     = StripeSourceType.AchCreditTransfer,
                Currency = "usd",
                Mandate  = new StripeSourceMandateOptions
                {
                    MandateAcceptanceDate      = DateTime.Parse("Mon, 01 Jan 2001 00:00:00Z"),
                    MandateAcceptanceIp        = "127.0.0.1",
                    MandateAcceptanceStatus    = "accepted",
                    MandateAcceptanceUserAgent = "User-Agent",
                    MandateNotificationMethod  = "manual",
                },
                Receiver = new StripeSourceReceiverOptions
                {
                    RefundAttributesMethod = "manual",
                },
            };

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

            this.listOptions = new StripeSourceListOptions()
            {
                Limit = 1,
            };
        }
Esempio n. 3
0
        public sources_fixture()
        {
            SourceCreateOptions = new StripeSourceCreateOptions
            {
                Type     = StripeSourceType.Bitcoin,
                Amount   = 1,
                Currency = "usd",
                Owner    = new StripeSourceOwner
                {
                    Email      = "*****@*****.**",
                    CityOrTown = "Mayberry",
                    State      = "NC"
                }
            };

            SourceUpdateOptions = new StripeSourceUpdateOptions
            {
                Owner = new StripeSourceOwner
                {
                    Email = "*****@*****.**"
                }
            };

            var service = new StripeSourceService(Cache.ApiKey);

            Source          = service.Create(SourceCreateOptions);
            SourceUpdated   = service.Update(Source.Id, SourceUpdateOptions);
            SourceRetrieved = service.Get(Source.Id);
        }
Esempio n. 4
0
        public creating_and_updating_card_source()
        {
            SourceCardCreateOptions = new StripeSourceCreateOptions
            {
                Type  = StripeSourceType.Card,
                Token = "tok_visa"
            };

            SourceCardUpdateOptions = new StripeSourceUpdateOptions
            {
                Card = new StripeSourceCardUpdateOptions
                {
                    ExpirationMonth = 12,
                    ExpirationYear  = 2028
                }
            };

            var service = new StripeSourceService(Cache.ApiKey);

            SourceCard        = service.Create(SourceCardCreateOptions);
            SourceCardUpdated = service.Update(SourceCard.Id, SourceCardUpdateOptions);
        }
Esempio n. 5
0
        public StripeSourceServiceTest()
        {
            this.service = new StripeSourceService();

            this.createOptions = new StripeSourceCreateOptions
            {
                Type     = StripeSourceType.AchCreditTransfer,
                Currency = "usd"
            };

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

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