/** * 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 { ApplePayRequest, applePayRequestSchema } from './applePayRequest.js'; import { CardRequest, cardRequestSchema } from './cardRequest.js'; import { GooglePayRequest, googlePayRequestSchema, } from './googlePayRequest.js'; import { PaypalWallet, paypalWalletSchema } from './paypalWallet.js'; import { Token, tokenSchema } from './token.js'; import { VenmoWalletRequest, venmoWalletRequestSchema, } from './venmoWalletRequest.js'; /** The payment source definition. */ export interface OrderAuthorizeRequestPaymentSource { /** The payment card to use to fund a payment. Can be a credit or debit card. Note: Passing card number, cvv and expiry directly via the API requires PCI SAQ D compliance. *PayPal offers a mechanism by which you do not have to take on the PCI SAQ D burden by using hosted fields - refer to this Integration Guide*. */ card?: CardRequest; /** The tokenized payment source to fund a payment. */ token?: Token; /** A resource that identifies a PayPal Wallet is used for payment. */ paypal?: PaypalWallet; /** Information needed to pay using ApplePay. */ applePay?: ApplePayRequest; /** Information needed to pay using Google Pay. */ googlePay?: GooglePayRequest; /** Information needed to pay using Venmo. */ venmo?: VenmoWalletRequest; } export const orderAuthorizeRequestPaymentSourceSchema: Schema = lazy( () => object({ card: ['card', optional(cardRequestSchema)], token: ['token', optional(tokenSchema)], paypal: ['paypal', optional(paypalWalletSchema)], applePay: ['apple_pay', optional(applePayRequestSchema)], googlePay: ['google_pay', optional(googlePayRequestSchema)], venmo: ['venmo', optional(venmoWalletRequestSchema)], }) );