/** * PayPal Server SDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { array, lazy, number, object, optional, Schema, string, } from '../schema.js'; import { Money, moneySchema } from './money.js'; import { PricingTier, pricingTierSchema } from './pricingTier.js'; import { SubscriptionPricingModel, subscriptionPricingModelSchema, } from './subscriptionPricingModel.js'; /** The pricing scheme details. */ export interface SubscriptionPricingScheme { /** The version of the pricing scheme. */ version?: number; /** The currency and amount for a financial transaction, such as a balance or payment due. */ fixedPrice?: Money; /** The pricing model for tiered plan. The `tiers` parameter is required. */ pricingModel?: SubscriptionPricingModel; /** An array of pricing tiers which are used for billing volume/tiered plans. pricing_model field has to be specified. */ tiers?: PricingTier[]; /** The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates. */ createTime?: string; /** The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates. */ updateTime?: string; } export const subscriptionPricingSchemeSchema: Schema = lazy( () => object({ version: ['version', optional(number())], fixedPrice: ['fixed_price', optional(moneySchema)], pricingModel: ['pricing_model', optional(subscriptionPricingModelSchema)], tiers: ['tiers', optional(array(pricingTierSchema))], createTime: ['create_time', optional(string())], updateTime: ['update_time', optional(string())], }) );