/* * 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 RegisterApplePayMerchantDomains = { /** * A UTF-8 string to display in the Buy button. */ displayName?: string | undefined; /** * A unique list of fully-qualified, top-level or sub-domain names where you will accept Apple Pay. */ domains?: Array | undefined; }; /** @internal */ export const RegisterApplePayMerchantDomains$inboundSchema: z.ZodType< RegisterApplePayMerchantDomains, z.ZodTypeDef, unknown > = z.object({ displayName: z.string().optional(), domains: z.array(z.string()).optional(), }); /** @internal */ export type RegisterApplePayMerchantDomains$Outbound = { displayName?: string | undefined; domains?: Array | undefined; }; /** @internal */ export const RegisterApplePayMerchantDomains$outboundSchema: z.ZodType< RegisterApplePayMerchantDomains$Outbound, z.ZodTypeDef, RegisterApplePayMerchantDomains > = z.object({ displayName: z.string().optional(), domains: z.array(z.string()).optional(), }); export function registerApplePayMerchantDomainsToJSON( registerApplePayMerchantDomains: RegisterApplePayMerchantDomains, ): string { return JSON.stringify( RegisterApplePayMerchantDomains$outboundSchema.parse( registerApplePayMerchantDomains, ), ); } export function registerApplePayMerchantDomainsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RegisterApplePayMerchantDomains$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RegisterApplePayMerchantDomains' from JSON`, ); }