예제 #1
0
        public static BankAccount GetBankAccount()
        {
            var bankAccount = new BankAccount();

            bankAccount.account_name        = "Test Account";
            bankAccount.account_number      = "01234567890123456789";
            bankAccount.account_number_type = "BBAN";
            bankAccount.account_type        = "CHECKING";
            bankAccount.check_type          = "PERSONAL";
            bankAccount.billing_address     = AddressTest.GetAddress();
            bankAccount.links = LinksTest.GetLinksList();
            return(bankAccount);
        }
예제 #2
0
        public static CreditCard GetCreditCard()
        {
            CreditCard card = new CreditCard();

            card.cvv2            = 962;
            card.expire_month    = 01;
            card.expire_year     = 2015;
            card.first_name      = "John";
            card.last_name       = "Doe";
            card.number          = "4825854086744369";
            card.type            = "visa";
            card.billing_address = AddressTest.GetAddress();
            return(card);
        }
예제 #3
0
        public void CreditCardObjectTest()
        {
            var card = GetCreditCard();

            card.id = "002";
            card.external_customer_id = "008";
            var add = AddressTest.GetAddress();

            Assert.AreEqual(card.number, "4825854086744369");
            Assert.AreEqual(card.first_name, "John");
            Assert.AreEqual(card.last_name, "Doe");
            Assert.AreEqual(card.expire_month, 01);
            Assert.AreEqual(card.expire_year, 2015);
            Assert.AreEqual(card.cvv2, 962);
            Assert.AreEqual(card.id, "002");
            Assert.AreEqual(card.external_customer_id, "008");
            Assert.AreEqual(add.city, card.billing_address.city);
            Assert.AreEqual(add.country_code, card.billing_address.country_code);
            Assert.AreEqual(add.line1, card.billing_address.line1);
            Assert.AreEqual(add.line2, card.billing_address.line2);
            Assert.AreEqual(add.phone, card.billing_address.phone);
            Assert.AreEqual(add.postal_code, card.billing_address.postal_code);
            Assert.AreEqual(add.state, card.billing_address.state);
        }