/** * PayPal Server SDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { array, lazy, object, optional, Schema } from '../schema.js'; import { Money, moneySchema } from './money.js'; import { NetAmountBreakdownItem, netAmountBreakdownItemSchema, } from './netAmountBreakdownItem.js'; import { PlatformFee, platformFeeSchema } from './platformFee.js'; /** The breakdown of the refund. */ export interface SellerPayableBreakdown { /** The currency and amount for a financial transaction, such as a balance or payment due. */ grossAmount?: Money; /** The currency and amount for a financial transaction, such as a balance or payment due. */ paypalFee?: Money; /** The currency and amount for a financial transaction, such as a balance or payment due. */ paypalFeeInReceivableCurrency?: Money; /** The currency and amount for a financial transaction, such as a balance or payment due. */ netAmount?: Money; /** The currency and amount for a financial transaction, such as a balance or payment due. */ netAmountInReceivableCurrency?: Money; /** An array of platform or partner fees, commissions, or brokerage fees for the refund. */ platformFees?: PlatformFee[]; /** An array of breakdown values for the net amount. Returned when the currency of the refund is different from the currency of the PayPal account where the payee holds their funds. */ netAmountBreakdown?: NetAmountBreakdownItem[]; /** The currency and amount for a financial transaction, such as a balance or payment due. */ totalRefundedAmount?: Money; } export const sellerPayableBreakdownSchema: Schema = lazy( () => object({ grossAmount: ['gross_amount', optional(moneySchema)], paypalFee: ['paypal_fee', optional(moneySchema)], paypalFeeInReceivableCurrency: [ 'paypal_fee_in_receivable_currency', optional(moneySchema), ], netAmount: ['net_amount', optional(moneySchema)], netAmountInReceivableCurrency: [ 'net_amount_in_receivable_currency', optional(moneySchema), ], platformFees: ['platform_fees', optional(array(platformFeeSchema))], netAmountBreakdown: [ 'net_amount_breakdown', optional(array(netAmountBreakdownItemSchema)), ], totalRefundedAmount: ['total_refunded_amount', optional(moneySchema)], }) );