View Source PlacetelAPI.Api.Routings (placetel_api v2.0.1)

API calls for all endpoints tagged Routings.

Link to this section Summary

Functions

Delete a routing object Delete a routing object

Get all routings Provides a list of routing

Create a routing object Create a routing object. Routing can be created as: forward, group, ivr, queue or api

Update routing Updates the routing object. Routing can be set to: forward, group, plan, ivr, queue or api

Link to this section Functions

Link to this function

delete_routings_number_or_id(connection, number_or_id, opts \\ [])

View Source
@spec delete_routings_number_or_id(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, PlacetelAPI.Model.RoutingObject.t()} | {:error, Tesla.Env.t()}

Delete a routing object Delete a routing object

parameters

Parameters

  • connection (PlacetelAPI.Connection): Connection to server
  • number_or_id (String.t): A number or an ID
  • opts (keyword): Optional parameters

returns

Returns

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

get_routings(connection, opts \\ [])

View Source
@spec get_routings(
  Tesla.Env.client(),
  keyword()
) :: {:ok, [PlacetelAPI.Model.RoutingObject.t()]} | {:error, Tesla.Env.t()}

Get all routings Provides a list of routing

parameters

Parameters

  • connection (PlacetelAPI.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :"filter[updated_at_gte]" (DateTime.t):
    • :"filter[updated_at_lte]" (DateTime.t):
    • :page (integer()): Page of results to fetch.
    • :per_page (integer()): Number of results to return per page.

returns

Returns

  • {:ok, [%RoutingObject{}, ...]} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_routings_number_or_id(connection, number_or_id, opts \\ [])

View Source
@spec get_routings_number_or_id(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, PlacetelAPI.Model.RoutingObject.t()} | {:error, Tesla.Env.t()}

Retrieve routing Fetches a routing

parameters

Parameters

  • connection (PlacetelAPI.Connection): Connection to server
  • number_or_id (String.t): A number or an ID
  • opts (keyword): Optional parameters

returns

Returns

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

post_routings(connection, routings, opts \\ [])

View Source

Create a routing object Create a routing object. Routing can be created as: forward, group, ivr, queue or api

parameters

Parameters

  • connection (PlacetelAPI.Connection): Connection to server
  • routings (PostRoutings):
  • opts (keyword): Optional parameters

returns

Returns

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

put_routings_number_or_id(connection, number_or_id, routings, opts \\ [])

View Source
@spec put_routings_number_or_id(
  Tesla.Env.client(),
  String.t(),
  PlacetelAPI.Model.PutRoutings.t(),
  keyword()
) :: {:ok, PlacetelAPI.Model.RoutingObject.t()} | {:error, Tesla.Env.t()}

Update routing Updates the routing object. Routing can be set to: forward, group, plan, ivr, queue or api

parameters

Parameters

  • connection (PlacetelAPI.Connection): Connection to server
  • number_or_id (String.t): A number or an ID
  • routings (PutRoutings):
  • opts (keyword): Optional parameters

returns

Returns

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