/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { garnishmentsCreate } from "../funcs/garnishmentsCreate.js"; import { garnishmentsGet } from "../funcs/garnishmentsGet.js"; import { garnishmentsGetChildSupportData } from "../funcs/garnishmentsGetChildSupportData.js"; import { garnishmentsList } from "../funcs/garnishmentsList.js"; import { garnishmentsUpdate } from "../funcs/garnishmentsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { GetV1EmployeesEmployeeIdGarnishmentsRequest, GetV1EmployeesEmployeeIdGarnishmentsResponse, } from "../models/operations/getv1employeesemployeeidgarnishments.js"; import { GetV1GarnishmentsChildSupportRequest, GetV1GarnishmentsChildSupportResponse, } from "../models/operations/getv1garnishmentschildsupport.js"; import { GetV1GarnishmentsGarnishmentIdRequest, GetV1GarnishmentsGarnishmentIdResponse, } from "../models/operations/getv1garnishmentsgarnishmentid.js"; import { PostV1EmployeesEmployeeIdGarnishmentsRequest, PostV1EmployeesEmployeeIdGarnishmentsResponse, } from "../models/operations/postv1employeesemployeeidgarnishments.js"; import { PutV1GarnishmentsGarnishmentIdRequest, PutV1GarnishmentsGarnishmentIdResponse, } from "../models/operations/putv1garnishmentsgarnishmentid.js"; import { unwrapAsync } from "../types/fp.js"; export class Garnishments extends ClientSDK { /** * Get garnishments for an employee * * @remarks * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments. * * scope: `garnishments:read` */ async list( request: GetV1EmployeesEmployeeIdGarnishmentsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(garnishmentsList( this, request, options, )); } /** * Create a garnishment * * @remarks * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments. * * scope: `garnishments:write` */ async create( request: PostV1EmployeesEmployeeIdGarnishmentsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(garnishmentsCreate( this, request, options, )); } /** * Get a garnishment * * @remarks * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments. * * scope: `garnishments:read` */ async get( request: GetV1GarnishmentsGarnishmentIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(garnishmentsGet( this, request, options, )); } /** * Update a garnishment * * @remarks * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments. * * scope: `garnishments:write` */ async update( request: PutV1GarnishmentsGarnishmentIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(garnishmentsUpdate( this, request, options, )); } /** * Get child support garnishment data * * @remarks * Agency data and requirements to be used for creating child support garnishments * * scope: `garnishments:read` */ async getChildSupportData( request: GetV1GarnishmentsChildSupportRequest, options?: RequestOptions, ): Promise { return unwrapAsync(garnishmentsGetChildSupportData( this, request, options, )); } }