/* * 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"; /** * Describes link between an account and a terminal application. */ export type AccountTerminalApplication = { /** * ID of the merchant account. */ accountID: string; /** * ID of the terminal application. */ terminalApplicationID: string; }; /** @internal */ export const AccountTerminalApplication$inboundSchema: z.ZodType< AccountTerminalApplication, z.ZodTypeDef, unknown > = z.object({ accountID: z.string(), terminalApplicationID: z.string(), }); /** @internal */ export type AccountTerminalApplication$Outbound = { accountID: string; terminalApplicationID: string; }; /** @internal */ export const AccountTerminalApplication$outboundSchema: z.ZodType< AccountTerminalApplication$Outbound, z.ZodTypeDef, AccountTerminalApplication > = z.object({ accountID: z.string(), terminalApplicationID: z.string(), }); export function accountTerminalApplicationToJSON( accountTerminalApplication: AccountTerminalApplication, ): string { return JSON.stringify( AccountTerminalApplication$outboundSchema.parse(accountTerminalApplication), ); } export function accountTerminalApplicationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AccountTerminalApplication$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountTerminalApplication' from JSON`, ); }