FortnoxEx.Models.Project (FortnoxEx v0.1.0) View Source

Link to this section Summary

Functions

Gets a list of partial project objects with pagination information.

Streams a partial project objects. Will go through each page of results with a delay between page. The stream will produce a single project data object for each hit.

Link to this section Functions

Link to this function

create_project(client, project_data)

View Source

Creates a project

Examples

iex> create_project(client, %{"Name" => "ACME") {:ok, %{"ProjectNumber" => "1", "Name" => "ACME"}}

iex> create_project(client, project_attrs)

Link to this function

delete_project(client, project_number)

View Source

Deletes a project

Examples

iex> delete_project(client, "1") :ok

iex> delete_project(client, "missing")

Link to this function

get_project(client, project_number)

View Source

Gets a project

Examples

iex> get_project(client, "1")

iex> get_project(clientm "1")

Link to this function

list_projects(client, query)

View Source

Gets a list of partial project objects with pagination information.

Examples

iex> list_projects(client, []) {:ok, %{"@CurrentPage" => 1, "@TotalPages" => 1, "@TotalResources" => 1}, [%{"ProjectNumber" => "1", "Name" => "ACME"}]}

iex> list_projects(client, [])

Link to this function

stream_projects(client, query)

View Source

Streams a partial project objects. Will go through each page of results with a delay between page. The stream will produce a single project data object for each hit.

Examples

iex> stream_projects(client, []) stream_of_projects

iex> stream_projects(client, [])

Link to this function

update_project(client, project_number, project_data)

View Source

Updates a project

Examples

iex> update_project(client, "1", %{"Name" => "Johnny"})

iex> update_project(clientm "1", project_attrs)