/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type TaxRatesFilter = { /** * Boolean to describe if tax rate can be used for asset accounts */ assets?: boolean | undefined; /** * Boolean to describe if tax rate can be used for equity accounts */ equity?: boolean | undefined; /** * Boolean to describe if tax rate can be used for expense accounts */ expenses?: boolean | undefined; /** * Boolean to describe if tax rate can be used for liability accounts */ liabilities?: boolean | undefined; /** * Boolean to describe if tax rate can be used for revenue accounts */ revenue?: boolean | undefined; }; /** @internal */ export const TaxRatesFilter$inboundSchema: z.ZodType< TaxRatesFilter, z.ZodTypeDef, unknown > = z.object({ assets: z.boolean().optional(), equity: z.boolean().optional(), expenses: z.boolean().optional(), liabilities: z.boolean().optional(), revenue: z.boolean().optional(), }); /** @internal */ export type TaxRatesFilter$Outbound = { assets?: boolean | undefined; equity?: boolean | undefined; expenses?: boolean | undefined; liabilities?: boolean | undefined; revenue?: boolean | undefined; }; /** @internal */ export const TaxRatesFilter$outboundSchema: z.ZodType< TaxRatesFilter$Outbound, z.ZodTypeDef, TaxRatesFilter > = z.object({ assets: z.boolean().optional(), equity: z.boolean().optional(), expenses: z.boolean().optional(), liabilities: z.boolean().optional(), revenue: z.boolean().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TaxRatesFilter$ { /** @deprecated use `TaxRatesFilter$inboundSchema` instead. */ export const inboundSchema = TaxRatesFilter$inboundSchema; /** @deprecated use `TaxRatesFilter$outboundSchema` instead. */ export const outboundSchema = TaxRatesFilter$outboundSchema; /** @deprecated use `TaxRatesFilter$Outbound` instead. */ export type Outbound = TaxRatesFilter$Outbound; } export function taxRatesFilterToJSON(taxRatesFilter: TaxRatesFilter): string { return JSON.stringify(TaxRatesFilter$outboundSchema.parse(taxRatesFilter)); } export function taxRatesFilterFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TaxRatesFilter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TaxRatesFilter' from JSON`, ); }