/** * PayPal Server SDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { lazy, object, optional, Schema } from '../schema.js'; import { Money, moneySchema } from './money.js'; /** The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, shipping, handling, insurance, and discounts, if any. */ export interface AmountBreakdown { /** The currency and amount for a financial transaction, such as a balance or payment due. */ itemTotal?: Money; /** The currency and amount for a financial transaction, such as a balance or payment due. */ shipping?: Money; /** The currency and amount for a financial transaction, such as a balance or payment due. */ handling?: Money; /** The currency and amount for a financial transaction, such as a balance or payment due. */ taxTotal?: Money; /** The currency and amount for a financial transaction, such as a balance or payment due. */ insurance?: Money; /** The currency and amount for a financial transaction, such as a balance or payment due. */ shippingDiscount?: Money; /** The discount amount and currency code. For list of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes. */ discount?: Money; } export const amountBreakdownSchema: Schema = lazy(() => object({ itemTotal: ['item_total', optional(moneySchema)], shipping: ['shipping', optional(moneySchema)], handling: ['handling', optional(moneySchema)], taxTotal: ['tax_total', optional(moneySchema)], insurance: ['insurance', optional(moneySchema)], shippingDiscount: ['shipping_discount', optional(moneySchema)], discount: ['discount', optional(moneySchema)], }) );