/** * PayPal Server SDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { array, lazy, object, optional, Schema, string } from '../schema.js'; import { BillingCycle, billingCycleSchema } from './billingCycle.js'; import { OneTimeCharge, oneTimeChargeSchema } from './oneTimeCharge.js'; /** The merchant level Recurring Billing plan metadata for the Billing Agreement. */ export interface Plan { /** An array of billing cycles for trial billing and regular billing. A plan can have at most two trial cycles and only one regular cycle. */ billingCycles: BillingCycle[]; /** The one-time charge info at the time of checkout. */ oneTimeCharges: OneTimeCharge; /** Name of the recurring plan. */ name?: string; } export const planSchema: Schema = lazy(() => object({ billingCycles: ['billing_cycles', array(billingCycleSchema)], oneTimeCharges: ['one_time_charges', oneTimeChargeSchema], name: ['name', optional(string())], }) );