pub struct EarningType {
pub client: Client,
}
Fields§
§client: Client
Implementations§
Source§impl EarningType
impl EarningType
Sourcepub async fn get_company(
&self,
company_id: &str,
) -> Result<Response<EarningTypeListResponse>, ClientError>
pub async fn get_company( &self, company_id: &str, ) -> Result<Response<EarningTypeListResponse>, ClientError>
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<Response<EarningType>, ClientError>
pub async fn post_company( &self, company_id: &str, body: &PostCompanyEarningTypesRequest, ) -> Result<Response<EarningType>, ClientError>
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<Response<EarningType>, ClientError>
pub async fn put_company_type( &self, company_id: &str, earning_type_uuid: &str, body: &PutCompanyEarningTypeRequest, ) -> Result<Response<EarningType>, ClientError>
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.
Sourcepub async fn delete_company_type(
&self,
company_id: &str,
earning_type_uuid: &str,
) -> Result<Response<()>, ClientError>
pub async fn delete_company_type( &self, company_id: &str, earning_type_uuid: &str, ) -> Result<Response<()>, ClientError>
Deactivate an earning type.
This function performs a DELETE
to the /v1/companies/{company_id}/earning_types/{earning_type_uuid}
endpoint.
Deactivate an earning type.