/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GooglePayPaymentOptionContext = { merchantName: string; supportedSchemes: Array; gateway: string; gatewayMerchantId: string; }; /** @internal */ export const GooglePayPaymentOptionContext$inboundSchema: z.ZodType< GooglePayPaymentOptionContext, z.ZodTypeDef, unknown > = z.object({ merchant_name: z.string(), supported_schemes: z.array(z.string()), gateway: z.string(), gateway_merchant_id: z.string(), }).transform((v) => { return remap$(v, { "merchant_name": "merchantName", "supported_schemes": "supportedSchemes", "gateway_merchant_id": "gatewayMerchantId", }); }); export function googlePayPaymentOptionContextFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GooglePayPaymentOptionContext$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GooglePayPaymentOptionContext' from JSON`, ); }