/** * PayPal Server SDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { array, lazy, number, object, optional, Schema } from '../schema.js'; import { BillingPlan, billingPlanSchema } from './billingPlan.js'; import { LinkDescription, linkDescriptionSchema } from './linkDescription.js'; /** The list of plans with details. */ export interface PlanCollection { /** An array of plans. */ plans?: BillingPlan[]; /** The total number of items. */ totalItems?: number; /** The total number of pages. */ totalPages?: number; /** An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). */ links?: LinkDescription[]; } export const planCollectionSchema: Schema = lazy(() => object({ plans: ['plans', optional(array(billingPlanSchema))], totalItems: ['total_items', optional(number())], totalPages: ['total_pages', optional(number())], links: ['links', optional(array(linkDescriptionSchema))], }) );