当前位置: 首页>>代码示例>>C#>>正文


C# Account.Create方法代码示例

本文整理汇总了C#中Account.Create方法的典型用法代码示例。如果您正苦于以下问题:C# Account.Create方法的具体用法?C# Account.Create怎么用?C# Account.Create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Account的用法示例。


在下文中一共展示了Account.Create方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateAccount

 public void CreateAccount()
 {
     var acct = new Account(GetUniqueAccountCode());
     acct.Create();
     acct.CreatedAt.Should().NotBe(default(DateTime));
     Assert.False(acct.TaxExempt.Value);
 }
开发者ID:RobertDyball,项目名称:recurly-client-net,代码行数:7,代码来源:AccountTest.cs

示例2: CreateAccountWithParameters

        public void CreateAccountWithParameters()
        {
            var acct = new Account(GetUniqueAccountCode())
            {
                Username = "testuser1",
                Email = "[email protected]",
                FirstName = "Test",
                LastName = "User",
                CompanyName = "Test Company",
                AcceptLanguage = "en",
                VatNumber = "my-vat-number",
                TaxExempt = true
            };

            string address = "123 Faux Street";
            acct.Address.Address1 = address;

            acct.Create();

            acct.Username.Should().Be("testuser1");
            acct.Email.Should().Be("[email protected]");
            acct.FirstName.Should().Be("Test");
            acct.LastName.Should().Be("User");
            acct.CompanyName.Should().Be("Test Company");
            acct.AcceptLanguage.Should().Be("en");
            Assert.Equal("my-vat-number", acct.VatNumber);
            Assert.True(acct.TaxExempt.Value);
            Assert.Equal(address, acct.Address.Address1);
        }
开发者ID:RobertDyball,项目名称:recurly-client-net,代码行数:29,代码来源:AccountTest.cs

示例3: CloseAccount

        public void CloseAccount()
        {
            var accountCode = GetUniqueAccountCode();
            var acct = new Account(accountCode);
            acct.Create();

            acct.Close();

            var getAcct = Accounts.Get(accountCode);
            getAcct.State.Should().Be(Account.AccountState.Closed);
        }
开发者ID:RobertDyball,项目名称:recurly-client-net,代码行数:11,代码来源:AccountTest.cs

示例4: LookupBillingInfo

        public void LookupBillingInfo()
        {
            var accountCode = GetUniqueAccountCode();
            var info = NewBillingInfo(accountCode);
            var account = new Account(accountCode, info);
            account.Create();

            var get = Accounts.Get(accountCode);

            get.BillingInfo.FirstName.Should().Be(info.FirstName);
            get.BillingInfo.LastName.Should().Be(info.LastName);
            get.BillingInfo.ExpirationMonth.Should().Be(info.ExpirationMonth);
            get.BillingInfo.ExpirationYear.Should().Be(info.ExpirationYear);
        }
开发者ID:Georotzen,项目名称:recurly-client-net,代码行数:14,代码来源:BillingInfoTest.cs

示例5: LookupAccount

        public void LookupAccount()
        {
            var newAcct = new Account(GetUniqueAccountCode())
            {
                Email = "[email protected]"
            };
            newAcct.Create();

            var account = Accounts.Get(newAcct.AccountCode);

            account.Should().NotBeNull();
            account.AccountCode.Should().Be(newAcct.AccountCode);
            account.Email.Should().Be(newAcct.Email);
        }
开发者ID:kylelengling,项目名称:recurly-client-net,代码行数:14,代码来源:AccountTest.cs

示例6: buttonNewUser_Click

 private void buttonNewUser_Click(object sender, EventArgs e)
 {
     NewAccountDlg newAccount = new NewAccountDlg();
     while (newAccount.ShowDialog() == DialogResult.OK)
     {
         Account a = new Account(newAccount.textBoxUser.Text, newAccount.textBoxPassword.Text);
         a.Create();
         this.textBoxUser.Text = newAccount.textBoxUser.Text;
         this.textBoxPassword.Text = newAccount.textBoxPassword.Text;
         this.DialogResult = DialogResult.OK;
         this.Close();
         return;
     }
 }
开发者ID:al-main,项目名称:sammy,代码行数:14,代码来源:CredentialsDlg.cs

示例7: CreateTransactionExistingAccountNewBillingInfo

        public void CreateTransactionExistingAccountNewBillingInfo()
        {
            var account = new Account(GetUniqueAccountCode())
            {
                FirstName = "John",
                LastName = "Smith"
            };
            account.Create();
            account.BillingInfo = NewBillingInfo(account);
            var transaction = new Transaction(account, 5000, "USD");

            transaction.Create();

            transaction.CreatedAt.Should().NotBe(default(DateTime));
        }
开发者ID:RobertDyball,项目名称:recurly-client-net,代码行数:15,代码来源:TransactionTest.cs

示例8: UpdateAccount

        public void UpdateAccount()
        {
            var acct = new Account(GetUniqueAccountCode());
            acct.Create();

            acct.LastName = "UpdateTest123";
            acct.TaxExempt = true;
            acct.VatNumber = "woot";
            acct.Update();

            var getAcct = Accounts.Get(acct.AccountCode);
            acct.LastName.Should().Be(getAcct.LastName);
            Assert.True(acct.TaxExempt.Value);
            Assert.Equal("woot", acct.VatNumber);
        }
开发者ID:RobertDyball,项目名称:recurly-client-net,代码行数:15,代码来源:AccountTest.cs

示例9: ReopenAccount

        public void ReopenAccount()
        {
            var accountCode = GetUniqueAccountCode();
            var acct = new Account(accountCode);
            acct.Create();
            acct.Close();

            acct.Reopen();

            var test = Accounts.Get(accountCode);
            acct.State.Should().Be(test.State).And.Be(Account.AccountState.Active);
        }
开发者ID:RobertDyball,项目名称:recurly-client-net,代码行数:12,代码来源:AccountTest.cs

示例10: CreateNewAccount

 protected Account CreateNewAccount()
 {
     var account = new Account(GetUniqueAccountCode());
     account.Create();
     return account;
 }
开发者ID:RobertDyball,项目名称:recurly-client-net,代码行数:6,代码来源:BaseTest.cs

示例11: SetUp

 public void SetUp()
 {
     a = new Account(user, pass);
     if (a.Exists)
     {
         a.Delete();
     }
     a.Create();
 }
开发者ID:al-main,项目名称:sammy,代码行数:9,代码来源:AccountUt.cs


注:本文中的Account.Create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。