NodePing.Accounts.create_subaccount

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

create_subaccount(token, args)

View Source

Create a subaccount for your NodePing account

Parameters

  • token - NodePing API token that is provided with account
  • args - A map of arguments for creating the subaccount

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 = %{:contactname => "My Name", :email => "me@example.com", :timezone => "-7", :location => "name"}
iex> {:ok, result} = NodePing.Accounts.create_subaccount(token, args)
iex> is_map(result)
true