Struct gusto_api::benefits::Benefits [−][src]
pub struct Benefits { /* fields omitted */ }
Implementations
Get all benefits supported by Gusto.
This function performs a GET
to the /v1/benefits
endpoint.
Returns all benefits supported by Gusto.
The benefit object in Gusto contains high level information about a particular benefit type and its tax considerations. When companies choose to offer a benefit, they are creating a Company Benefit object associated with a particular benefit.
Get all benefits supported by Gusto.
This function performs a GET
to the /v1/benefits
endpoint.
As opposed to get_benefits
, this function returns all the pages of the request at once.
Returns all benefits supported by Gusto.
The benefit object in Gusto contains high level information about a particular benefit type and its tax considerations. When companies choose to offer a benefit, they are creating a Company Benefit object associated with a particular benefit.
Get a supported benefit by ID.
This function performs a GET
to the /v1/benefits/{benefit_id}
endpoint.
Returns a benefit supported by Gusto.
The benefit object in Gusto contains high level information about a particular benefit type and its tax considerations. When companies choose to offer a benefit, they are creating a Company Benefit object associated with a particular benefit.
Get benefits for a company.
This function performs a GET
to the /v1/companies/{company_id}/company_benefits
endpoint.
Company benefits represent the benefits that a company is offering to employees. This ties together a particular supported benefit with the company-specific information for the offering of that benefit.
Note that company benefits can be deactivated only when no employees are enrolled.
Get benefits for a company.
This function performs a GET
to the /v1/companies/{company_id}/company_benefits
endpoint.
As opposed to get_company_benefits
, this function returns all the pages of the request at once.
Company benefits represent the benefits that a company is offering to employees. This ties together a particular supported benefit with the company-specific information for the offering of that benefit.
Note that company benefits can be deactivated only when no employees are enrolled.
pub async fn post_company_benefit(
&self,
company_id: &str,
body: &PostCompanyBenefitRequest
) -> Result<CompanyBenefit>
pub async fn post_company_benefit(
&self,
company_id: &str,
body: &PostCompanyBenefitRequest
) -> Result<CompanyBenefit>
Create a company benefit.
This function performs a POST
to the /v1/companies/{company_id}/company_benefits
endpoint.
Company benefits represent the benefits that a company is offering to employees. This ties together a particular supported benefit with the company-specific information for the offering of that benefit.
Note that company benefits can be deactivated only when no employees are enrolled.
Get a company benefit.
This function performs a GET
to the /v1/company_benefits/{company_benefit_id}
endpoint.
Company benefits represent the benefits that a company is offering to employees. This ties together a particular supported benefit with the company-specific information for the offering of that benefit.
Note that company benefits can be deactivated only when no employees are enrolled.
pub async fn put_company_benefit(
&self,
company_benefit_id: &str,
body: &PutCompanyBenefitRequest
) -> Result<CompanyBenefit>
pub async fn put_company_benefit(
&self,
company_benefit_id: &str,
body: &PutCompanyBenefitRequest
) -> Result<CompanyBenefit>
Update a company benefit.
This function performs a PUT
to the /v1/company_benefits/{company_benefit_id}
endpoint.
Company benefits represent the benefits that a company is offering to employees. This ties together a particular supported benefit with the company-specific information for the offering of that benefit.
Note that company benefits can be deactivated only when no employees are enrolled.
Get an employee’s benefits.
This function performs a GET
to the /v1/employees/{employee_id}/employee_benefits
endpoint.
Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment.
Returns an array of all employee benefits for this employee
pub async fn get_all_employee_benefits(
&self,
employee_id: &str
) -> Result<Vec<EmployeeBenefit>>
pub async fn get_all_employee_benefits(
&self,
employee_id: &str
) -> Result<Vec<EmployeeBenefit>>
Get an employee’s benefits.
This function performs a GET
to the /v1/employees/{employee_id}/employee_benefits
endpoint.
As opposed to get_employee_benefits
, this function returns all the pages of the request at once.
Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment.
Returns an array of all employee benefits for this employee
pub async fn post_employee_benefit(
&self,
employee_id: &str,
body: &PostEmployeeBenefitRequest
) -> Result<EmployeeBenefit>
pub async fn post_employee_benefit(
&self,
employee_id: &str,
body: &PostEmployeeBenefitRequest
) -> Result<EmployeeBenefit>
Create an employee benefit.
This function performs a POST
to the /v1/employees/{employee_id}/employee_benefits
endpoint.
Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment.
pub async fn post_employee_ytd_benefit_amounts_from_different_company(
&self,
employee_id: &str,
body: &PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequest
) -> Result<()>
pub async fn post_employee_ytd_benefit_amounts_from_different_company(
&self,
employee_id: &str,
body: &PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequest
) -> Result<()>
Year-to-date Benefit Amounts from Different Company.
This function performs a POST
to the /v1/employees/{employee_id}/ytd_benefit_amounts_from_different_company
endpoint.
Year-to-date benefit amounts from a different company represents the amount of money added to an employees plan during a current year, made outside of the current contribution when they were employed at a different company.
pub async fn get_employee_benefit(
&self,
employee_benefit_id: &str
) -> Result<EmployeeBenefit>
pub async fn get_employee_benefit(
&self,
employee_benefit_id: &str
) -> Result<EmployeeBenefit>
Get an employee benefit.
This function performs a GET
to the /v1/employee_benefits/{employee_benefit_id}
endpoint.
Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment.
pub async fn put_employee_benefit(
&self,
employee_benefit_id: &str,
body: &PutEmployeeBenefitRequest
) -> Result<EmployeeBenefit>
pub async fn put_employee_benefit(
&self,
employee_benefit_id: &str,
body: &PutEmployeeBenefitRequest
) -> Result<EmployeeBenefit>
Update an employee benefit.
This function performs a PUT
to the /v1/employee_benefits/{employee_benefit_id}
endpoint.
Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment.
Delete an employee benefit.
This function performs a DELETE
to the /v1/employee_benefits/{employee_benefit_id}
endpoint.
Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment.