/* * 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"; import { PazeConsumer, PazeConsumer$inboundSchema } from "./pazeconsumer.js"; import { PazeMaskedCard, PazeMaskedCard$inboundSchema, } from "./pazemaskedcard.js"; import { PazeSessionReviewLinks, PazeSessionReviewLinks$inboundSchema, } from "./pazesessionreviewlinks.js"; import { PazeShippingAddress, PazeShippingAddress$inboundSchema, } from "./pazeshippingaddress.js"; export type PazeSessionReview = { consumer: PazeConsumer; shippingAddress: PazeShippingAddress | null; maskedCard: PazeMaskedCard; links: PazeSessionReviewLinks; /** * Opaque token issued by the Paze service to be used in the next Paze interaction. */ code: string; }; /** @internal */ export const PazeSessionReview$inboundSchema: z.ZodType< PazeSessionReview, z.ZodTypeDef, unknown > = z.object({ consumer: PazeConsumer$inboundSchema, shippingAddress: z.nullable(PazeShippingAddress$inboundSchema), maskedCard: PazeMaskedCard$inboundSchema, links: PazeSessionReviewLinks$inboundSchema, code: z.string(), }); export function pazeSessionReviewFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PazeSessionReview$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PazeSessionReview' from JSON`, ); }