/* * 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"; /** * The entity that generated the fee. */ export type GeneratedBy = { transferID?: string | undefined; cardID?: string | undefined; disputeID?: string | undefined; accountID?: string | undefined; bankAccountID?: string | undefined; }; /** @internal */ export const GeneratedBy$inboundSchema: z.ZodType< GeneratedBy, z.ZodTypeDef, unknown > = z.object({ transferID: z.string().optional(), cardID: z.string().optional(), disputeID: z.string().optional(), accountID: z.string().optional(), bankAccountID: z.string().optional(), }); /** @internal */ export type GeneratedBy$Outbound = { transferID?: string | undefined; cardID?: string | undefined; disputeID?: string | undefined; accountID?: string | undefined; bankAccountID?: string | undefined; }; /** @internal */ export const GeneratedBy$outboundSchema: z.ZodType< GeneratedBy$Outbound, z.ZodTypeDef, GeneratedBy > = z.object({ transferID: z.string().optional(), cardID: z.string().optional(), disputeID: z.string().optional(), accountID: z.string().optional(), bankAccountID: z.string().optional(), }); export function generatedByToJSON(generatedBy: GeneratedBy): string { return JSON.stringify(GeneratedBy$outboundSchema.parse(generatedBy)); } export function generatedByFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GeneratedBy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GeneratedBy' from JSON`, ); }