/* * 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 RTPServices = { /** * Can the institution receive payments */ receivePayments: boolean; /** * Can the institution receive request for payment messages */ receiveRequestForPayment: boolean; }; /** @internal */ export const RTPServices$inboundSchema: z.ZodType< RTPServices, z.ZodTypeDef, unknown > = z.object({ receivePayments: z.boolean(), receiveRequestForPayment: z.boolean(), }); /** @internal */ export type RTPServices$Outbound = { receivePayments: boolean; receiveRequestForPayment: boolean; }; /** @internal */ export const RTPServices$outboundSchema: z.ZodType< RTPServices$Outbound, z.ZodTypeDef, RTPServices > = z.object({ receivePayments: z.boolean(), receiveRequestForPayment: z.boolean(), }); export function rtpServicesToJSON(rtpServices: RTPServices): string { return JSON.stringify(RTPServices$outboundSchema.parse(rtpServices)); } export function rtpServicesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RTPServices$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RTPServices' from JSON`, ); }