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

API calls for all endpoints tagged RoutingPlans.

Link to this section Summary

Functions

Delete a routing plan Delete a routing plan

Get all routing plans Provides a list of routing plans

Get a routing plan Get a routing plans

Simulate the usage of a routing plan Simulate the usage of a routing plan

Create a routing plan Create a routing plan

Update a routing plan Update a routing plan

Link to this section Functions

Link to this function

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

View Source
@spec delete_routing_plans_id(Tesla.Env.client(), integer(), keyword()) ::
  {:ok, PlacetelAPI.Model.RoutingPlan.t()} | {:error, Tesla.Env.t()}

Delete a routing plan Delete a routing plan

parameters

Parameters

  • connection (PlacetelAPI.Connection): Connection to server
  • id (integer()):
  • opts (keyword): Optional parameters

returns

Returns

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

get_routing_plans(connection, opts \\ [])

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

Get all routing plans Provides a list of routing plans

parameters

Parameters

  • connection (PlacetelAPI.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :page (integer()): Page of results to fetch.
    • :per_page (integer()): Number of results to return per page.

returns

Returns

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

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

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

Get a routing plan Get a routing plans

parameters

Parameters

  • connection (PlacetelAPI.Connection): Connection to server
  • id (String.t): ID of a routing plan
  • opts (keyword): Optional parameters

returns

Returns

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

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

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

Simulate the usage of a routing plan Simulate the usage of a routing plan

parameters

Parameters

  • connection (PlacetelAPI.Connection): Connection to server
  • id (String.t): The ID of the routing plan
  • opts (keyword): Optional parameters
    • :time (DateTime.t): The time at which the simulated call would happen

returns

Returns

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

post_routing_plans(connection, routing_plans, opts \\ [])

View Source
@spec post_routing_plans(
  Tesla.Env.client(),
  PlacetelAPI.Model.PostRoutingPlans.t(),
  keyword()
) ::
  {:ok, PlacetelAPI.Model.RoutingPlan.t()} | {:error, Tesla.Env.t()}

Create a routing plan Create a routing plan

parameters

Parameters

  • connection (PlacetelAPI.Connection): Connection to server
  • routing_plans (PostRoutingPlans):
  • opts (keyword): Optional parameters

returns

Returns

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

put_routing_plans_id(connection, id, routing_plans, opts \\ [])

View Source
@spec put_routing_plans_id(
  Tesla.Env.client(),
  integer(),
  PlacetelAPI.Model.PutRoutingPlans.t(),
  keyword()
) :: {:ok, PlacetelAPI.Model.RoutingPlan.t()} | {:error, Tesla.Env.t()}

Update a routing plan Update a routing plan

parameters

Parameters

  • connection (PlacetelAPI.Connection): Connection to server
  • id (integer()):
  • routing_plans (PutRoutingPlans):
  • opts (keyword): Optional parameters

returns

Returns

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