/** * 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 { CapturePaymentInstruction, capturePaymentInstructionSchema, } from './capturePaymentInstruction.js'; import { Money, moneySchema } from './money.js'; /** Captures either a portion or the full authorized amount of an authorized payment. */ export interface CaptureRequest { /** The currency and amount for a financial transaction, such as a balance or payment due. */ amount?: Money; /** The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. */ invoiceId?: string; /** Indicates whether you can make additional captures against the authorized payment. Set to `true` if you do not intend to capture additional payments against the authorization. Set to `false` if you intend to capture additional payments against the authorization. */ finalCapture?: boolean; /** Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order. */ paymentInstruction?: CapturePaymentInstruction; /** An informational note about this settlement. Appears in both the payer's transaction history and the emails that the payer receives. */ noteToPayer?: string; /** The payment descriptor on the payer's account statement. */ softDescriptor?: string; } export const captureRequestSchema: Schema = lazy(() => object({ amount: ['amount', optional(moneySchema)], invoiceId: ['invoice_id', optional(string())], finalCapture: ['final_capture', optional(boolean())], paymentInstruction: [ 'payment_instruction', optional(capturePaymentInstructionSchema), ], noteToPayer: ['note_to_payer', optional(string())], softDescriptor: ['soft_descriptor', optional(string())], }) );