/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { PaymentActionType, PaymentActionType$inboundSchema, } from "./payment-action-type.js"; import { SDKValidationError } from "./sdk-validation-error.js"; export type PaymentAction = { type?: PaymentActionType | undefined; url?: string | undefined; }; /** @internal */ export const PaymentAction$inboundSchema: z.ZodMiniType< PaymentAction, unknown > = z.object({ type: types.optional(PaymentActionType$inboundSchema), url: types.optional(types.string()), }); export function paymentActionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PaymentAction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PaymentAction' from JSON`, ); }