/* * 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 SetCurrencyRequestBody = { currency: string; }; /** * OK */ export type SetCurrencyResponseBody = { currency: string; }; /** @internal */ export const SetCurrencyRequestBody$inboundSchema: z.ZodType< SetCurrencyRequestBody, z.ZodTypeDef, unknown > = z.object({ currency: z.string(), }); /** @internal */ export type SetCurrencyRequestBody$Outbound = { currency: string; }; /** @internal */ export const SetCurrencyRequestBody$outboundSchema: z.ZodType< SetCurrencyRequestBody$Outbound, z.ZodTypeDef, SetCurrencyRequestBody > = z.object({ currency: z.string(), }); export function setCurrencyRequestBodyToJSON( setCurrencyRequestBody: SetCurrencyRequestBody, ): string { return JSON.stringify( SetCurrencyRequestBody$outboundSchema.parse(setCurrencyRequestBody), ); } export function setCurrencyRequestBodyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SetCurrencyRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SetCurrencyRequestBody' from JSON`, ); } /** @internal */ export const SetCurrencyResponseBody$inboundSchema: z.ZodType< SetCurrencyResponseBody, z.ZodTypeDef, unknown > = z.object({ currency: z.string(), }); /** @internal */ export type SetCurrencyResponseBody$Outbound = { currency: string; }; /** @internal */ export const SetCurrencyResponseBody$outboundSchema: z.ZodType< SetCurrencyResponseBody$Outbound, z.ZodTypeDef, SetCurrencyResponseBody > = z.object({ currency: z.string(), }); export function setCurrencyResponseBodyToJSON( setCurrencyResponseBody: SetCurrencyResponseBody, ): string { return JSON.stringify( SetCurrencyResponseBody$outboundSchema.parse(setCurrencyResponseBody), ); } export function setCurrencyResponseBodyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SetCurrencyResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SetCurrencyResponseBody' from JSON`, ); }