Recurly.Account.Close C# (CSharp) Method

Close() public method

Close the account and cancel any active subscriptions (if there is one). Note: This does not create a refund for any time remaining.
public Close ( ) : void
return void
        public void Close()
        {
            Accounts.Close(AccountCode);
            if(State.Is(AccountState.Active))
                State ^= AccountState.Active;
            State |= AccountState.Closed;
        }

Usage Example

Esempio n. 1
0
        public void CloseAccount()
        {
            string s = Factories.GetMockAccountName();
            Account acct = new Account(s);
            acct.Create();

            acct.Close();

            Account getAcct = Account.Get(s);
            Assert.AreEqual(getAcct.State, Recurly.Account.AccountState.closed);
        }
All Usage Examples Of Recurly.Account::Close