Struct gusto_api::earning_type::EarningType
source · pub struct EarningType {
pub client: Client,
}Fields
client: ClientImplementations
sourceimpl EarningType
impl EarningType
sourcepub async fn get_company(
&self,
company_id: &str
) -> Result<EarningTypeListResponse>
pub async fn get_company(
&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.
sourcepub async fn post_company(
&self,
company_id: &str,
body: &PostCompanyEarningTypesRequest
) -> Result<EarningType>
pub async fn post_company(
&self,
company_id: &str,
body: &PostCompanyEarningTypesRequest
) -> 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.
sourcepub async fn put_company_type(
&self,
company_id: &str,
earning_type_uuid: &str,
body: &PutCompanyEarningTypeRequest
) -> Result<EarningType>
pub async fn put_company_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.