import type { SubscriptionPlan } from './SubscriptionPlan'; import { subscriptionPlanFromJson } from './SubscriptionPlan'; /** * A subscription plan group containing multiple subscription plans. */ export interface SubscriptionPlanGroup { /** Unique identifier of the plan group. */ id?: string; /** Human-readable name of the plan group. */ name?: string; /** ISO-4217 currency code (e.g. "USD" or "EUR"). */ currency?: string; /** Timestamp of when the plan group was created. */ created?: string; /** List of subscription plans within this group. */ plans?: SubscriptionPlan[]; } export function subscriptionPlanGroupFromJson(jsonMap: { [key: string]: any; }): SubscriptionPlanGroup { return { id: jsonMap.id, name: jsonMap.name, currency: jsonMap.currency, created: jsonMap.created, plans: jsonMap.plans?.map(subscriptionPlanFromJson), }; }