- deleteV1JobsJobId - Delete an individual job
- getV1CompensationsCompensationId - Get a compensation
- getV1EmployeesEmployeeIdJobs - Get jobs for an employee
- getV1JobsJobId - Get a job
- getV1JobsJobIdCompensations - Get compensations for a job
- postV1JobsJobId - Create a job
- putV1CompensationsCompensationId - Update a compensation
- putV1JobsJobId - Update a job
Deletes a specific job that an employee holds.
scope: jobs:write
import { Gusto } from "@speakeasy-sdks/gusto";
import { DeleteV1JobsJobIdRequest, DeleteV1JobsJobIdResponse } from "@speakeasy-sdks/gusto/dist/sdk/models/operations";
const sdk = new Gusto({
security: {
authorization: "",
},
});
const jobId: string = "dolorum";
sdk.jobsAndCompensations.deleteV1JobsJobId(jobId).then((res: DeleteV1JobsJobIdResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
jobId |
string | ✔️ | The UUID of the job |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.DeleteV1JobsJobIdResponse>
Compensations contain information on how much is paid out for a job. Jobs may have many compensations, but only one that is active. The current compensation is the one with the most recent effective_date
.
Note: Currently, jobs are arbitrarily limited to a single compensation as multiple compensations per job are not yet available in Gusto. The API is architected as if multiple compensations may exist, so integrations should integrate under the same assumption. The only exception is that creating a compensation with the same job_uuid
as another will fail with a relevant error.
scope: jobs:read
import { Gusto } from "@speakeasy-sdks/gusto";
import {
GetV1CompensationsCompensationIdRequest,
GetV1CompensationsCompensationIdResponse,
} from "@speakeasy-sdks/gusto/dist/sdk/models/operations";
const sdk = new Gusto({
security: {
authorization: "",
},
});
const compensationId: string = "adipisci";
sdk.jobsAndCompensations.getV1CompensationsCompensationId(compensationId).then((res: GetV1CompensationsCompensationIdResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
compensationId |
string | ✔️ | The UUID of the compensation |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetV1CompensationsCompensationIdResponse>
Get all of the jobs that an employee holds.
scope: jobs:read
import { Gusto } from "@speakeasy-sdks/gusto";
import {
GetV1EmployeesEmployeeIdJobsInclude,
GetV1EmployeesEmployeeIdJobsRequest,
GetV1EmployeesEmployeeIdJobsResponse,
} from "@speakeasy-sdks/gusto/dist/sdk/models/operations";
const sdk = new Gusto({
security: {
authorization: "",
},
});
const employeeId: string = "minus";
const include: GetV1EmployeesEmployeeIdJobsInclude = GetV1EmployeesEmployeeIdJobsInclude.AllCompensations;
const page: number = 1718.53;
const per: number = 5039.34;
sdk.jobsAndCompensations.getV1EmployeesEmployeeIdJobs(employeeId, include, page, per).then((res: GetV1EmployeesEmployeeIdJobsResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
employeeId |
string | ✔️ | The UUID of the employee |
include |
operations.GetV1EmployeesEmployeeIdJobsInclude | ➖ | Available options: - all_compensations: Include all effective dated compensations for each job instead of only the current compensation |
page |
number | ➖ | The page that is requested. When unspecified, will load all objects. |
per |
number | ➖ | Number of objects per page. When unspecified, will default to 25 |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetV1EmployeesEmployeeIdJobsResponse>
Get a job.
scope: jobs:read
import { Gusto } from "@speakeasy-sdks/gusto";
import { GetV1JobsJobIdInclude, GetV1JobsJobIdRequest, GetV1JobsJobIdResponse } from "@speakeasy-sdks/gusto/dist/sdk/models/operations";
const sdk = new Gusto({
security: {
authorization: "",
},
});
const jobId: string = "in";
const include: GetV1JobsJobIdInclude = GetV1JobsJobIdInclude.AllCompensations;
sdk.jobsAndCompensations.getV1JobsJobId(jobId, include).then((res: GetV1JobsJobIdResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
jobId |
string | ✔️ | The UUID of the job |
include |
operations.GetV1JobsJobIdInclude | ➖ | Available options: - all_compensations: Include all effective dated compensations for the job instead of only the current compensation |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetV1JobsJobIdResponse>
Compensations contain information on how much is paid out for a job. Jobs may have many compensations, but only one that is active. The current compensation is the one with the most recent effective_date
. By default the API returns only the current compensation - see the include
query parameter for retrieving all compensations.
Note: Currently the API does not support creating multiple compensations per job - creating a compensation with the same job_uuid
as another will fail with a relevant error.
Use flsa_status
to determine if an employee is eligible for overtime.
scope: jobs:read
import { Gusto } from "@speakeasy-sdks/gusto";
import {
GetV1JobsJobIdCompensationsInclude,
GetV1JobsJobIdCompensationsRequest,
GetV1JobsJobIdCompensationsResponse,
} from "@speakeasy-sdks/gusto/dist/sdk/models/operations";
const sdk = new Gusto({
security: {
authorization: "",
},
});
const jobId: string = "dolore";
const include: GetV1JobsJobIdCompensationsInclude = GetV1JobsJobIdCompensationsInclude.AllCompensations;
const page: number = 3044.68;
const per: number = 8859.63;
sdk.jobsAndCompensations.getV1JobsJobIdCompensations(jobId, include, page, per).then((res: GetV1JobsJobIdCompensationsResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
jobId |
string | ✔️ | The UUID of the job |
include |
operations.GetV1JobsJobIdCompensationsInclude | ➖ | Available options: - all_compensations: Include all effective dated compensations for each job instead of only the current compensation |
page |
number | ➖ | The page that is requested. When unspecified, will load all objects. |
per |
number | ➖ | Number of objects per page. When unspecified, will default to 25 |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetV1JobsJobIdCompensationsResponse>
Create a job.
scope: jobs:write
import { Gusto } from "@speakeasy-sdks/gusto";
import { PostV1JobsJobIdRequest, PostV1JobsJobIdRequestBody, PostV1JobsJobIdResponse } from "@speakeasy-sdks/gusto/dist/sdk/models/operations";
const sdk = new Gusto({
security: {
authorization: "",
},
});
const employeeId: string = "temporibus";
const requestBody: PostV1JobsJobIdRequestBody = {
hireDate: "ullam",
locationUuid: "adipisci",
title: "Miss",
};
sdk.jobsAndCompensations.postV1JobsJobId(employeeId, requestBody).then((res: PostV1JobsJobIdResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
employeeId |
string | ✔️ | The UUID of the employee |
requestBody |
operations.PostV1JobsJobIdRequestBody | ➖ | Create a job. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.PostV1JobsJobIdResponse>
Compensations contain information on how much is paid out for a job. Jobs may have many compensations, but only one that is active. The current compensation is the one with the most recent effective_date
.
Note: Currently, jobs are arbitrarily limited to a single compensation as multiple compensations per job are not yet available in Gusto. The API is architected as if multiple compensations may exist, so integrations should integrate under the same assumption. The only exception is that creating a compensation with the same job_uuid
as another will fail with a relevant error
scope: jobs:write
import { Gusto } from "@speakeasy-sdks/gusto";
import {
PutV1CompensationsCompensationIdRequest,
PutV1CompensationsCompensationIdRequestBody,
PutV1CompensationsCompensationIdRequestBodyFlsaStatus,
PutV1CompensationsCompensationIdRequestBodyMinimumWages,
PutV1CompensationsCompensationIdRequestBodyPaymentUnit,
PutV1CompensationsCompensationIdResponse,
} from "@speakeasy-sdks/gusto/dist/sdk/models/operations";
const sdk = new Gusto({
security: {
authorization: "",
},
});
const compensationId: string = "blanditiis";
const requestBody: PutV1CompensationsCompensationIdRequestBody = {
adjustForMinimumWage: false,
flsaStatus: PutV1CompensationsCompensationIdRequestBodyFlsaStatus.CommissionOnlyExempt,
minimumWages: [
{
uuid: "3a8d8f5c-0b2f-42fb-bb19-4a276b26916f",
},
{
uuid: "e1f08f42-94e3-4698-b447-f603e8b445e8",
},
{
uuid: "0ca55efd-20e4-457e-9858-b6a89fbe3a5a",
},
{
uuid: "a8e4824d-0ab4-4075-888e-51862065e904",
},
],
paymentUnit: PutV1CompensationsCompensationIdRequestBodyPaymentUnit.Paycheck,
rate: "dolorem",
version: "harum",
};
sdk.jobsAndCompensations.putV1CompensationsCompensationId(compensationId, requestBody).then((res: PutV1CompensationsCompensationIdResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
compensationId |
string | ✔️ | The UUID of the compensation |
requestBody |
operations.PutV1CompensationsCompensationIdRequestBody | ➖ | N/A |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.PutV1CompensationsCompensationIdResponse>
Update a job.
scope: jobs:write
import { Gusto } from "@speakeasy-sdks/gusto";
import { PutV1JobsJobIdRequest, PutV1JobsJobIdRequestBody, PutV1JobsJobIdResponse } from "@speakeasy-sdks/gusto/dist/sdk/models/operations";
const sdk = new Gusto({
security: {
authorization: "",
},
});
const jobId: string = "dicta";
const requestBody: PutV1JobsJobIdRequestBody = {
hireDate: "architecto",
locationUuid: "occaecati",
title: "Mrs.",
version: "quidem",
};
sdk.jobsAndCompensations.putV1JobsJobId(jobId, requestBody).then((res: PutV1JobsJobIdResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
jobId |
string | ✔️ | The UUID of the job |
requestBody |
operations.PutV1JobsJobIdRequestBody | ➖ | Update a job. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.PutV1JobsJobIdResponse>