/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { employeePaymentMethodCreate } from "../funcs/employeePaymentMethodCreate.js"; import { employeePaymentMethodDeleteBankAccount } from "../funcs/employeePaymentMethodDeleteBankAccount.js"; import { employeePaymentMethodGet } from "../funcs/employeePaymentMethodGet.js"; import { employeePaymentMethodUpdate } from "../funcs/employeePaymentMethodUpdate.js"; import { employeePaymentMethodUpdateBankAccount } from "../funcs/employeePaymentMethodUpdateBankAccount.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { DeleteV1EmployeesEmployeeIdBankAccountsBankAccountIdRequest, DeleteV1EmployeesEmployeeIdBankAccountsBankAccountIdResponse, } from "../models/operations/deletev1employeesemployeeidbankaccountsbankaccountid.js"; import { GetV1EmployeesEmployeeIdPaymentMethodRequest, GetV1EmployeesEmployeeIdPaymentMethodResponse, } from "../models/operations/getv1employeesemployeeidpaymentmethod.js"; import { PostV1EmployeesEmployeeIdBankAccountsRequest, PostV1EmployeesEmployeeIdBankAccountsResponse, } from "../models/operations/postv1employeesemployeeidbankaccounts.js"; import { PutV1EmployeesEmployeeIdBankAccountsRequest, PutV1EmployeesEmployeeIdBankAccountsResponse, } from "../models/operations/putv1employeesemployeeidbankaccounts.js"; import { PutV1EmployeesEmployeeIdPaymentMethodRequest, PutV1EmployeesEmployeeIdPaymentMethodResponse, } from "../models/operations/putv1employeesemployeeidpaymentmethod.js"; import { unwrapAsync } from "../types/fp.js"; export class EmployeePaymentMethod extends ClientSDK { /** * Create an employee bank account * * @remarks * Creates an employee bank account. An employee can have multiple bank accounts. Note that creating an employee bank account will also update the employee's payment method. * * scope: `employee_payment_methods:write` */ async create( request: PostV1EmployeesEmployeeIdBankAccountsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(employeePaymentMethodCreate( this, request, options, )); } /** * Update an employee bank account * * @remarks * Updates an employee bank account. * * scope: `employee_payment_methods:write` */ async updateBankAccount( request: PutV1EmployeesEmployeeIdBankAccountsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(employeePaymentMethodUpdateBankAccount( this, request, options, )); } /** * Delete an employee bank account * * @remarks * Deletes an employee bank account. To update an employee's bank account details, delete the bank account first and create a new one. * * scope: `employee_payment_methods:write` */ async deleteBankAccount( request: DeleteV1EmployeesEmployeeIdBankAccountsBankAccountIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(employeePaymentMethodDeleteBankAccount( this, request, options, )); } /** * Get payment method for an employee * * @remarks * Returns the payment method for an employee (e.g. Check or Direct Deposit with split configuration). * * scope: `employee_payment_methods:read` */ async get( request: GetV1EmployeesEmployeeIdPaymentMethodRequest, options?: RequestOptions, ): Promise { return unwrapAsync(employeePaymentMethodGet( this, request, options, )); } /** * Update payment method for an employee * * @remarks * Updates the payment method for an employee. Can set to Check or Direct Deposit with split configuration. * * scope: `employee_payment_methods:write` */ async update( request: PutV1EmployeesEmployeeIdPaymentMethodRequest, options?: RequestOptions, ): Promise { return unwrapAsync(employeePaymentMethodUpdate( this, request, options, )); } }