/** * 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 { BancontactPaymentRequest, bancontactPaymentRequestSchema, } from './bancontactPaymentRequest.js'; import { BlikPaymentRequest, blikPaymentRequestSchema, } from './blikPaymentRequest.js'; import { CardRequest, cardRequestSchema } from './cardRequest.js'; import { EpsPaymentRequest, epsPaymentRequestSchema, } from './epsPaymentRequest.js'; import { GiropayPaymentRequest, giropayPaymentRequestSchema, } from './giropayPaymentRequest.js'; import { GooglePayRequest, googlePayRequestSchema, } from './googlePayRequest.js'; import { IdealPaymentRequest, idealPaymentRequestSchema, } from './idealPaymentRequest.js'; import { MybankPaymentRequest, mybankPaymentRequestSchema, } from './mybankPaymentRequest.js'; import { P24PaymentRequest, p24PaymentRequestSchema, } from './p24PaymentRequest.js'; import { PaypalWallet, paypalWalletSchema } from './paypalWallet.js'; import { SofortPaymentRequest, sofortPaymentRequestSchema, } from './sofortPaymentRequest.js'; import { Token, tokenSchema } from './token.js'; import { TrustlyPaymentRequest, trustlyPaymentRequestSchema, } from './trustlyPaymentRequest.js'; import { VenmoWalletRequest, venmoWalletRequestSchema, } from './venmoWalletRequest.js'; /** The payment source definition. */ export interface PaymentSource { /** 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 Bancontact. */ bancontact?: BancontactPaymentRequest; /** Information needed to pay using BLIK. */ blik?: BlikPaymentRequest; /** Information needed to pay using eps. */ eps?: EpsPaymentRequest; /** Information needed to pay using giropay. */ giropay?: GiropayPaymentRequest; /** Information needed to pay using iDEAL. */ ideal?: IdealPaymentRequest; /** Information needed to pay using MyBank. */ mybank?: MybankPaymentRequest; /** Information needed to pay using P24 (Przelewy24). */ p24?: P24PaymentRequest; /** Information needed to pay using Sofort. */ sofort?: SofortPaymentRequest; /** Information needed to pay using Trustly. */ trustly?: TrustlyPaymentRequest; /** 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 paymentSourceSchema: Schema = lazy(() => object({ card: ['card', optional(cardRequestSchema)], token: ['token', optional(tokenSchema)], paypal: ['paypal', optional(paypalWalletSchema)], bancontact: ['bancontact', optional(bancontactPaymentRequestSchema)], blik: ['blik', optional(blikPaymentRequestSchema)], eps: ['eps', optional(epsPaymentRequestSchema)], giropay: ['giropay', optional(giropayPaymentRequestSchema)], ideal: ['ideal', optional(idealPaymentRequestSchema)], mybank: ['mybank', optional(mybankPaymentRequestSchema)], p24: ['p24', optional(p24PaymentRequestSchema)], sofort: ['sofort', optional(sofortPaymentRequestSchema)], trustly: ['trustly', optional(trustlyPaymentRequestSchema)], applePay: ['apple_pay', optional(applePayRequestSchema)], googlePay: ['google_pay', optional(googlePayRequestSchema)], venmo: ['venmo', optional(venmoWalletRequestSchema)], }) );