/* * 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 { SDKValidationError } from "./errors/sdk-validation-error.js"; import { PaymentIntentStatus, PaymentIntentStatus$inboundSchema, } from "./payment-intent-status.js"; export type PaymentPrepareResponse = { paymentIntentId: string; /** * Non-negative integer amount in USDC atomic units. */ maxAmountWei: string; status: PaymentIntentStatus; [additionalProperties: string]: unknown; }; /** @internal */ export const PaymentPrepareResponse$inboundSchema: z.ZodMiniType< PaymentPrepareResponse, unknown > = z.catchall( z.object({ paymentIntentId: types.string(), maxAmountWei: types.string(), status: PaymentIntentStatus$inboundSchema, }), z.any(), ); export function paymentPrepareResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PaymentPrepareResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PaymentPrepareResponse' from JSON`, ); }