hex_api_organization (hex_core v0.8.0) View Source

HTTP API - Organizations.

Link to this section Summary

Functions

Gets an organzation.

Lists all organizations you are member of.

Updates the number of seats in an organzation.

Link to this section Functions

Specs

get(hex_core:config()) -> hex_api:response().

Gets an organzation.

Examples:

  > hex_api_organization:get(hex_core:default_config()#{api_organization => <<"acme">>}).
  {ok, {200, ..., #{
       <<"billing_active">> => true,
       <<"inserted_at">> => <<"2017-08-22T22:19:53Z">>,
       <<"name">> => <<"acme">>,
       <<"seats">> => 42,
       <<"updated_at">> => <<"2019-01-18T08:47:29Z">>}
       }}}

Specs

list(hex_core:config()) -> hex_api:response().

Lists all organizations you are member of.

Examples:

  > hex_api_organization:list(hex_core:default_config()#{api_organization => <<"acme">>}).
  {ok, {200, ..., [#{
       <<"billing_active">> => true,
       <<"inserted_at">> => <<"2017-08-22T22:19:53Z">>,
       <<"name">> => <<"acme">>,
       <<"updated_at">> => <<"2019-01-18T08:47:29Z">>}
       }]}}

Specs

update(hex_core:config(), pos_integer()) -> hex_api:response().

Updates the number of seats in an organzation.

Examples:

  > hex_api_organization:get(hex_core:default_config()#{api_organization => <<"acme">>}, 42).
  {ok, {200, ..., #{
       <<"billing_active">> => true,
       <<"inserted_at">> => <<"2017-08-22T22:19:53Z">>,
       <<"name">> => <<"acme">>,
       <<"seats">> => 42,
       <<"updated_at">> => <<"2019-01-18T08:47:29Z">>}
       }}}