View Source HipcallSdk (HipcallSdk v0.5.0)

Documentation for HipcallSdk.

Tasks

https://use.hipcall.com.tr/api-docs/#/Task

Summary

Functions

Link to this function

task_create(params, config \\ %Config{})

View Source
@spec task_create(params :: map(), config :: struct()) ::
  {:ok, map()} | {:error, map()} | {:error, any()}

Create a new docs

Examples

iex> task_create_params = [name: "Task 1", description: "Task one description", auto_assign_to_user: true]
iex> HipcallSdk.task_create(task_create_params)
...> {:ok,
...>   %{
...>     "data" => %{
...>       "assign_to_user_id" => nil,
...>       "description" => "Task one description",
...>       "done" => false,
...>       "done_at" => nil,
...>       "due_date" => nil,
...>       "id" => 11440,
...>       "name" => "Task 1",
...>       "priority" => nil
...>     }
...>   }}

Arguments

* `:name` (`t:String.t/0`) - Required. Task name.
  • :description (String.t/0) - Task description.

  • :assign_to_user_id (integer/0) - Assign to user id.

  • :auto_assign_to_user (boolean/0) - Auto assign to user. The default value is false.

  • :company_ids (list of integer/0) - Company ids. The default value is [].

  • :contact_ids (list of integer/0) - Contact ids. The default value is [].

  • :deal_ids (list of integer/0) - Deal ids. The default value is [].

  • :due_date (String.t/0) - Due date.

  • :priority (String.t/0) - Task priority.

  • :task_list_id (integer/0) - Task task_list_id.

Options

  • config :: struct()

Raises

There is no exception.

Returns

| {:error, map()} | {:error, any()}

Link to this function

task_get(id, config \\ %Config{})

View Source
@spec task_get(id :: pos_integer(), config :: struct()) ::
  {:ok, map()} | {:error, map()} | {:error, any()}

Get task

Examples

iex> HipcallSdk.task_get(11184)
{:ok,
%{
  "data" => %{
    "assign_to_user_id" => 826,
    "description" => "Task description",
    "done" => false,
    "done_at" => nil,
    "due_date" => nil,
    "id" => 11184,
    "name" => "Follow up",
    "priority" => "medium"
  }
}}

Arguments

  • id :: pos_integer()
  • config :: struct()

Options

There is no options.

Raises

There is no exceptions.

Returns

  • | {:error, map()} | {:error, any()}

Link to this function

task_list(params, config \\ %Config{})

View Source
@spec task_list(params :: keyword(), config :: struct()) ::
  {:ok, map()} | {:error, map()} | {:error, any()}

Get task list

Examples

iex> task_list_params = [limit: 10, offset: 1, sort: "id.asc"]
iex> HipcallSdk.task_list(task_list_params)

Arguments

  • :limit (integer/0) - Pagination limit. The default value is 10.

  • :offset (integer/0) - Pagination offset. The default value is 1.

  • :q (String.t/0) - Search query.

  • :sort (String.t/0) - Sort options. The default value is "id.asc".

Options

  • config :: struct()

Raises

There is no exception.

Returns

| {:error, map()} | {:error, any()}