Struct gusto_api::contractor_payments::ContractorPayments [−][src]
pub struct ContractorPayments { /* fields omitted */ }
Implementations
pub async fn get_company_contractor_payments(
&self,
company_id: &str,
start_date: &str,
end_date: &str
) -> Result<ContractorPaymentSummary>
pub async fn get_company_contractor_payments(
&self,
company_id: &str,
start_date: &str,
end_date: &str
) -> Result<ContractorPaymentSummary>
Get contractor payments for a company.
This function performs a GET
to the /v1/companies/{company_id}/contractor_payments
endpoint.
Returns an object containing individual contractor payments, within a given time period, including totals.
Parameters:
start_date: &str
– The time period for which to retrieve contractor payments.end_date: &str
– The time period for which to retrieve contractor payments.
Create a contractor payment (Beta).
This function performs a POST
to the /v1/companies/{company_id}/contractor_payments
endpoint.
Returns an object containing individual contractor payments, within a given time period, including totals.
This endpoint is in beta and intended for Gusto Embedded Payroll customers. Please apply for early access if you’d like to learn more and use it for production. Note, this endpoint will require you to enter a different agreement with Gusto.
Parameters:
date: &str
– The payment date.contractor_id: f64
– The contractor receiving the payment.wage: f64
– If the contractor is on a fixed wage, this is the fixed wage payment for the contractor, regardless of hours worked.hours: f64
– If the contractor is on an hourly wage, this is the number of hours that the contractor worked for the payment.bonus: f64
– If the contractor is on an hourly wage, this is the bonus the contractor earned.reimbursement: f64
– Reimbursed wages for the contractor.
pub async fn get_company_contractor_payment(
&self,
company_id: &str,
contractor_payment_id_or_uuid: &str
) -> Result<ContractorPayment>
pub async fn get_company_contractor_payment(
&self,
company_id: &str,
contractor_payment_id_or_uuid: &str
) -> Result<ContractorPayment>
Get a single contractor payment.
This function performs a GET
to the /v1/companies/{company_id}/contractor_payments/{contractor_payment_id_or_uuid}
endpoint.
Returns a single contractor payments
Cancel a contractor payment (Beta).
This function performs a DELETE
to the /v1/companies/{company_id}/contractor_payments/{contractor_payment_id_or_uuid}
endpoint.
Cancels and deletes a contractor payment. If the contractor payment has already started processing, the payment cannot be cancelled.
This endpoint is in beta and intended for Gusto Embedded Payroll customers. Please apply for early access if you’d like to learn more and use it for production. Note, this endpoint will require you to enter a different agreement with Gusto.