/* * 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 * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GetThreeDsScenarioGlobals = { merchantAccountId?: string | undefined; }; export type GetThreeDsScenarioRequest = { /** * A pointer to the page of results to return. */ cursor?: string | null | undefined; /** * The maximum number of items that are at returned. */ limit?: number | undefined; /** * The ID of the merchant account to use for this request. */ merchantAccountId?: string | null | undefined; }; export type GetThreeDsScenarioResponse = { result: components.ThreeDSecureScenarios; }; /** @internal */ export type GetThreeDsScenarioRequest$Outbound = { cursor?: string | null | undefined; limit: number; merchantAccountId?: string | null | undefined; }; /** @internal */ export const GetThreeDsScenarioRequest$outboundSchema: z.ZodType< GetThreeDsScenarioRequest$Outbound, z.ZodTypeDef, GetThreeDsScenarioRequest > = z.object({ cursor: z.nullable(z.string()).optional(), limit: z.number().int().default(20), merchantAccountId: z.nullable(z.string()).optional(), }); export function getThreeDsScenarioRequestToJSON( getThreeDsScenarioRequest: GetThreeDsScenarioRequest, ): string { return JSON.stringify( GetThreeDsScenarioRequest$outboundSchema.parse(getThreeDsScenarioRequest), ); } /** @internal */ export const GetThreeDsScenarioResponse$inboundSchema: z.ZodType< GetThreeDsScenarioResponse, z.ZodTypeDef, unknown > = z.object({ Result: components.ThreeDSecureScenarios$inboundSchema, }).transform((v) => { return remap$(v, { "Result": "result", }); }); export function getThreeDsScenarioResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetThreeDsScenarioResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetThreeDsScenarioResponse' from JSON`, ); }