/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { PolarError } from "./polarerror.js"; export type NotPaidOrderData = { error: "NotPaidOrder"; detail: string; }; export class NotPaidOrder extends PolarError { error: "NotPaidOrder"; detail: string; /** The original data that was passed to this error instance. */ data$: NotPaidOrderData; constructor( err: NotPaidOrderData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; this.error = err.error; this.detail = err.detail; this.name = "NotPaidOrder"; } } /** @internal */ export const NotPaidOrder$inboundSchema: z.ZodMiniType = z.pipe( z.object({ error: z.literal("NotPaidOrder"), detail: z.string(), request$: z.custom(x => x instanceof Request), response$: z.custom(x => x instanceof Response), body$: z.string(), }), z.transform((v) => { return new NotPaidOrder(v, { request: v.request$, response: v.response$, body: v.body$, }); }), );