View Source PlacetelAPI.Api.Numbers (placetel_api v2.0.1)
API calls for all endpoints tagged Numbers.
Link to this section Summary
Functions
Delete a profile for a number Removes the profile for a number
Get all numbers Provides a list of all numbers
Retrieve a number Fetches a number by its ID
List profiles for a number Lists all available profiles for a number
Creates a new profile for a number Shows the active profile for a number
Activates a profile for a number Change the active profile for a number
Link to this section Functions
delete_numbers_number_id_profiles_id(connection, number_id, id, opts \\ [])
View Source@spec delete_numbers_number_id_profiles_id( Tesla.Env.client(), integer(), integer(), keyword() ) :: {:ok, PlacetelAPI.Model.Profile.t()} | {:error, Tesla.Env.t()}
Delete a profile for a number Removes the profile for a number
parameters
Parameters
connection(PlacetelAPI.Connection): Connection to servernumber_id(integer()): Number IDid(integer()): Profile IDopts(keyword): Optional parameters
returns
Returns
{:ok, PlacetelAPI.Model.Profile.t}on success{:error, Tesla.Env.t}on failure
@spec get_numbers( Tesla.Env.client(), keyword() ) :: {:ok, [PlacetelAPI.Model.Number.t()]} | {:error, Tesla.Env.t()}
Get all numbers Provides a list of all numbers
parameters
Parameters
connection(PlacetelAPI.Connection): Connection to serveropts(keyword): Optional parameters:"filter[prefix]"(String.t)::"filter[number]"(String.t)::"filter[activated]"(boolean())::"filter[name]"(String.t)::"filter[description]"(String.t)::page(integer()): Page of results to fetch.:per_page(integer()): Number of results to return per page.
returns
Returns
{:ok, [%Number{}, ...]}on success{:error, Tesla.Env.t}on failure
@spec get_numbers_id(Tesla.Env.client(), integer(), keyword()) :: {:ok, PlacetelAPI.Model.Number.t()} | {:error, Tesla.Env.t()}
Retrieve a number Fetches a number by its ID
parameters
Parameters
connection(PlacetelAPI.Connection): Connection to serverid(integer()): Number IDopts(keyword): Optional parameters
returns
Returns
{:ok, PlacetelAPI.Model.Number.t}on success{:error, Tesla.Env.t}on failure
@spec get_numbers_number_id_profiles(Tesla.Env.client(), integer(), keyword()) :: {:ok, PlacetelAPI.Model.Profile.t()} | {:error, Tesla.Env.t()}
List profiles for a number Lists all available profiles for a number
parameters
Parameters
connection(PlacetelAPI.Connection): Connection to servernumber_id(integer()): Number IDopts(keyword): Optional parameters
returns
Returns
{:ok, PlacetelAPI.Model.Profile.t}on success{:error, Tesla.Env.t}on failure
post_numbers_number_id_profiles(connection, number_id, numbers_number_id_profiles, opts \\ [])
View Source@spec post_numbers_number_id_profiles( Tesla.Env.client(), integer(), PlacetelAPI.Model.PostNumbersNumberIdProfiles.t(), keyword() ) :: {:ok, PlacetelAPI.Model.Profile.t()} | {:error, Tesla.Env.t()}
Creates a new profile for a number Shows the active profile for a number
parameters
Parameters
connection(PlacetelAPI.Connection): Connection to servernumber_id(integer()): Number IDnumbers_number_id_profiles(PostNumbersNumberIdProfiles):opts(keyword): Optional parameters
returns
Returns
{:ok, PlacetelAPI.Model.Profile.t}on success{:error, Tesla.Env.t}on failure
put_numbers_number_id_profiles(connection, number_id, numbers_number_id_profiles, opts \\ [])
View Source@spec put_numbers_number_id_profiles( Tesla.Env.client(), integer(), PlacetelAPI.Model.PutNumbersNumberIdProfiles.t(), keyword() ) :: {:ok, PlacetelAPI.Model.Profile.t()} | {:error, Tesla.Env.t()}
Activates a profile for a number Change the active profile for a number
parameters
Parameters
connection(PlacetelAPI.Connection): Connection to servernumber_id(integer()): Number IDnumbers_number_id_profiles(PutNumbersNumberIdProfiles):opts(keyword): Optional parameters
returns
Returns
{:ok, PlacetelAPI.Model.Profile.t}on success{:error, Tesla.Env.t}on failure