/** * 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 { Customer, customerSchema } from './customer.js'; import { SetupTokenRequestPaymentSource, setupTokenRequestPaymentSourceSchema, } from './setupTokenRequestPaymentSource.js'; /** Setup Token Request where the `source` defines the type of instrument to be stored. */ export interface SetupTokenRequest { /** This object defines a customer in your system. Use it to manage customer profiles, save payment methods and contact details. */ customer?: Customer; /** The payment method to vault with the instrument details. */ paymentSource: SetupTokenRequestPaymentSource; } export const setupTokenRequestSchema: Schema = lazy(() => object({ customer: ['customer', optional(customerSchema)], paymentSource: ['payment_source', setupTokenRequestPaymentSourceSchema], }) );