Application Load

ISubscribeTariff

The physical TypeScript declaration from the Nuxt starter, with linked types and field comments.

ISubscribeTariff

Tariff pricing, trial period and included options.

interfaces/orionplace/subscribeTariff/ISubscribeTariff.ts
TypeScript
export interface ISubscribeTariff {
  // Tariff ID
  id: number;
  // Translations of the tariff name, descriptions and metadata
  locales: Record<string, ISubscribeTariffLocales>;
  // Plan parameter values keyed by service-defined names. The supplied client
  // recognizes the built-in booleans and limits described below. Other
  // boolean/numeric parameters need a readable translation; strings and nested
  // values are not generic plan features.
  tariff_variables_json: Record<string, JsonValue>;
  // Trial duration in days; zero means no trial
  trial_days: number;
  // New subscriptions to this plan are accepted when `true`. The parent
  // subscription must accept them as well.
  is_new_subs_allowed: boolean;
  // `true`: only a store administrator assigns this plan and the customer
  // cannot subscribe to it.
  only_admin_can_subscribe: boolean;
  // Prices for whole periods, with amounts keyed by currency ID
  prices: ISubscribeTariffPrice[];
  // Parent subscription ID in tariffs.subscriptions
  subscription: number;
  // Tariff image URLs; null when no images are provided
  tariff_image: ISubscribeTariffImages | null;
  // Plan videos in their display order; the field may be absent when the plan
  // has no videos.
  tariff_videos?: ISubscribeTariffVideo[];
  // Available options and period surcharges
  options: ISubscribeTariffOption[];
}