/** * PayPal Server SDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { array, lazy, object, optional, Schema } from '../schema.js'; import { BillingCycleOverride, billingCycleOverrideSchema, } from './billingCycleOverride.js'; import { PaymentPreferencesOverride, paymentPreferencesOverrideSchema, } from './paymentPreferencesOverride.js'; import { TaxesOverride, taxesOverrideSchema } from './taxesOverride.js'; /** An inline plan object to customise the subscription. You can override plan level default attributes by providing customised values for the subscription in this object. */ export interface PlanOverride { /** An array of billing cycles for trial billing and regular billing. The subscription billing cycle definition has to adhere to the plan billing cycle definition. */ billingCycles?: BillingCycleOverride[]; /** The payment preferences to override at subscription level. */ paymentPreferences?: PaymentPreferencesOverride; /** The tax details. */ taxes?: TaxesOverride; } export const planOverrideSchema: Schema = lazy(() => object({ billingCycles: [ 'billing_cycles', optional(array(billingCycleOverrideSchema)), ], paymentPreferences: [ 'payment_preferences', optional(paymentPreferencesOverrideSchema), ], taxes: ['taxes', optional(taxesOverrideSchema)], }) );