Struct gusto_api::employees::Employees [−][src]
pub struct Employees { /* fields omitted */ }
Implementations
Get an employee.
This function performs a GET
to the /v1/employees/{employee_id_or_uuid}
endpoint.
Get an employee.
Parameters:
include: &[String]
– Include the requested attribute(s) in each employee response.
pub async fn put_employees(
&self,
employee_id_or_uuid: &str,
body: &PutEmployeesRequest
) -> Result<Employee>
pub async fn put_employees(
&self,
employee_id_or_uuid: &str,
body: &PutEmployeesRequest
) -> Result<Employee>
Update an employee.
This function performs a PUT
to the /v1/employees/{employee_id_or_uuid}
endpoint.
Update an employee.
Get employees of a company.
This function performs a GET
to the /v1/companies/{company_id_or_uuid}/employees
endpoint.
Get all of the employees, onboarding, active and terminated, for a given company.
Parameters:
terminated: bool
– Filters employees by the provided boolean.page: f64
– The page that is requested. When unspecified, will load all employees.per: f64
– Number of employees per page. When unspecified, will default to 25.include: &[String]
– Include the requested attribute(s) in each employee response.
Get employees of a company.
This function performs a GET
to the /v1/companies/{company_id_or_uuid}/employees
endpoint.
As opposed to get_company_employees
, this function returns all the pages of the request at once.
Get all of the employees, onboarding, active and terminated, for a given company.
pub async fn post_employee(
&self,
company_id_or_uuid: &str,
body: &PostEmployeeRequest
) -> Result<Employee>
pub async fn post_employee(
&self,
company_id_or_uuid: &str,
body: &PostEmployeeRequest
) -> Result<Employee>
Create an employee.
This function performs a POST
to the /v1/companies/{company_id_or_uuid}/employees
endpoint.
Create an employee.
Get an employee’s home address.
This function performs a GET
to the /v1/employees/{employee_id}/home_address
endpoint.
The home address of an employee is used to determine certain tax information about them. Addresses are geocoded on create and update to ensure validity.
pub async fn put_employee_home_address(
&self,
employee_id: &str,
body: &PutEmployeeHomeAddressRequest
) -> Result<Location>
pub async fn put_employee_home_address(
&self,
employee_id: &str,
body: &PutEmployeeHomeAddressRequest
) -> Result<Location>
Update an employee’s home address.
This function performs a PUT
to the /v1/employees/{employee_id}/home_address
endpoint.
The home address of an employee is used to determine certain tax information about them. Addresses are geocoded on create and update to ensure validity.