/** * 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 { TenureType, tenureTypeSchema } from './tenureType.js'; /** The regular and trial execution details for a billing cycle. */ export interface CycleExecution { /** The type of the billing cycle. */ tenureType: TenureType; /** The order in which to run this cycle among other billing cycles. */ sequence: number; /** The number of billing cycles that have completed. */ cyclesCompleted: number; /** For a finite billing cycle, cycles_remaining is the number of remaining cycles. For an infinite billing cycle, cycles_remaining is set as 0. */ cyclesRemaining?: number; /** The active pricing scheme version for the billing cycle. */ currentPricingSchemeVersion?: number; /** The number of times this billing cycle gets executed. Trial billing cycles can only be executed a finite number of times (value between 1 and 999 for total_cycles). Regular billing cycles can be executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1 and 999 for total_cycles). */ totalCycles?: number; } export const cycleExecutionSchema: Schema = object({ tenureType: ['tenure_type', tenureTypeSchema], sequence: ['sequence', number()], cyclesCompleted: ['cycles_completed', number()], cyclesRemaining: ['cycles_remaining', optional(number())], currentPricingSchemeVersion: [ 'current_pricing_scheme_version', optional(number()), ], totalCycles: ['total_cycles', optional(number())], });