/** * PayPal Server SDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { number, object, optional, Schema } from '../schema.js'; import { IntervalUnit, intervalUnitSchema } from './intervalUnit.js'; /** The frequency of the billing cycle. */ export interface Frequency { /** The interval at which the subscription is charged or billed. */ intervalUnit: IntervalUnit; /** The number of intervals after which a subscriber is billed. For example, if the `interval_unit` is `DAY` with an `interval_count` of `2`, the subscription is billed once every two days. The following table lists the maximum allowed values for the `interval_count` for each `interval_unit`: Interval unit Maximum interval count DAY 365 WEEK 52 MONTH 12 YEAR 1 */ intervalCount?: number; } export const frequencySchema: Schema = object({ intervalUnit: ['interval_unit', intervalUnitSchema], intervalCount: ['interval_count', optional(number())], });