/* * 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 { PaymentConfigs, PaymentConfigs$inboundSchema, } from "../components/paymentconfigs.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 GetV1CompanyPaymentConfigsHeaderXGustoAPIVersion = { 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 GetV1CompanyPaymentConfigsHeaderXGustoAPIVersion = ClosedEnum< typeof GetV1CompanyPaymentConfigsHeaderXGustoAPIVersion >; export type GetV1CompanyPaymentConfigsRequest = { /** * 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?: | GetV1CompanyPaymentConfigsHeaderXGustoAPIVersion | undefined; /** * The UUID of the company */ companyUuid: string; }; export type GetV1CompanyPaymentConfigsResponse = { httpMeta: HTTPMetadata; /** * Successful */ paymentConfigs?: PaymentConfigs | undefined; }; /** @internal */ export const GetV1CompanyPaymentConfigsHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum = z .nativeEnum(GetV1CompanyPaymentConfigsHeaderXGustoAPIVersion); /** @internal */ export type GetV1CompanyPaymentConfigsRequest$Outbound = { "X-Gusto-API-Version": string; company_uuid: string; }; /** @internal */ export const GetV1CompanyPaymentConfigsRequest$outboundSchema: z.ZodType< GetV1CompanyPaymentConfigsRequest$Outbound, z.ZodTypeDef, GetV1CompanyPaymentConfigsRequest > = z.object({ xGustoAPIVersion: GetV1CompanyPaymentConfigsHeaderXGustoAPIVersion$outboundSchema.default( "2025-06-15", ), companyUuid: z.string(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", companyUuid: "company_uuid", }); }); export function getV1CompanyPaymentConfigsRequestToJSON( getV1CompanyPaymentConfigsRequest: GetV1CompanyPaymentConfigsRequest, ): string { return JSON.stringify( GetV1CompanyPaymentConfigsRequest$outboundSchema.parse( getV1CompanyPaymentConfigsRequest, ), ); } /** @internal */ export const GetV1CompanyPaymentConfigsResponse$inboundSchema: z.ZodType< GetV1CompanyPaymentConfigsResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Payment-Configs": PaymentConfigs$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Payment-Configs": "paymentConfigs", }); }); export function getV1CompanyPaymentConfigsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetV1CompanyPaymentConfigsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV1CompanyPaymentConfigsResponse' from JSON`, ); }