/** * PagarmeApiSDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { array, lazy, number, object, optional, Schema, string, } from '../schema'; import { CreateSplitRequest, createSplitRequestSchema, } from './createSplitRequest'; /** Request for capturing a charge */ export interface CreateCaptureChargeRequest { /** Code for the charge. Sending this field will update the code send on the charge and order creation. */ code: string; /** The amount that will be captured */ amount?: number; /** Splits */ split?: CreateSplitRequest[]; operationReference: string; } export const createCaptureChargeRequestSchema: Schema = object( { code: ['code', string()], amount: ['amount', optional(number())], split: ['split', optional(array(lazy(() => createSplitRequestSchema)))], operationReference: ['operation_reference', string()], } );