/* * 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 { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type LinkedTaxStatusDetail = { /** * The country of the tax status. */ country?: string | undefined; /** * The transaction tax status. */ transactionTaxStatus?: string | null | undefined; }; /** @internal */ export const LinkedTaxStatusDetail$inboundSchema: z.ZodType< LinkedTaxStatusDetail, z.ZodTypeDef, unknown > = /* @__PURE__ */ lazySchema$(() => z.object({ country: types.optional(types.string()), transaction_tax_status: z.nullable(types.string()).optional(), }).transform((v) => { return remap$(v, { "transaction_tax_status": "transactionTaxStatus", }); }) ); /** @internal */ export type LinkedTaxStatusDetail$Outbound = { country?: string | undefined; transaction_tax_status?: string | null | undefined; }; /** @internal */ export const LinkedTaxStatusDetail$outboundSchema: z.ZodType< LinkedTaxStatusDetail$Outbound, z.ZodTypeDef, LinkedTaxStatusDetail > = /* @__PURE__ */ lazySchema$(() => z.object({ country: z.string().optional(), transactionTaxStatus: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { transactionTaxStatus: "transaction_tax_status", }); }) ); export function linkedTaxStatusDetailToJSON( linkedTaxStatusDetail: LinkedTaxStatusDetail, ): string { return JSON.stringify( LinkedTaxStatusDetail$outboundSchema.parse(linkedTaxStatusDetail), ); } export function linkedTaxStatusDetailFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => LinkedTaxStatusDetail$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LinkedTaxStatusDetail' from JSON`, ); }