/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Information about the company from the underlying accounting software. */ export type CompanyInformation = { /** * Name of the linked company. */ companyName?: string | undefined; /** * Currency set in the accounting software of the linked company. */ baseCurrency?: string | undefined; /** * Accounting software subscription type such as Trial, Demo, Standard. */ planType?: string | null | undefined; /** * Boolean showing if the organisation has multicurrency enabled. */ multicurrencyEnabled?: boolean | undefined; /** * Array of enabled currencies for the linked company. */ currencies?: Array | null | undefined; }; /** @internal */ export const CompanyInformation$inboundSchema: z.ZodType< CompanyInformation, z.ZodTypeDef, unknown > = z.object({ companyName: z.string().optional(), baseCurrency: z.string().optional(), planType: z.nullable(z.string()).optional(), multicurrencyEnabled: z.boolean().optional(), currencies: z.nullable(z.array(z.string())).optional(), }); export function companyInformationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CompanyInformation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompanyInformation' from JSON`, ); }