/* * 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"; import { AmountDecimal, AmountDecimal$inboundSchema, AmountDecimal$Outbound, AmountDecimal$outboundSchema, } from "./amountdecimal.js"; /** * A detailed breakdown of account fees. */ export type AccountFees = { /** * Fees associated with wallet services. */ walletFee: AmountDecimal; /** * Fees for PCI compliance. */ merchantPCIFee: AmountDecimal; /** * Fees for business verification. */ kybFee?: AmountDecimal | undefined; /** * Fees for customer verification. */ kycFee?: AmountDecimal | undefined; /** * Fees for transaction risk monitoring. */ transactionMonitoringFee?: AmountDecimal | undefined; /** * Total platform fees. */ total: AmountDecimal; }; /** @internal */ export const AccountFees$inboundSchema: z.ZodType< AccountFees, z.ZodTypeDef, unknown > = z.object({ walletFee: AmountDecimal$inboundSchema, merchantPCIFee: AmountDecimal$inboundSchema, kybFee: AmountDecimal$inboundSchema.optional(), kycFee: AmountDecimal$inboundSchema.optional(), transactionMonitoringFee: AmountDecimal$inboundSchema.optional(), total: AmountDecimal$inboundSchema, }); /** @internal */ export type AccountFees$Outbound = { walletFee: AmountDecimal$Outbound; merchantPCIFee: AmountDecimal$Outbound; kybFee?: AmountDecimal$Outbound | undefined; kycFee?: AmountDecimal$Outbound | undefined; transactionMonitoringFee?: AmountDecimal$Outbound | undefined; total: AmountDecimal$Outbound; }; /** @internal */ export const AccountFees$outboundSchema: z.ZodType< AccountFees$Outbound, z.ZodTypeDef, AccountFees > = z.object({ walletFee: AmountDecimal$outboundSchema, merchantPCIFee: AmountDecimal$outboundSchema, kybFee: AmountDecimal$outboundSchema.optional(), kycFee: AmountDecimal$outboundSchema.optional(), transactionMonitoringFee: AmountDecimal$outboundSchema.optional(), total: AmountDecimal$outboundSchema, }); export function accountFeesToJSON(accountFees: AccountFees): string { return JSON.stringify(AccountFees$outboundSchema.parse(accountFees)); } export function accountFeesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AccountFees$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountFees' from JSON`, ); }