/** * PagarmeApiSDKLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { array, boolean, dict, number, object, optional, Schema, string, } from '../schema'; /** Request for updating a plan */ export interface UpdatePlanRequest { /** Plan's name */ name: string; /** Description */ description: string; /** Number os installments */ installments: number[]; /** Text that will be shown on the credit card's statement */ statementDescriptor: string; /** Currency */ currency: string; /** Interval */ interval: string; /** Interval count */ intervalCount: number; /** Payment methods accepted by the plan */ paymentMethods: string[]; /** Billing type */ billingType: string; /** Plan status */ status: string; /** Indicates if the plan is shippable */ shippable: boolean; /** Billing days accepted by the plan */ billingDays: number[]; /** Metadata */ metadata: Record; /** Minimum price */ minimumPrice?: number; /** Number of trial period in days, where the customer will not be charged */ trialPeriodDays?: number; } export const updatePlanRequestSchema: Schema = object({ name: ['name', string()], description: ['description', string()], installments: ['installments', array(number())], statementDescriptor: ['statement_descriptor', string()], currency: ['currency', string()], interval: ['interval', string()], intervalCount: ['interval_count', number()], paymentMethods: ['payment_methods', array(string())], billingType: ['billing_type', string()], status: ['status', string()], shippable: ['shippable', boolean()], billingDays: ['billing_days', array(number())], metadata: ['metadata', dict(string())], minimumPrice: ['minimum_price', optional(number())], trialPeriodDays: ['trial_period_days', optional(number())], });