Struct gusto_api::terminations::Terminations
source · pub struct Terminations {
pub client: Client,
}Fields
client: ClientImplementations
sourceimpl Terminations
impl Terminations
sourcepub async fn get_employee(&self, employee_id: &str) -> Result<Vec<Termination>>
pub async fn get_employee(&self, employee_id: &str) -> Result<Vec<Termination>>
Get terminations for an employee.
This function performs a GET to the /v1/employees/{employee_id}/terminations endpoint.
Terminations are created whenever an employee is scheduled to leave the company. The only things required are an effective date (their last day of work) and whether they should receive their wages in a one-off termination payroll or with the rest of the company.
Note that some states require employees to receive their final wages within 24 hours (unless they consent otherwise,) in which case running a one-off payroll may be the only option.
sourcepub async fn get_all_employee(
&self,
employee_id: &str
) -> Result<Vec<Termination>>
pub async fn get_all_employee(
&self,
employee_id: &str
) -> Result<Vec<Termination>>
Get terminations for an employee.
This function performs a GET to the /v1/employees/{employee_id}/terminations endpoint.
As opposed to get_employee, this function returns all the pages of the request at once.
Terminations are created whenever an employee is scheduled to leave the company. The only things required are an effective date (their last day of work) and whether they should receive their wages in a one-off termination payroll or with the rest of the company.
Note that some states require employees to receive their final wages within 24 hours (unless they consent otherwise,) in which case running a one-off payroll may be the only option.
sourcepub async fn post_employee(
&self,
employee_id: &str,
body: &PostEmployeeTerminationsRequest
) -> Result<Termination>
pub async fn post_employee(
&self,
employee_id: &str,
body: &PostEmployeeTerminationsRequest
) -> Result<Termination>
Create an employee termination.
This function performs a POST to the /v1/employees/{employee_id}/terminations endpoint.
Terminations are created whenever an employee is scheduled to leave the company. The only things required are an effective date (their last day of work) and whether they should receive their wages in a one-off termination payroll or with the rest of the company.
Note that some states require employees to receive their final wages within 24 hours (unless they consent otherwise,) in which case running a one-off payroll may be the only option.