/// <summary> /// Update details of account associated with current API key. /// </summary> /// <param name="account"><see cref="Account"/> with updated info.</param> /// <example> /// This example shows how to use the <see cref="AccountManagementApi.UpdateAccount"/> method. /// <code> /// try /// { /// var account = new Account /// { /// state = "New York", /// city = "New York", /// country = "USA", /// }; /// var updatedAccount = api.UpdateAccount(account); /// return updatedAccount; /// } /// catch (CloudApiException e) /// { /// throw e; /// } /// </code> /// </example> /// <returns><see cref="Account"/></returns> /// <exception cref="CloudApiException">CloudApiException</exception> public Account UpdateAccount(Account account) { var req = account.CreateUpdateRequest(); try { var accountInfo = AdminApi.UpdateMyAccount(req); return(Account.Map(accountInfo)); } catch (ApiException e) { throw new CloudApiException(e.ErrorCode, e.Message, e.ErrorContent); } }