/* * 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 { PazeMobileNumber, PazeMobileNumber$inboundSchema, } from "./pazemobilenumber.js"; export type PazeConsumer = { /** * First name of the consumer. */ firstName: string | null; /** * Last name of the consumer. */ lastName: string | null; /** * Full name of the consumer. */ fullName: string; /** * ISO 3166-1 alpha-2 country code. */ countryCode: string | null; /** * ISO 639-1 language code associated with the wallet. */ languageCode: string | null; /** * Email address of the consumer. */ emailAddress: string; mobileNumber: PazeMobileNumber | null; }; /** @internal */ export const PazeConsumer$inboundSchema: z.ZodType< PazeConsumer, z.ZodTypeDef, unknown > = z.object({ firstName: z.nullable(z.string()), lastName: z.nullable(z.string()), fullName: z.string(), countryCode: z.nullable(z.string()), languageCode: z.nullable(z.string()), emailAddress: z.string(), mobileNumber: z.nullable(PazeMobileNumber$inboundSchema), }); export function pazeConsumerFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PazeConsumer$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PazeConsumer' from JSON`, ); }