/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; 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 BankRelationshipsGetMicroDepositAmountsRequest = { /** * The account id. */ accountId: string; /** * The bankRelationship id. */ bankRelationshipId: string; }; export type BankRelationshipsGetMicroDepositAmountsResponse = { httpMeta: components.HTTPMetadata; /** * OK */ microDepositAmounts?: components.MicroDepositAmounts | undefined; /** * INVALID_ARGUMENT: The request has an invalid argument. */ status?: components.Status | undefined; }; /** @internal */ export const BankRelationshipsGetMicroDepositAmountsRequest$inboundSchema: z.ZodType< BankRelationshipsGetMicroDepositAmountsRequest, z.ZodTypeDef, unknown > = z.object({ account_id: z.string(), bankRelationship_id: z.string(), }).transform((v) => { return remap$(v, { "account_id": "accountId", "bankRelationship_id": "bankRelationshipId", }); }); /** @internal */ export type BankRelationshipsGetMicroDepositAmountsRequest$Outbound = { account_id: string; bankRelationship_id: string; }; /** @internal */ export const BankRelationshipsGetMicroDepositAmountsRequest$outboundSchema: z.ZodType< BankRelationshipsGetMicroDepositAmountsRequest$Outbound, z.ZodTypeDef, BankRelationshipsGetMicroDepositAmountsRequest > = z.object({ accountId: z.string(), bankRelationshipId: z.string(), }).transform((v) => { return remap$(v, { accountId: "account_id", bankRelationshipId: "bankRelationship_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BankRelationshipsGetMicroDepositAmountsRequest$ { /** @deprecated use `BankRelationshipsGetMicroDepositAmountsRequest$inboundSchema` instead. */ export const inboundSchema = BankRelationshipsGetMicroDepositAmountsRequest$inboundSchema; /** @deprecated use `BankRelationshipsGetMicroDepositAmountsRequest$outboundSchema` instead. */ export const outboundSchema = BankRelationshipsGetMicroDepositAmountsRequest$outboundSchema; /** @deprecated use `BankRelationshipsGetMicroDepositAmountsRequest$Outbound` instead. */ export type Outbound = BankRelationshipsGetMicroDepositAmountsRequest$Outbound; } export function bankRelationshipsGetMicroDepositAmountsRequestToJSON( bankRelationshipsGetMicroDepositAmountsRequest: BankRelationshipsGetMicroDepositAmountsRequest, ): string { return JSON.stringify( BankRelationshipsGetMicroDepositAmountsRequest$outboundSchema.parse( bankRelationshipsGetMicroDepositAmountsRequest, ), ); } export function bankRelationshipsGetMicroDepositAmountsRequestFromJSON( jsonString: string, ): SafeParseResult< BankRelationshipsGetMicroDepositAmountsRequest, SDKValidationError > { return safeParse( jsonString, (x) => BankRelationshipsGetMicroDepositAmountsRequest$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'BankRelationshipsGetMicroDepositAmountsRequest' from JSON`, ); } /** @internal */ export const BankRelationshipsGetMicroDepositAmountsResponse$inboundSchema: z.ZodType< BankRelationshipsGetMicroDepositAmountsResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, MicroDepositAmounts: components.MicroDepositAmounts$inboundSchema .optional(), Status: components.Status$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "MicroDepositAmounts": "microDepositAmounts", "Status": "status", }); }); /** @internal */ export type BankRelationshipsGetMicroDepositAmountsResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; MicroDepositAmounts?: components.MicroDepositAmounts$Outbound | undefined; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const BankRelationshipsGetMicroDepositAmountsResponse$outboundSchema: z.ZodType< BankRelationshipsGetMicroDepositAmountsResponse$Outbound, z.ZodTypeDef, BankRelationshipsGetMicroDepositAmountsResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, microDepositAmounts: components.MicroDepositAmounts$outboundSchema .optional(), status: components.Status$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", microDepositAmounts: "MicroDepositAmounts", status: "Status", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BankRelationshipsGetMicroDepositAmountsResponse$ { /** @deprecated use `BankRelationshipsGetMicroDepositAmountsResponse$inboundSchema` instead. */ export const inboundSchema = BankRelationshipsGetMicroDepositAmountsResponse$inboundSchema; /** @deprecated use `BankRelationshipsGetMicroDepositAmountsResponse$outboundSchema` instead. */ export const outboundSchema = BankRelationshipsGetMicroDepositAmountsResponse$outboundSchema; /** @deprecated use `BankRelationshipsGetMicroDepositAmountsResponse$Outbound` instead. */ export type Outbound = BankRelationshipsGetMicroDepositAmountsResponse$Outbound; } export function bankRelationshipsGetMicroDepositAmountsResponseToJSON( bankRelationshipsGetMicroDepositAmountsResponse: BankRelationshipsGetMicroDepositAmountsResponse, ): string { return JSON.stringify( BankRelationshipsGetMicroDepositAmountsResponse$outboundSchema.parse( bankRelationshipsGetMicroDepositAmountsResponse, ), ); } export function bankRelationshipsGetMicroDepositAmountsResponseFromJSON( jsonString: string, ): SafeParseResult< BankRelationshipsGetMicroDepositAmountsResponse, SDKValidationError > { return safeParse( jsonString, (x) => BankRelationshipsGetMicroDepositAmountsResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'BankRelationshipsGetMicroDepositAmountsResponse' from JSON`, ); }