Exemple #1
0
        public BankAccountServiceTest(
            StripeMockFixture stripeMockFixture,
            MockHttpClientFixture mockHttpClientFixture)
            : base(stripeMockFixture, mockHttpClientFixture)
        {
            this.service = new BankAccountService(this.StripeClient);

            this.createOptions = new BankAccountCreateOptions
            {
                Source = "btok_123",
            };

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

            this.listOptions = new BankAccountListOptions
            {
                Limit = 1,
            };

            this.verifyOptions = new BankAccountVerifyOptions
            {
                Amounts = new List <long>
                {
                    32,
                    45,
                }
            };
        }
        public void SerializeObjectProperly()
        {
            var options = new BankAccountListOptions();

            var url = this.service.ApplyAllParameters(options, string.Empty, false);

            Assert.Equal("?object=bank_account", url);
        }
        public BankAccountServiceTest(MockHttpClientFixture mockHttpClientFixture)
            : base(mockHttpClientFixture)
        {
            this.service = new BankAccountService();

            this.createOptions = new BankAccountCreateOptions
            {
                SourceBankAccount = new SourceBankAccount
                {
                    AccountNumber     = "000123456789",
                    Country           = "US",
                    Currency          = "usd",
                    AccountHolderName = "John Doe",
                    AccountHolderType = BankAccountHolderType.Company,
                    RoutingNumber     = "110000000",
                    Metadata          = new Dictionary <string, string>
                    {
                        { "key", "value" },
                    },
                }
            };

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

            this.listOptions = new BankAccountListOptions
            {
                Limit = 1,
            };

            this.verifyOptions = new BankAccountVerifyOptions
            {
                Amounts = new List <long>
                {
                    32,
                    45,
                }
            };
        }
Exemple #4
0
        public BankAccountServiceTest()
        {
            this.service = new BankAccountService();

            this.createOptions = new BankAccountCreateOptions
            {
                SourceBankAccount = new SourceBankAccount()
                {
                    AccountNumber     = "000123456789",
                    Country           = "US",
                    Currency          = "usd",
                    AccountHolderName = "John Doe",
                    AccountHolderType = BankAccountHolderType.Company,
                    RoutingNumber     = "110000000",
                    Metadata          = new Dictionary <string, string>
                    {
                        { "key", "value" },
                    },
                }
            };

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

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

            this.verifyOptions = new BankAccountVerifyOptions
            {
                AmountOne = 32,
                AmountTwo = 45,
            };
        }
        public void SerializeObjectProperly()
        {
            var options = new BankAccountListOptions();

            Assert.Equal("object=bank_account", FormEncoder.CreateQueryString(options));
        }