FortnoxEx.Models.Employee (FortnoxEx v0.1.0) View Source
Link to this section Summary
Functions
Creates a employee
Deletes a employee
Gets a employee
Gets a list of partial employee objects with pagination information.
Streams a partial employee objects. Will go through each page of results with a delay between page. The stream will produce a single employee data object for each hit.
Updates a employee
Link to this section Functions
Creates a employee
Examples
iex> create_employee(client, %{"Name" => "ACME") {:ok, %{"EmployeeNumber" => "1", "Name" => "ACME"}}
iex> create_employee(client, employee_attrs)
Deletes a employee
Examples
iex> delete_employee(client, "1") :ok
iex> delete_employee(client, "missing")
Gets a employee
Examples
iex> get_employee(client, "1")
iex> get_employee(clientm "1")
Gets a list of partial employee objects with pagination information.
Examples
iex> list_employees(client, []) {:ok, %{"@CurrentPage" => 1, "@TotalPages" => 1, "@TotalResources" => 1}, [%{"EmployeeNumber" => "1", "Name" => "ACME"}]}
iex> list_employees(client, [])
Streams a partial employee objects. Will go through each page of results with a delay between page. The stream will produce a single employee data object for each hit.
Examples
iex> stream_employees(client, []) stream_of_employees
iex> stream_employees(client, [])
Updates a employee
Examples
iex> update_employee(client, "1", %{"Name" => "Johnny"})
iex> update_employee(clientm "1", employee_attrs)