/** * PayPal Server SDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { boolean, lazy, object, optional, Schema, string } from '../schema.js'; import { Money, moneySchema } from './money.js'; /** The Balance information. */ export interface BalanceInformation { /** The [three-character ISO-4217 currency code](/docs/integration/direct/rest/currency-codes/) that identifies the currency. */ currency: string; /** Optional field representing if the currency is primary currency or not. */ primary?: boolean; /** The currency and amount for a financial transaction, such as a balance or payment due. */ totalBalance: Money; /** The currency and amount for a financial transaction, such as a balance or payment due. */ availableBalance?: Money; /** The currency and amount for a financial transaction, such as a balance or payment due. */ withheldBalance?: Money; } export const balanceInformationSchema: Schema = lazy(() => object({ currency: ['currency', string()], primary: ['primary', optional(boolean())], totalBalance: ['total_balance', moneySchema], availableBalance: ['available_balance', optional(moneySchema)], withheldBalance: ['withheld_balance', optional(moneySchema)], }) );