pub struct Compensations {
pub client: Client,
}
Fields§
§client: Client
Implementations§
Source§impl Compensations
impl Compensations
Sourcepub async fn get(
&self,
compensation_id: &str,
) -> Result<Response<Compensation>, ClientError>
pub async fn get( &self, compensation_id: &str, ) -> Result<Response<Compensation>, ClientError>
Get a compensation.
This function performs a GET
to the /v1/compensations/{compensation_id}
endpoint.
Compensations contain information on how much is paid out for a job. Jobs may have many compensations, but only one that is active. The current compensation is the one with the most recent effective_date
.
Note: Currently, jobs are arbitrarily limited to a single compensation as multiple compensations per job are not yet available in Gusto. The API is architected as if multiple compensations may exist, so integrations should integrate under the same assumption. The only exception is that creating a compensation with the same job_id
as another will fail with a relevant error.
Sourcepub async fn put(
&self,
compensation_id: &str,
body: &PutCompensationRequest,
) -> Result<Response<Compensation>, ClientError>
pub async fn put( &self, compensation_id: &str, body: &PutCompensationRequest, ) -> Result<Response<Compensation>, ClientError>
Update a compensation.
This function performs a PUT
to the /v1/compensations/{compensation_id}
endpoint.
Compensations contain information on how much is paid out for a job. Jobs may have many compensations, but only one that is active. The current compensation is the one with the most recent effective_date
.
Note: Currently, jobs are arbitrarily limited to a single compensation as multiple compensations per job are not yet available in Gusto. The API is architected as if multiple compensations may exist, so integrations should integrate under the same assumption. The only exception is that creating a compensation with the same job_id
as another will fail with a relevant error
Sourcepub async fn get_job(
&self,
job_id: &str,
) -> Result<Response<Vec<Compensation>>, ClientError>
pub async fn get_job( &self, job_id: &str, ) -> Result<Response<Vec<Compensation>>, ClientError>
Get compensations for a job.
This function performs a GET
to the /v1/jobs/{job_id}/compensations
endpoint.
Compensations contain information on how much is paid out for a job. Jobs may have many compensations, but only one that is active. The current compensation is the one with the most recent effective_date
.
Note: Currently, jobs are arbitrarily limited to a single compensation as multiple compensations per job are not yet available in Gusto. The API is architected as if multiple compensations may exist, so integrations should integrate under the same assumption. The only exception is that creating a compensation with the same job_id
as another will fail with a relevant error.
Use the flsa_status
to determine if an employee is elibgle for overtime.
Sourcepub async fn get_all_job(
&self,
job_id: &str,
) -> Result<Response<Vec<Compensation>>, ClientError>
pub async fn get_all_job( &self, job_id: &str, ) -> Result<Response<Vec<Compensation>>, ClientError>
Get compensations for a job.
This function performs a GET
to the /v1/jobs/{job_id}/compensations
endpoint.
As opposed to get_job
, this function returns all the pages of the request at once.
Compensations contain information on how much is paid out for a job. Jobs may have many compensations, but only one that is active. The current compensation is the one with the most recent effective_date
.
Note: Currently, jobs are arbitrarily limited to a single compensation as multiple compensations per job are not yet available in Gusto. The API is architected as if multiple compensations may exist, so integrations should integrate under the same assumption. The only exception is that creating a compensation with the same job_id
as another will fail with a relevant error.
Use the flsa_status
to determine if an employee is elibgle for overtime.