FortnoxEx.Models.Project (FortnoxEx v0.1.0) View Source
Link to this section Summary
Functions
Creates a project
Deletes a project
Gets a project
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.
Updates a project
Link to this section Functions
Creates a project
Examples
iex> create_project(client, %{"Name" => "ACME") {:ok, %{"ProjectNumber" => "1", "Name" => "ACME"}}
iex> create_project(client, project_attrs)
Deletes a project
Examples
iex> delete_project(client, "1") :ok
iex> delete_project(client, "missing")
Gets a project
Examples
iex> get_project(client, "1")
iex> get_project(clientm "1")
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, [])
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, [])
Updates a project
Examples
iex> update_project(client, "1", %{"Name" => "Johnny"})
iex> update_project(clientm "1", project_attrs)