/* * 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 WebhookDataRefundCreated = { accountID: string; transferID: string; refundID: string; }; /** @internal */ export const WebhookDataRefundCreated$inboundSchema: z.ZodType< WebhookDataRefundCreated, z.ZodTypeDef, unknown > = z.object({ accountID: z.string(), transferID: z.string(), refundID: z.string(), }); /** @internal */ export type WebhookDataRefundCreated$Outbound = { accountID: string; transferID: string; refundID: string; }; /** @internal */ export const WebhookDataRefundCreated$outboundSchema: z.ZodType< WebhookDataRefundCreated$Outbound, z.ZodTypeDef, WebhookDataRefundCreated > = z.object({ accountID: z.string(), transferID: z.string(), refundID: z.string(), }); export function webhookDataRefundCreatedToJSON( webhookDataRefundCreated: WebhookDataRefundCreated, ): string { return JSON.stringify( WebhookDataRefundCreated$outboundSchema.parse(webhookDataRefundCreated), ); } export function webhookDataRefundCreatedFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => WebhookDataRefundCreated$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WebhookDataRefundCreated' from JSON`, ); }