Struct gusto_api::earning_type::EarningType [−][src]
pub struct EarningType { /* fields omitted */ }
Implementations
pub async fn get_company_earning_types(
&self,
company_id: &str
) -> Result<EarningTypeListResponse>
pub async fn get_company_earning_types(
&self,
company_id: &str
) -> Result<EarningTypeListResponse>
Get all earning types for a company.
This function performs a GET
to the /v1/companies/{company_id}/earning_types
endpoint.
A payroll item in Gusto is associated to an earning type to name the type of earning described by the payroll item.
Default Earning Type
Certain earning types are special because they have tax considerations. Those earning types are mostly the same for every company depending on its legal structure (LLC, Corporation, etc.)
Custom Earning Type
Custom earning types are all the other earning types added specifically for a company.
pub async fn post_company_earning_type(
&self,
company_id: &str,
body: &PostCompanyEarningTypeRequest
) -> Result<EarningType>
pub async fn post_company_earning_type(
&self,
company_id: &str,
body: &PostCompanyEarningTypeRequest
) -> Result<EarningType>
Create a custom earning type.
This function performs a POST
to the /v1/companies/{company_id}/earning_types
endpoint.
Create a custom earning type.
If an inactive earning type exists with the same name, this will reactivate it instead of creating a new one.
pub async fn put_company_earning_type(
&self,
company_id: &str,
earning_type_uuid: &str,
body: &PutCompanyEarningTypeRequest
) -> Result<EarningType>
pub async fn put_company_earning_type(
&self,
company_id: &str,
earning_type_uuid: &str,
body: &PutCompanyEarningTypeRequest
) -> Result<EarningType>
Update an earning type.
This function performs a PUT
to the /v1/companies/{company_id}/earning_types/{earning_type_uuid}
endpoint.
Update an earning type.