/// <summary> /// Creates the account. /// </summary> /// <returns> /// The account created. /// </returns> public async Task <IAccountContext> NewAccount(IList <string> contact, bool termsOfServiceAgreed) { var body = new Account { Contact = contact, TermsOfServiceAgreed = termsOfServiceAgreed }; var resp = await AccountContext.NewAccount(this, body, true); return(accountContext = new AccountContext(this, resp.Location)); }
/// <summary> /// Gets the ACME account context. /// </summary> /// <returns>The ACME account context.</returns> public async Task <IAccountContext> Account() { if (accountContext != null) { return(accountContext); } var resp = await AccountContext.NewAccount(this, new Account.Payload { OnlyReturnExisting = true }, true); return(accountContext = new AccountContext(this, resp.Location)); }