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