/* * 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 { ContractorPayment, ContractorPayment$inboundSchema, } from "../components/contractorpayment.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 GetV1ContractorPaymentsContractorPaymentUuidFundHeaderXGustoAPIVersion = { 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 GetV1ContractorPaymentsContractorPaymentUuidFundHeaderXGustoAPIVersion = ClosedEnum< typeof GetV1ContractorPaymentsContractorPaymentUuidFundHeaderXGustoAPIVersion >; export type GetV1ContractorPaymentsContractorPaymentUuidFundRequest = { /** * 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?: | GetV1ContractorPaymentsContractorPaymentUuidFundHeaderXGustoAPIVersion | undefined; /** * The UUID of the contractor payment */ contractorPaymentUuid: string; }; export type GetV1ContractorPaymentsContractorPaymentUuidFundResponse = { httpMeta: HTTPMetadata; /** * OK */ contractorPayment?: ContractorPayment | undefined; }; /** @internal */ export const GetV1ContractorPaymentsContractorPaymentUuidFundHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetV1ContractorPaymentsContractorPaymentUuidFundHeaderXGustoAPIVersion > = z.nativeEnum( GetV1ContractorPaymentsContractorPaymentUuidFundHeaderXGustoAPIVersion, ); /** @internal */ export type GetV1ContractorPaymentsContractorPaymentUuidFundRequest$Outbound = { "X-Gusto-API-Version": string; contractor_payment_uuid: string; }; /** @internal */ export const GetV1ContractorPaymentsContractorPaymentUuidFundRequest$outboundSchema: z.ZodType< GetV1ContractorPaymentsContractorPaymentUuidFundRequest$Outbound, z.ZodTypeDef, GetV1ContractorPaymentsContractorPaymentUuidFundRequest > = z.object({ xGustoAPIVersion: GetV1ContractorPaymentsContractorPaymentUuidFundHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), contractorPaymentUuid: z.string(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", contractorPaymentUuid: "contractor_payment_uuid", }); }); export function getV1ContractorPaymentsContractorPaymentUuidFundRequestToJSON( getV1ContractorPaymentsContractorPaymentUuidFundRequest: GetV1ContractorPaymentsContractorPaymentUuidFundRequest, ): string { return JSON.stringify( GetV1ContractorPaymentsContractorPaymentUuidFundRequest$outboundSchema .parse(getV1ContractorPaymentsContractorPaymentUuidFundRequest), ); } /** @internal */ export const GetV1ContractorPaymentsContractorPaymentUuidFundResponse$inboundSchema: z.ZodType< GetV1ContractorPaymentsContractorPaymentUuidFundResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Contractor-Payment": ContractorPayment$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Contractor-Payment": "contractorPayment", }); }); export function getV1ContractorPaymentsContractorPaymentUuidFundResponseFromJSON( jsonString: string, ): SafeParseResult< GetV1ContractorPaymentsContractorPaymentUuidFundResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetV1ContractorPaymentsContractorPaymentUuidFundResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'GetV1ContractorPaymentsContractorPaymentUuidFundResponse' from JSON`, ); }