/* * 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"; export type ThreeDSecureError = { /** * The error code. */ code?: string | null | undefined; /** * The error description. */ description?: string | null | undefined; /** * Detail about the 3DS error. */ detail?: string | null | undefined; /** * Code indicating the 3-D Secure component that identified the error. */ component?: string | null | undefined; }; /** @internal */ export const ThreeDSecureError$inboundSchema: z.ZodType< ThreeDSecureError, z.ZodTypeDef, unknown > = z.object({ code: z.nullable(z.string()).optional(), description: z.nullable(z.string()).optional(), detail: z.nullable(z.string()).optional(), component: z.nullable(z.string()).optional(), }); export function threeDSecureErrorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ThreeDSecureError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeDSecureError' from JSON`, ); }