/* * 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"; export type PazeBillingAddress = { /** * Name of the organization or entity at the address. */ name?: string | null | undefined; /** * Line 1 of the address. */ line1: string; /** * Line 2 of the address. */ line2?: string | null | undefined; /** * Line 3 of the address. */ line3?: string | null | undefined; /** * City. */ city: string; /** * State or region. */ state: string; /** * Postal code. */ zip: string; /** * ISO 3166-1 alpha-2 country code. */ countryCode?: string | null | undefined; }; /** @internal */ export const PazeBillingAddress$inboundSchema: z.ZodType< PazeBillingAddress, z.ZodTypeDef, unknown > = z.object({ name: z.nullable(z.string()).optional(), line1: z.string(), line2: z.nullable(z.string()).optional(), line3: z.nullable(z.string()).optional(), city: z.string(), state: z.string(), zip: z.string(), countryCode: z.nullable(z.string()).optional(), }); export function pazeBillingAddressFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PazeBillingAddress$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PazeBillingAddress' from JSON`, ); }