/* * 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 { HTTPMetadata, HTTPMetadata$inboundSchema, } from "../components/httpmetadata.js"; import { PayrollReceipt, PayrollReceipt$inboundSchema, } from "../components/payrollreceipt.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 GetV1PaymentReceiptsPayrollsPayrollUuidHeaderXGustoAPIVersion = { 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 GetV1PaymentReceiptsPayrollsPayrollUuidHeaderXGustoAPIVersion = ClosedEnum< typeof GetV1PaymentReceiptsPayrollsPayrollUuidHeaderXGustoAPIVersion >; export type GetV1PaymentReceiptsPayrollsPayrollUuidRequest = { /** * The UUID of the payroll */ payrollUuid: string; /** * 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?: | GetV1PaymentReceiptsPayrollsPayrollUuidHeaderXGustoAPIVersion | undefined; }; export type GetV1PaymentReceiptsPayrollsPayrollUuidResponse = { httpMeta: HTTPMetadata; /** * Successful */ payrollReceipt?: PayrollReceipt | undefined; }; /** @internal */ export const GetV1PaymentReceiptsPayrollsPayrollUuidHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetV1PaymentReceiptsPayrollsPayrollUuidHeaderXGustoAPIVersion > = z.nativeEnum( GetV1PaymentReceiptsPayrollsPayrollUuidHeaderXGustoAPIVersion, ); /** @internal */ export type GetV1PaymentReceiptsPayrollsPayrollUuidRequest$Outbound = { payroll_uuid: string; "X-Gusto-API-Version": string; }; /** @internal */ export const GetV1PaymentReceiptsPayrollsPayrollUuidRequest$outboundSchema: z.ZodType< GetV1PaymentReceiptsPayrollsPayrollUuidRequest$Outbound, z.ZodTypeDef, GetV1PaymentReceiptsPayrollsPayrollUuidRequest > = z.object({ payrollUuid: z.string(), xGustoAPIVersion: GetV1PaymentReceiptsPayrollsPayrollUuidHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), }).transform((v) => { return remap$(v, { payrollUuid: "payroll_uuid", xGustoAPIVersion: "X-Gusto-API-Version", }); }); export function getV1PaymentReceiptsPayrollsPayrollUuidRequestToJSON( getV1PaymentReceiptsPayrollsPayrollUuidRequest: GetV1PaymentReceiptsPayrollsPayrollUuidRequest, ): string { return JSON.stringify( GetV1PaymentReceiptsPayrollsPayrollUuidRequest$outboundSchema.parse( getV1PaymentReceiptsPayrollsPayrollUuidRequest, ), ); } /** @internal */ export const GetV1PaymentReceiptsPayrollsPayrollUuidResponse$inboundSchema: z.ZodType< GetV1PaymentReceiptsPayrollsPayrollUuidResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Payroll-Receipt": PayrollReceipt$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Payroll-Receipt": "payrollReceipt", }); }); export function getV1PaymentReceiptsPayrollsPayrollUuidResponseFromJSON( jsonString: string, ): SafeParseResult< GetV1PaymentReceiptsPayrollsPayrollUuidResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetV1PaymentReceiptsPayrollsPayrollUuidResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetV1PaymentReceiptsPayrollsPayrollUuidResponse' from JSON`, ); }