View Source PlacetelAPI.Api.Numbers (placetel_api v2.0.0)

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

Link to this function

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 server
  • number_id (integer()): Number ID
  • id (integer()): Profile ID
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, PlacetelAPI.Model.Profile.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_numbers(connection, opts \\ [])

View Source
@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 server
  • opts (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
Link to this function

get_numbers_id(connection, id, opts \\ [])

View Source
@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 server
  • id (integer()): Number ID
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, PlacetelAPI.Model.Number.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_numbers_number_id_profiles(connection, number_id, opts \\ [])

View Source
@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 server
  • number_id (integer()): Number ID
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, PlacetelAPI.Model.Profile.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

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 server
  • number_id (integer()): Number ID
  • numbers_number_id_profiles (PostNumbersNumberIdProfiles):
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, PlacetelAPI.Model.Profile.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

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 server
  • number_id (integer()): Number ID
  • numbers_number_id_profiles (PutNumbersNumberIdProfiles):
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, PlacetelAPI.Model.Profile.t} on success
  • {:error, Tesla.Env.t} on failure