NodePing.Accounts.update_account-exclamation-mark

You're seeing just the function update_account-exclamation-mark, go back to NodePing.Accounts module for more information.
Link to this function

update_account!(token, args, customerid \\ nil)

View Source

Update your NodePing account or subaccount details

Parameters

  • token - NodePing API token that is provided with account
  • args - A map of arguments for creating the subaccount
  • customerid - An optional subaccount ID that will be updated instead of the main account

The NodePing.Accounts.SubAccount can be used to create the map necessary for the args variable and the variables expected by the API to create a new subaccount.

Examples

iex> token = System.fetch_env!("TOKEN")
iex> args = %{:name => "Contact Name", :email => "me2@example.com", :timezone => "-2"}
iex> {:ok, result} = NodePing.Accounts.update_account!(token, args)
iex> result["timezone"] == "-2.0"
true