/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { EmployeePaymentMethod, EmployeePaymentMethod$inboundSchema, } from "../components/employeepaymentmethod.js"; import { HTTPMetadata, HTTPMetadata$inboundSchema, } from "../components/httpmetadata.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. */ export const GetV1EmployeesEmployeeIdPaymentMethodHeaderXGustoAPIVersion = { TwoThousandAndTwentyFiveMinus06Minus15: "2025-06-15", } as const; /** * Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. */ export type GetV1EmployeesEmployeeIdPaymentMethodHeaderXGustoAPIVersion = ClosedEnum< typeof GetV1EmployeesEmployeeIdPaymentMethodHeaderXGustoAPIVersion >; export type GetV1EmployeesEmployeeIdPaymentMethodRequest = { /** * Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. */ xGustoAPIVersion?: | GetV1EmployeesEmployeeIdPaymentMethodHeaderXGustoAPIVersion | undefined; /** * The UUID of the employee */ employeeId: string; }; export type GetV1EmployeesEmployeeIdPaymentMethodResponse = { httpMeta: HTTPMetadata; /** * Successful */ employeePaymentMethod?: EmployeePaymentMethod | undefined; }; /** @internal */ export const GetV1EmployeesEmployeeIdPaymentMethodHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetV1EmployeesEmployeeIdPaymentMethodHeaderXGustoAPIVersion > = z.nativeEnum(GetV1EmployeesEmployeeIdPaymentMethodHeaderXGustoAPIVersion); /** @internal */ export type GetV1EmployeesEmployeeIdPaymentMethodRequest$Outbound = { "X-Gusto-API-Version": string; employee_id: string; }; /** @internal */ export const GetV1EmployeesEmployeeIdPaymentMethodRequest$outboundSchema: z.ZodType< GetV1EmployeesEmployeeIdPaymentMethodRequest$Outbound, z.ZodTypeDef, GetV1EmployeesEmployeeIdPaymentMethodRequest > = z.object({ xGustoAPIVersion: GetV1EmployeesEmployeeIdPaymentMethodHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), employeeId: z.string(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", employeeId: "employee_id", }); }); export function getV1EmployeesEmployeeIdPaymentMethodRequestToJSON( getV1EmployeesEmployeeIdPaymentMethodRequest: GetV1EmployeesEmployeeIdPaymentMethodRequest, ): string { return JSON.stringify( GetV1EmployeesEmployeeIdPaymentMethodRequest$outboundSchema.parse( getV1EmployeesEmployeeIdPaymentMethodRequest, ), ); } /** @internal */ export const GetV1EmployeesEmployeeIdPaymentMethodResponse$inboundSchema: z.ZodType< GetV1EmployeesEmployeeIdPaymentMethodResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Employee-Payment-Method": EmployeePaymentMethod$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Employee-Payment-Method": "employeePaymentMethod", }); }); export function getV1EmployeesEmployeeIdPaymentMethodResponseFromJSON( jsonString: string, ): SafeParseResult< GetV1EmployeesEmployeeIdPaymentMethodResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetV1EmployeesEmployeeIdPaymentMethodResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetV1EmployeesEmployeeIdPaymentMethodResponse' from JSON`, ); }